on 12-24-2014 12:10 PM
Hello People !
How do i make the line number visible in sap hana studio or is there any shortcut to jump directly to line # in sap hana studio ?
i am writing a script . the partial code of the script is below
*************************************************************************************
DECLARE CURSOR GUID_CURSOR FOR
SELECT DISTINCT MDB_GUID
FROM :VAR_ALL_DATA
WHERE CNT >1;
FOR C_MDB_GUID AS GUID_CURSOR
DO
FOR COLUMN_NAME IN :VAR_ALL_OUTPUT_COLUMNS
DO
IF (:COLUMN_NAME = 'MDB_GUID') THEN
EXECUTE IMMEDIATE 'INSERT INTO C5210998.#LTT_BR_OUT(MDB_GUID) VALUES('''||:C_MDB_GUID||''');'
ELSE
{
FOR VAR_SOURCE IN VAR_ALL_SOURCE
DO
SELECT :COLUMN_NAME INTO VAR_COL_VALUE FROM :VAR_ALL_DATA
WHERE MDB_GUID = :C_MDB_GUID
AND SOURCE = :VAR_SOURCE;
IF ( :VAR_COL_VALUE IS NOT NULL)THEN
BREAK;
END IF;
END FOR;
UPDATE C5210998.#LTT_BR_OUT SET :COLUMN_NAME = :VAR_COL_VALUE
WHERE MDB_GUID = :C_MDB_GUID;
}
END IF;
END FOR;
END FOR;
*************************************************************************************
and i am receiving error at line 34 which is DECLARE CURSOR LINE. it is normal declare statement nothing advanced and i found nothing wrong in declairation. below is the error message
*******************************
Internal deployment of object failed;Repository: Encountered an error in repository runtime extension;Internal Error:Deploy Calculation View: SQL: sql syntax error: incorrect syntax near "CURSOR": line 34 col 4 (at pos 989)nSet Schema DDL statement: set schema "SYSTEM"nType DDL: create type
******************************
can anyone please suggest if i am doing something worng in the script ?
:VAR_ALL_DATA has a simple select statement and i checked running it to see it is resulting records
thanks for the help !!
To turn on line numbers in Studio - you can go to the Window menu, choose Preferences. Then select General > Editors > Text Editors. In that panel, you can check "Show Line Numbers".
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
working fine
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
it worked out... the cursor declare part had to come in the beginning before take data from any table
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
thanks Jim... now i can see the line number... could you also please help me with the error i am getting while declaring the cursor ?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
82 | |
10 | |
10 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.