Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » DBISAM Technical Support » Support Forums » DBISAM SQL » View Thread |
Messages 1 to 10 of 16 total |
Insert from Memory Table into Physical Table |
Thu, Apr 13 2006 4:44 PM | Permanent Link |
"Allan Roberts" | I am creating a number of records in a memory table and want to copy them to
a physical table by using a query. The columns of the memory table and physical are identical. How can I do this without enumerating every column? The following query produces a parsing error: SQL.Add('INSERT INTO "Purchase" * SELECT * FROM "\Memory\Purchase1"') Thanks for any help. |
Thu, Apr 13 2006 5:11 PM | Permanent Link |
"Ralf Bertoldi" | Allan Roberts wrote:
> SQL.Add('INSERT INTO "Purchase" * SELECT * FROM > "\Memory\Purchase1"') maybe this should work..: SQL.Add('INSERT INTO "Purchase" SELECT * FROM "\Memory\Purchase1"') HIH ralf |
Thu, Apr 13 2006 5:17 PM | Permanent Link |
"Allan Roberts" | "Ralf Bertoldi" <bertoldi@gmx.net> wrote in message news:23D1E9B6-1A0F-4F94-9B26-75A7439FC2B5@news.elevatesoft.com... > Allan Roberts wrote: > > > SQL.Add('INSERT INTO "Purchase" * SELECT * FROM > > "\Memory\Purchase1"') > > > maybe this should work..: > > SQL.Add('INSERT INTO "Purchase" SELECT * FROM "\Memory\Purchase1"') > > > HIH > ralf Thanks for the response. I had tried that originally, and got a SQL parsing error as well. If I understand correctly, yours is the proper syntax, and I don't know why it doesn't work... |
Thu, Apr 13 2006 7:07 PM | Permanent Link |
"Clive" | Just out of curisity trying removing the quotes from around Purchase
That Syntax should work, I do that all the time. "Allan Roberts" <aroberts@roboticstech.com> wrote in message news:8269D087-C292-437B-8369-DB3E6AFE3C46@news.elevatesoft.com... > > "Ralf Bertoldi" <bertoldi@gmx.net> wrote in message > news:23D1E9B6-1A0F-4F94-9B26-75A7439FC2B5@news.elevatesoft.com... >> Allan Roberts wrote: >> >> > SQL.Add('INSERT INTO "Purchase" * SELECT * FROM >> > "\Memory\Purchase1"') >> >> >> maybe this should work..: >> >> SQL.Add('INSERT INTO "Purchase" SELECT * FROM "\Memory\Purchase1"') >> >> >> HIH >> ralf > > Thanks for the response. I had tried that originally, and got a SQL > parsing > error as well. If I understand correctly, yours is the proper syntax, and > I > don't know why it doesn't work... > > > |
Fri, Apr 14 2006 3:29 PM | Permanent Link |
"Allan Roberts" | I tried that, and still get an SQL parsing error. Curious. Thanks for
trying. "Clive" <dd@dddd.com> wrote in message news:3739D1B9-A3DB-4175-BAEA-01EF48DBA154@news.elevatesoft.com... > Just out of curisity trying removing the quotes from around Purchase > > That Syntax should work, I do that all the time. > > "Allan Roberts" <aroberts@roboticstech.com> wrote in message > news:8269D087-C292-437B-8369-DB3E6AFE3C46@news.elevatesoft.com... > > > > "Ralf Bertoldi" <bertoldi@gmx.net> wrote in message > > news:23D1E9B6-1A0F-4F94-9B26-75A7439FC2B5@news.elevatesoft.com... > >> Allan Roberts wrote: > >> > >> > SQL.Add('INSERT INTO "Purchase" * SELECT * FROM > >> > "\Memory\Purchase1"') > >> > >> > >> maybe this should work..: > >> > >> SQL.Add('INSERT INTO "Purchase" SELECT * FROM "\Memory\Purchase1"') > >> > >> > >> HIH > >> ralf > > > > Thanks for the response. I had tried that originally, and got a SQL > > parsing > > error as well. If I understand correctly, yours is the proper syntax, and > > I > > don't know why it doesn't work... > > > > > > > > |
Fri, Apr 14 2006 3:40 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Allan,
<< I tried that, and still get an SQL parsing error. Curious. Thanks for trying. >> What is the actual error message that you're getting (with the line and column number of the error) ? -- Tim Young Elevate Software www.elevatesoft.com |
Sat, Apr 15 2006 1:42 PM | Permanent Link |
"Allan Roberts" | "Tim Young [Elevate Software]" <timyoung@elevatesoft.com> wrote in message news:E09F2016-0195-442A-AD07-9AA927935E66@news.elevatesoft.com... > Allan, > > << I tried that, and still get an SQL parsing error. Curious. Thanks for > trying. >> > > What is the actual error message that you're getting (with the line and > column number of the error) ? > > -- > Tim Young > Elevate Software > www.elevatesoft.com > > This is the error message: DBISAM Engine Error # 11949 SQL parsing error - Expected NULL, Boolean, SmallInt, Word, AutoInc, Integer, LargeInt, Currency, Float, or BCD expression but instead found Description in SELECT SQL statement at line 0, column 0. "Description" is of course, a field in the tables, but it doesn't appear anywhere in my SQL statement. Here is the complete code that I am attempting to use: dm1.qryTest.Close; dm1.qryTest.SQL.Clear; dm1.qryTest.SQL.Add('INSERT INTO Purchase SELECT * FROM "\Memory\Purchase1"'); dm1.qryTest.ExecSQL; Purchase and Purchase1 are of identical structure. |
Mon, Apr 17 2006 7:20 AM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Allan,
<< This is the error message: DBISAM Engine Error # 11949 SQL parsing error - Expected NULL, Boolean, SmallInt, Word, AutoInc, Integer, LargeInt, Currency, Float, or BCD expression but instead found Description in SELECT SQL statement at line 0, column 0. "Description" is of course, a field in the tables, but it doesn't appear anywhere in my SQL statement. >> I think you've got two different SQL statements mixed up - DBISAM won't issue a parsing error for something that isn't there to parse. -- Tim Young Elevate Software www.elevatesoft.com |
Mon, Apr 17 2006 7:29 PM | Permanent Link |
"Allan Roberts" | "Tim Young [Elevate Software]" <timyoung@elevatesoft.com> wrote in message news:D1D2C638-A921-4436-80C4-0783C321CAD6@news.elevatesoft.com... > Allan, > << This is the error message: > > DBISAM Engine Error # 11949 SQL parsing error - Expected NULL, Boolean, > SmallInt, Word, AutoInc, Integer, LargeInt, Currency, Float, or BCD > expression but instead found Description in SELECT SQL statement at line 0, > > column 0. > > "Description" is of course, a field in the tables, but it doesn't appear > anywhere in my SQL statement. >> > > I think you've got two different SQL statements mixed up - DBISAM won't > issue a parsing error for something that isn't there to parse. > > -- > Tim Young > Elevate Software > www.elevatesoft.com I'm not sure what you mean; There is only one SQL statement-- the one that I posted. I'm not sure how another could be available to mix since I cleared any previous statements immediately before SQL.Add: dm1.qryTest.Close; dm1.qryTest.SQL.Clear; dm1.qryTest.SQL.Add('INSERT INTO Purchase SELECT * FROM "\Memory\Purchase1"'); dm1.qryTest.ExecSQL; Is this the correct syntax? > > |
Tue, Apr 18 2006 3:41 AM | Permanent Link |
Roy Lambert NLH Associates Team Elevate | Allan
I think what Tim's referring to is the fact that "Description" doesn't occur at all in your sql statement as shown so where is it coming from? The obvious conclusion is that either the sql you posted isn't the one giving the error, or you haven't posted all of the statement. I think (and Tim will correct me if wrong) that Description is a reserved word so you'd need to enclose it in quotes wherever it is. Roy Lambert |
Page 1 of 2 | Next Page » | |
Jump to Page: 1 2 |
This web page was last updated on Monday, May 6, 2024 at 12:23 AM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |