Quantcast
Channel: dBforums – Everything on Databases, Design, Developers and Administrators
Viewing all articles
Browse latest Browse all 13329

LET clause in combination with IN

$
0
0
Hallo everyone,

in my User Definied Function, I would like to define a variable with a LET clause:

Code:

LET Books = (#1#, #39#, #40#, #55#)
In the User Defined Function, I want to check, if a String(of type VARCHAR) has at lease one book(one number in the variable Books):

Code:

if(Books IN myString) then 'direct'
But it didnt work. How can I express this in SQL:
if there is at least one of these book numbers, write 'direct'

Thank you guys.

Regards,
Ratna:)

Viewing all articles
Browse latest Browse all 13329

Trending Articles