Quantcast
Channel: SCN : All Content - SAP HANA Developer Center
Viewing all articles
Browse latest Browse all 6745

For Cursor SPS04 SPS05?

$
0
0

Hi All,

 

In SPS04 I use this:

 

CREATE PROCEDURE MYPROC(out o_code nvarchar(1000)) AS

           cursor c_a(table_name nvarchar(256)) for

                    select table_name 

                    from TABLES

                    where table_name = :table_name;

           

          cursor c_b(table_name nvarchar(256)) for

                    select table_name 

                    from TABLES

                    where table_name = :table_name;

begin

          for a as c_a('MARA') do

                                                  for b as c_b(a.table_name) do

                                                            o_code := b.table_name;

                                                  end for;

         end for;

end;

And It works.

 

In SPS05 I have this error message:

 

Could not execute 'CREATE PROCEDURE MYPROC(out o_code nvarchar(1000)) AS cursor c_a(table_name nvarchar(256)) for ...' in 223 ms 800 µs . SAP DBTech JDBC: [1287] (at 331): identifier must be declared: TABLE_NAME: line 15 col 18 (at pos 331) Qhats

What's wrong?

 

If I change the line for:

 

                             for b as c_b(to_char(a.table_name)) do

 

It's work! I have to always use a function on SPS05?

 

Thanks


Viewing all articles
Browse latest Browse all 6745

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>