![]() | ![]() Products ![]() ![]() ![]() ![]() |
Home » Technical Support » ElevateDB Technical Support » Support Forums » Search Forums » Search Results » View Thread |
Messages 1 to 3 of 3 total |
![]() |
Tue, Mar 16 2010 6:55 AM | Permanent Link |
Hershcu Sorin | Hello I have the following code: query1.SQL.Text := 'SELECT Field0, Field1, Field2 FROM Table1'; query1.Open; query2.SQL.Text := 'INSERT INTO Table2 (Field0, Field1, Field2, Field3)' + 'VALUES (' + myLocalVar + ', ' + query1.FieldByName('Field1').AsVariant + ', ' + query1.FieldByName('Field2').AsVariant + ')'; query2.ExecSql; The problem is that Field1, Field2 can be integer and can be NULL. What are the correct statements to create that code lines? Thanks Sorin |
Tue, Mar 16 2010 7:33 AM | Permanent Link |
Roy Lambert NLH Associates ![]() | Sorin Try this SQL.Text := 'INSERT INTO Table2 ((Field0, Field1, Field2, Field3) SELECT' + myLocalVar + ' Field0, Field1, Field2 FROM Table1' Roy Lambert [Team Elevate] |
Tue, Mar 16 2010 1:58 PM | Permanent Link |
Hershcu Sorin | > Try this > SQL.Text := 'INSERT INTO Table2 ((Field0, Field1, Field2, Field3) SELECT' > + myLocalVar + ' Field0, Field1, Field2 FROM Table1' Simple and work. Thanks Sorin |
This web page was last updated on Saturday, June 22, 2024 at 05:51 PM | Privacy Policy![]() © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? ![]() |