converting sql into entity

Posts   
 
    
yogiberr
User
Posts: 432
Joined: 29-Jun-2005
# Posted on: 14-Jun-2006 17:08:11   

hiya,

I have a sproc that I need to convert to an entity via the llblGen designer. I am not sure whether I should do an intial conversion and then use a predicate in code.

Indeed, because the query grabs stuff from several tables,I'm not even sure which entity I should initially use..below is the psedo query.

Any help appreciated.

many thanks,

yogi



SELECT   TOP 5 
table1.field1, 
table1.field2,

table2.field1, 
table2.field2,
(SELECT  TOP 1 imageFile
 FROM         CSK_Store_Image
 WHERE    (productID = table2.field2)) AS ImageFile

FROM ...a few INNER JOINS

WHERE

....a UDF  etc

GROUP BY
HAVING

bclubb
User
Posts: 934
Joined: 12-Feb-2004
# Posted on: 14-Jun-2006 23:31:22   

LLBLGen doesn't support turning the resultset of a stored procedure into an entity. What you may want to do is make this stored procedure into a view that you could use as an entity or typedview.

yogiberr
User
Posts: 432
Joined: 29-Jun-2005
# Posted on: 16-Jun-2006 11:37:51   

hiya Brian,

thanks for that bud.

yogi