on 10-30-2012 8:27 AM
Hi All,
I need to port a MS SQL Script in SAP Hana.
Usually in MSSQL Server I write something like:
DECLARE @CardName AS nvarchar(max)
SELECT @CardName = CardName FROM OCRD WHERE CardCode = 'C20000'
PRINT @CardName
...
How do I write an equivalent script in SAP Hana Studio?
Thank You,
paolo
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Paolo,
Here is an example procedure with your query:
create procedure test
language SQLSCRIPT AS
CardName varchar(100);
begin
select o.CardName into CardName from OCRD o WHERE CardCode = 'C20000' ;
select :CardName as "CardName" from DUMMY;
end
Regards,
dani
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank You Yordan,
you are creating a procedure here. I would like to obtain the same result WITHOUT the stored procedure.
When I connect using a DbConnector I would like to be able to run such command (or even more complex) without the need of creating a stored procedure just for that.
Thank You.
paolo
User | Count |
---|---|
69 | |
8 | |
8 | |
6 | |
6 | |
6 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.