Lundquist, Jason wrote:
> I'm looking for advice porting stored procedures from a MS SQL database to
SAPDB.
>
> In T-SQL I used a stored procedure like the example below for a user
search form:
>
> SELECT * FROM table
> WHERE COALESCE(column1, '') LIKE COALESCE(@variable1, '') + '%'
> AND COALESCE(column2,'') LIKE COALESCE(@variable2, '') + '%'
> AND COALESCE(column3, '') LIKE COALESCE(@variable3, '') + '%'
> ...
>
> Can I do this in a DBPROC in SAPDB?
A SELECT is possible in a dbproc, no problem.
But COALESCE has to be changed to VALUE,
+ '%' has to be changed to || '%' and
@variable has to be changed to :variable
see reference manual --> basis elements --> functions and
reference manual --> data definition --> create dbproc statement
Elke
SAP Labs Berlin
_______________________________________________
sapdb.general mailing list
[EMAIL PROTECTED]
http://listserv.sap.com/mailman/listinfo/sapdb.general