0


I don't understand why an error occurs when using RECORD_COUNT ().
Do you have a way to assign a record number value to an INT scalar variable?
Here is my code:

 CREATE table tab (COL_A int);
    INSERT INTO tab VALUES (1);
    INSERT INTO tab VALUES (2);

    DO (IN inTab TABLE(col_a int) => TAB, OUT v INT => ?)
     BEGIN
     DECLARE i int;
     v = 0;
     FOR i IN 1 .. RECORD_COUNT(:inTab)
     DO
     v = :v + :inTab.col_a[:i];
    
     END FOR;
    END

ERROR:...SAP DBTech JDBC: [328]: invalid name of function or procedure: RECORD_COUNT...
I am trainning about sap hana, thank you very much for my help and interest in my question.

3
  • 1
    The RECORD_COUNT SQLScript function is available in SAP HANA 2 and higher. If your HANA system is a HANA 1 system, then this function is not available. Commented Apr 8, 2021 at 23:16
  • @LarsBr. thanks bro so much. Commented Apr 12, 2021 at 5:18
  • Converted the comment to an answer; please accept as correct answer so that this question is answered. Commented Apr 12, 2021 at 9:48

1 Answer 1

0

The RECORD_COUNT SQLScript function is available in SAP HANA 2 and higher. If your HANA system is a HANA 1 system, then this function is not available.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.