cancel
Showing results for 
Search instead for 
Did you mean: 

line number in sap hana studio

Former Member
0 Kudos

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 !!

Accepted Solutions (1)

Accepted Solutions (1)

Former Member

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". 

Answers (3)

Answers (3)

former_member673826
Discoverer
0 Kudos

working fine

Former Member
0 Kudos

it worked out... the cursor declare part had to come in the beginning before take data from any table

Former Member
0 Kudos

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 ?