on 2016 Jul 18 12:51 PM
Hi,
The query below is working fine under SQL but we can't find the correct HANA syntax
SQL SYNTAX
/*SELECT FROM [dbo].[OPRJ] T0*/
declare @PrjCode as nvarchar(40)
/* WHERE */
set @PrjCode = /* T0.PrjCode */ '[%0]'
select * from [dbo].[SW_Data_Store] T0 where T0.PrjCode=@PrjCode
HANA VERSION
/*SELECT FROM [dbo].[OIGE] T0*/
SortNr nvarchar(40);
/* WHERE */
SortNr: = /* T0.U_SortNr */ [%0]
SELECT SortNr from sortingresult where U_SortNr=SortNr:
The HANA version seems to work for the first part, we get a drop down with values. But the final select statement doesn't work at all
Who can help us ?
Thanks,
Paul
The reason why this only works on SQL Server is that this is SQL Server language - not standard SQL.
From the code you posted, I infer that you want a simple SELECT query with a parameter - correct?
If so, you should try something like
SELECT "SortNo"
FROM SORTINGRESULT
WHERE U_SORTNO = ?;
HANA studio will ask you for the value of the placeholder (?) upon query execution.
If you actually wanted to create a stored procedure, then this is easily possible too.
Just read the documentation on how to write SQL Script code and you're good.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
66 | |
10 | |
10 | |
10 | |
10 | |
8 | |
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.