on 08-02-2013 6:22 AM
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.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.