cancel
Showing results for 
Search instead for 
Did you mean: 

QUESTION about HANA SQL

byungseok_lee
Explorer
0 Kudos

Hi Everyone,,i'm a new to SAP HANA.

I have a few question about HANA SQL.

1. Can I use 'goto' structure?

I usually use like this in MS SQL.

----------------sample-----------------------------------------

IF @Parameter = '1'

     BEGIN

          GOTO SP_END

     END

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

SP_END:

select * from [tablename] where 'condition'

--------------------------------------------------------------------

can i change this structure for HANA?

2. Can I use function in procedure ?

sorry but , MS SQL sample

--------------MS sample----------------------------------------

INSERT #TEMP TABLE  (A, B, C)

SELECT   E, F, G

FROM [DBO].[FN_GET_FQTY](@SDATE)

----------------------------------------------------------------------

i try to like this but it doesn't work

--------------sample---------------------------------------------

INSERT INTO #TEMP TABLE  (A, B, C)

SELECT   "E", "F", "G"

FROM     CALL   FN_GET_FQTY   (:SDATE)

----------------------------------------------------------------------

if you know how to slove this problem please let me know, it is very important thing for me.

3.UPDATE TEMPORARY TABLE

if i try this structure in some procedure it doesn't work .        

--------------sample---------------------------------------------------------------------------------------------------

create local temporary table #"temp" (ItemCode NAVARCHAR(20));

update #"temp" set ItemCode='23';

SAP DBTech JDBC: [7] (at 4652): feature not supported: update statement for volatile table

--------------------------------------------------------------------------------------------------------------------------

if i try in hana session  it is ok ,  but not to work in procedure

Best regards and thanks to all of you that have helpfull answears, Thanks.

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Lee,

Firstly, you  post each question by different discussion as well.

For Q1, so far, HANA has no this structure for this, but you can define function or procedure to solve it.

For Q2, yes, you can use function in procedure.

For Q3, it works in HANA SPS05 and SPS06 after change NAVARCHAR to NVARCHAR , which HANA version are you using?

Regards,

Jerry