Skip to Content
avatar image
Former Member

line number in sap hana studio

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

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Best Answer
    Dec 24, 2014 at 03:24 PM

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

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Dec 26, 2014 at 04:19 AM

    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 ?

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Dec 26, 2014 at 06:48 AM

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

    Add comment
    10|10000 characters needed characters exceeded