Home
Help
Register
Log in

Search

 
   Active Threads  

You are here: Home > LLBLGen Pro > Generated code> Update Objects Directly with data from db
 

Pages: 1
Generated code
Update Objects Directly with data from db
Page:1/1 

  Print all messages in this thread  
Poster Message
JRR
User



Location:
Western Canada
Joined on:
07-Dec-2005 23:33:05
Posted:
125 posts
# Posted on: 14-Dec-2006 00:56:50.  
Hi guys, Regular Smiley

I've read the docs on expressions, but I haven't understood how to accomplish this - update directly using data from another table:


Code:

Insert Into InventoryWarehouse(WarehouseCode)

(Select '105-' + SSN.prefix + '-' + CAST(SSN.number as varchar(10)) from

SystemStartingNumber SSN

where entity = 'InventoryBlock')



How would I turn the select statement into an expression? Confused

VB.net 2.0 | LLBLGen 2.0 (Nov.6)
  Top
Walaa
Support Team



Location:

Joined on:
21-Aug-2005 16:03:48
Posted:
13799 posts
# Posted on: 14-Dec-2006 06:42:27.  
"Insert Into" is not supported.
So in this case, you should fetch the SystemStartingNumber entity.
Do the string concatenation programatically, and then Insert a new InventoryWarehouse entity with the concatenated string for the WarehouseCode.


  Top
JRR
User



Location:
Western Canada
Joined on:
07-Dec-2005 23:33:05
Posted:
125 posts
# Posted on: 14-Dec-2006 06:57:02.  
Hi Walaa

Thanks for the reply!

I was hoping to accomplish this in one database call.. Sad

I'll resort to writing a SQL Function that I can call as an expression Regular Smiley
  Top
Pages: 1  


Powered by HnD ©2002-2007 Solutions Design
HnD uses LLBLGen Pro

Version: 2.1.12172008 Final.