Direct SQL statement execution

Posts   
 
    
Andrius
User
Posts: 68
Joined: 04-Apr-2005
# Posted on: 02-Nov-2005 12:24:29   

Is It possible to execute direct SQL statement with Adapter generated by LLBL? I could not find anything in docs. I know this is discouraged but some update with subquery is needed and i don't want to write a stored proc for just one SQL statement.

BTW I am using SQL server

Walaa avatar
Walaa
Support Team
Posts: 14995
Joined: 21-Aug-2005
# Posted on: 02-Nov-2005 14:02:29   

Please refer to this thread:

http://www.sd.nl/TinyForum/Messages.aspx?ThreadID=3720

If this thread does not address your question or if you still have questions please get back to us.

Andrius
User
Posts: 68
Joined: 04-Apr-2005
# Posted on: 02-Nov-2005 14:17:59   

Walaa wrote:

Please refer to this thread:

http://www.sd.nl/TinyForum/Messages.aspx?ThreadID=3720

If this thread does not address your question or if you still have questions please get back to us.

Not much help... Code I want execute is like:


update SomeTable
set SomeTable.QuantityOrderedByPurchase=SubSelect.PurchaseOrderQuantity
FROM (
SELECT poi.ArticleID as ArticleID , SUM(poi.PurchaseOrderQuantity) as PurchaseOrderQuantity
FROM PurchaseOrderItem poi
GROUP BY poi.ArticleID 
) SubSelect
Where SomeTable.ArticleID =SubSelect.ArticleID 
GO

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39933
Joined: 17-Aug-2003
# Posted on: 02-Nov-2005 14:46:28   

Currently that's not supported.

Frans Bouma | Lead developer LLBLGen Pro
Andrius
User
Posts: 68
Joined: 04-Apr-2005
# Posted on: 03-Nov-2005 13:06:00   

Otis wrote:

Currently that's not supported.

Are there any plans to support direct SQL execution using the same transaction in Adapter?

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39933
Joined: 17-Aug-2003
# Posted on: 03-Nov-2005 13:39:01   

Andrius wrote:

Otis wrote:

Currently that's not supported.

Are there any plans to support direct SQL execution using the same transaction in Adapter?

Yes, subselects in update statements and subselects in from clauses are planned.

Frans Bouma | Lead developer LLBLGen Pro