Use of table returning SQL Function

Posts   
 
    
GJenkins__
User
Posts: 2
Joined: 14-Apr-2008
# Posted on: 14-Apr-2008 21:27:12   

Hi

I'm wondering if it's possible to convert the following SQL statement into LLBL code.

SELECT * FROM emailaddressingrule ER LEFT OUTER JOIN dbo.[emailaddressingrule_option] AS vo1 ON (vo1.emailaddressingruleId = ER.emailaddressingruleId AND vo1.OptionID IN (SELECT OptionID FROM dbo.GetTableResult(@StringValue))) WHERE vo1.OptionID IS NOT NULL

The GetTableResult function returns a table with a single field (OptionId) from a given string (@StringValue). However I'm not sure if it's possible to use a DBFunction in this manner?

Any help hugely appreciated, thanks!

Gareth

DvK
User
Posts: 323
Joined: 22-Mar-2006
# Posted on: 14-Apr-2008 22:26:16   

Yep, no problemo. Just use a CompareSetPredicate to build the IN clause.

-- edit -- and you can use DB functions as well...

gtrz, Danny