U++ framework
Do not panic. Ask here before giving up.

Home » U++ Library support » U++ SQL » Format of Select statement inside Insert..??
Format of Select statement inside Insert..?? [message #33748] Sat, 10 September 2011 14:00 Go to previous message
Monty.mvh is currently offline  Monty.mvh
Messages: 31
Registered: July 2011
Location: Bangalore
Member
Hi,

I have two tables Master and Slave.
I should access value of KEY_1 generated in Master table in slave table.. How to achieve this..?
I tried with the statement
SQL & Insert(SLAVE) (KEY_1,'Select (KEY_1) .From(MASTER)');
and i got some junk value than the required ..
Is the above Statement correct..??

table1.sch:

TABLE_ ( MASTER )
INT_ ( KEY_1 ) PRIMARY_KEY AUTO_INCREMENT
STRING_ ( DATA, 20 ) PRIMARY_KEY
END_TABLE


TABLE_ ( SLAVE )
INT ( KEY_1 )
INT_ ( MKEY ) PRIMARY_KEY AUTO_INCREMENT
STRING_ ( TYPE, 40 )
END_TABLE
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: EditField and Sqlite...
Next Topic: console + sql + unicode or utf
Goto Forum:
  


Current Time: Sat Jul 11 23:53:59 GMT+2 2026

Total time taken to generate the page: 0.00611 seconds