Creating bucket

Posts   
 
    
Posts: 2
Joined: 16-Jan-2008
# Posted on: 16-Jan-2008 16:19:53   

I need help on converting the following sql command to a RelationPredicateBucket. I appreciate any help in advance.

SELECT * FROM Status order by SUBSTRING(StatusDesc, CHARINDEX('stsop', LOWER(StatusDesc), 0) + 5, 1000)

Walaa avatar
Walaa
Support Team
Posts: 14995
Joined: 21-Aug-2005
# Posted on: 16-Jan-2008 16:52:10   

You can use nested DBFunctionCalls, there is an example in the following thread: http://www.llblgen.com/TinyForum/Messages.aspx?ThreadID=12051

Also you can use the DBFunctionCall with the constant feature as follows:

new DbFunctionCall( "SUBSTRING({0}, CHARINDEX('stsop', LOWER({0}), 0) + 5, 1000)", 
    new object[] { StatusFields.StatusDesc });
Posts: 2
Joined: 16-Jan-2008
# Posted on: 16-Jan-2008 17:26:01   

Thanks Walaa, But where I can fine DbFuncitonCall? (I mean in which assembly and namesapce).

daelmo avatar
daelmo
Support Team
Posts: 8245
Joined: 28-Nov-2005
# Posted on: 17-Jan-2008 04:04:55   

DbFuncitonCall is part of the ORMSupportClasses assembly. Read the LLBLGenPro Help to figure out how to use such feature wink :

using SD.LlblGen.Pro.ORMSupportClasses;

David Elizondo | LLBLGen Support Team