Article View: borland.public.vdbase.data.sql
Article #1145Re: SQL SAVE TO option
From: Gerald Fay
Date: Sun, 19 Apr 1998 00:00
Date: Sun, 19 Apr 1998 00:00
63 lines
1962 bytes
1962 bytes
In article <MPG.fa342ca50ba8cb9896f7@forums.borland.com>, gjfay@msn.com says... > In article <01bd6955$04033e60$4a4c96d1@dict2>, tgleaton@linkline.com > says... > > Vdb 7.01 > > > > sql = "select * from customer where custno = :form.custno SAVE TO temp" > > > > How do I create a new database from the results of a select? > > I don't see anything in OLH but recall someone here saying it is supported? > > Is it SAVE TO or COPY TO ? What is syntax? > > > > -- > > Thanks, > > Tom Gleaton > > County of Riverside, Riverside California > > > > How about just saving it to the rowset and using CLASS updateset > > > function load_my_query_into_a_new_databasefile > private m > m=form.custno > m='"'+m+'"' > oFoo=new Query() > oFoo.sql= 'select * from "customer" where custno = &m' > oFoo.active=true > u=new updateset() > u.source=oFoo.rowset > u.destination=temp.dbf > u.copy() > > > It's blinding fast!! > > -- > Gerald Fay > gjfay@msn.com > A couple of errors: function load_my_query_into_a_new_databasefile private m m=form.custno -> this probably should be form.custno.value m='"'+m+'"' -> get the sting right for SQL to work oFoo=new Query() oFoo.sql= 'select * from "customer" where custno = &m' oFoo.active=true u=new updateset() u.source=oFoo.rowset u.destination=temp.dbf ->put the dbf in quotes "Temp.dbf" u.copy() Try it you'll like it! -- Gerald Fay gjfay@msn.com
Technical Details
Message-ID:
<MPG.fa34426574d7b009896f8@forums.borland.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<01bd6955$04033e60$4a4c96d1@dict2> <MPG.fa342ca50ba8cb9896f7@forums.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: ff5a1,314cd95164e49b11 X-Google-Attributes: gidff5a1,public From: gjfay@msn.com (Gerald Fay) Subject: Re: SQL SAVE TO option Date: 1998/04/19 Message-ID: <MPG.fa34426574d7b009896f8@forums.borland.com> X-Deja-AN: 345574311 References: <01bd6955$04033e60$4a4c96d1@dict2> <MPG.fa342ca50ba8cb9896f7@forums.borland.com> Organization: Phase V Software Newsgroups: borland.public.vdbase.data.sql