Re: [WebDNA] copy some database fields into a new database

This WebDNA talk-list message is from

2016


It keeps the original formatting.
numero = 112683
interpreted = N
texte = 266 --Apple-Mail=_5D8F504B-0CBE-4A6B-9B51-D30245ECE5C4 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii To clarify, are you trying to copy a few columns of all 3100 records to = a new database, or copy X number of rows from one database to another?=20= It sounds like you want to do this: [writefile file=3Dnew.db]IDfield1field2field3 [/writefile] [search db=3Doriginal.db&neIDfield=3D[blank]] [founditems] [appendfile file=3Dnew.db&secure=3DF][index] = [originaldb-field-a][originaldb-field-d] [originaldb-field-f] [/appendfile] [/founditems] [/search] in this case, the [founditems] is doing the work of a looping type = functionality.=20 -Brian B. Burton > On Mar 24, 2016, at 3:23 PM, Rich Kwas = wrote: >=20 > I have a db with 3100+ records > I need to copy some fields from this db into a brand new db. >=20 > Would using [Loop] be a good way to do this? > Another way? >=20 > I tried to use [loop] but I got into an endless loop where nothing but = blank records was being written into a new db. I was searching for "all" = the records and then appending certain fields into the new db. I had to = pull the plug on the pc after 43,000 records, couldn't figure out a way = to break the loop. >=20 > [Loop] isn't explained in great detail in the docs and the one sample = is pretty simple... > I've never needed to use the [loop] context I guess so never utilized = it before. >=20 >=20 > Rich > --------------------------------------------------------- This message = is sent to you because you are subscribed to the mailing list . To = unsubscribe, E-mail to: archives: = http://mail.webdna.us/list/talk@webdna.us Bug Reporting: = support@webdna.us --Apple-Mail=_5D8F504B-0CBE-4A6B-9B51-D30245ECE5C4 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=us-ascii To clarify, are you trying to copy a few columns of all 3100 = records to a new database, or copy X number of rows from one database to = another? 

It = sounds like you want to do this:

[writefile file=3Dnew.db]ID= field1= field2= field3
[/writefile]

[search = db=3Doriginal.db&neIDfield=3D[blank]]
= [founditems]
[appendfile = file=3Dnew.db&secure=3DF][index] [originaldb-field-a]= [originaldb-field-d] [originaldb-field-f]
[/appendfile]
= [/founditems]
[/search]

in this case, the = [founditems] is doing the work of a looping type = functionality. 


-Brian B. = Burton

On Mar 24, 2016, at 3:23 PM, Rich Kwas <richkwasniewski@yahoo.com> wrote:

I = have a db with 3100+ records
I = need to copy some fields from this db into a brand new db.

Would using [Loop] be a good way to do this?
Another way?

I tried to use [loop] but I got into an endless = loop where nothing but blank records was being written into a new db. I = was searching for "all" the records and then appending certain fields = into the new db. I had to pull the plug on the pc after 43,000 records, = couldn't figure out a way to break the loop.

[Loop] isn't explained in great detail in the = docs and the one sample is pretty simple...
I've = never needed to use the [loop] context I guess so never utilized it = before.


Rich
--------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: archives: http://mail.webdna.us/list/talk@webdna.us Bug Reporting: support@webdna.us

= --------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: archives: http://mail.webdna.us/list/talk@webdna.us Bug Reporting: support@webdna.us --Apple-Mail=_5D8F504B-0CBE-4A6B-9B51-D30245ECE5C4-- . Associated Messages, from the most recent to the oldest:

    
  1. Re: [WebDNA] copy some database fields into a new database (Rich Kwas 2016)
  2. Re: [WebDNA] copy some database fields into a new database (Brian Burton 2016)
  3. Re: [WebDNA] copy some database fields into a new database (Rich Kwas 2016)
  4. Re: [WebDNA] copy some database fields into a new database (Brian Burton 2016)
  5. [WebDNA] copy some database fields into a new database (Rich Kwas 2016)
266 --Apple-Mail=_5D8F504B-0CBE-4A6B-9B51-D30245ECE5C4 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii To clarify, are you trying to copy a few columns of all 3100 records to = a new database, or copy X number of rows from one database to another?=20= It sounds like you want to do this: [writefile file=3Dnew.db]IDfield1field2field3 [/writefile] [search db=3Doriginal.db&neIDfield=3D[blank]] [founditems] [appendfile file=3Dnew.db&secure=3DF][index] = [originaldb-field-a][originaldb-field-d] [originaldb-field-f] [/appendfile] [/founditems] [/search] in this case, the [founditems] is doing the work of a looping type = functionality.=20 -Brian B. Burton > On Mar 24, 2016, at 3:23 PM, Rich Kwas = wrote: >=20 > I have a db with 3100+ records > I need to copy some fields from this db into a brand new db. >=20 > Would using [loop] be a good way to do this? > Another way? >=20 > I tried to use [loop] but I got into an endless loop where nothing but = blank records was being written into a new db. I was searching for "all" = the records and then appending certain fields into the new db. I had to = pull the plug on the pc after 43,000 records, couldn't figure out a way = to break the loop. >=20 > [loop] isn't explained in great detail in the docs and the one sample = is pretty simple... > I've never needed to use the [loop] context I guess so never utilized = it before. >=20 >=20 > Rich > --------------------------------------------------------- This message = is sent to you because you are subscribed to the mailing list . To = unsubscribe, E-mail to: archives: = http://mail.webdna.us/list/talk@webdna.us Bug Reporting: = support@webdna.us --Apple-Mail=_5D8F504B-0CBE-4A6B-9B51-D30245ECE5C4 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=us-ascii To clarify, are you trying to copy a few columns of all 3100 = records to a new database, or copy X number of rows from one database to = another? 

It = sounds like you want to do this:

[writefile file=3Dnew.db]ID= field1= field2= field3
[/writefile]

[search = db=3Doriginal.db&neIDfield=3D[blank]]
[appendfile = file=3Dnew.db&secure=3DF][index] [originaldb-field-a]= [originaldb-field-d] [originaldb-field-f]
[/appendfile]
= [/founditems]
[/search]

in this case, the = [founditems] is doing the work of a looping type = functionality. 


-Brian B. = Burton

On Mar 24, 2016, at 3:23 PM, Rich Kwas <richkwasniewski@yahoo.com> wrote:

I = have a db with 3100+ records
I = need to copy some fields from this db into a brand new db.

Would using [loop] be a good way to do this?
Another way?

I tried to use [loop] but I got into an endless = loop where nothing but blank records was being written into a new db. I = was searching for "all" the records and then appending certain fields = into the new db. I had to pull the plug on the pc after 43,000 records, = couldn't figure out a way to break the loop.

[loop] isn't explained in great detail in the = docs and the one sample is pretty simple...
I've = never needed to use the [loop] context I guess so never utilized it = before.


Rich
--------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: archives: http://mail.webdna.us/list/talk@webdna.us Bug Reporting: support@webdna.us

= --------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: archives: http://mail.webdna.us/list/talk@webdna.us Bug Reporting: support@webdna.us --Apple-Mail=_5D8F504B-0CBE-4A6B-9B51-D30245ECE5C4-- . Brian Burton

DOWNLOAD WEBDNA NOW!

Top Articles:

Talk List

The WebDNA community talk-list is the best place to get some help: several hundred extremely proficient programmers with an excellent knowledge of WebDNA and an excellent spirit will deliver all the tips and tricks you can imagine...

Related Readings:

Here we go again... was: DDEConnect not working (2006) [WebDNA] Use of MySQL with WebDNA (2010) Searching multiple records for certain info (2000) Shopping Cart variation... (1997) how does [middle] work? (1998) URGENT: WebCatalog 2.0 (1998) Linux Beta4 Problem (2000) FYI: virus alert (1996) Download URL & access on the fly ? (1997) Database cloning, or possible hack? (2003) WebCatalog and WebMerchant reviewed by InfoWorld (1997) search problem (2002) [carts] and databases (1997) Date problems (1997) upgrading (1997) Help! WebCat2 bug (1997) RE: Problems reading files created by WC (1997) [WebDNA] function variables (2011) [WriteFile] problems (1997) Showing unopened cart (1997)