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

This WebDNA talk-list message is from

2016


It keeps the original formatting.
numero = 112684
interpreted = N
texte = 267 ------=_Part_4929521_714599499.1458856920514 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable I'll give your way a try Brian... I was thinking [Loop] was the way to go. Tried another simple loop attempt a moment ago.This caused errors messages = and a total of 25,282 blank records to be created.....The code I used based= on what I thought I should do according to the docs: [search db=3Dproducts.db&eqVisibledatarq=3DT&asSKUsort=3D1][numfound] Produ= ct Listings Found

[founditems][loop start=3D1&end=3D[numfound]&advance=3D1][append db=3Dprodu= cts_new.db&SKU=3D[SKU]][/append][/loop][/founditems] [/search] Would the above [loop] code work if handled differently? =20 On Thursday, March 24, 2016 4:18 PM, Brian Burton w= rote: =20 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?=C2=A0 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] [ori= ginaldb-field-f][/appendfile] [/founditems][/search] in this case, the [founditems] is doing the work of a looping type function= ality.=C2=A0 -Brian B. Burton On Mar 24, 2016, at 3:23 PM, Rich Kwas wrote: I have a db with 3100+ recordsI 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 blan= k records was being written into a new db. I was searching for "all" the re= cords 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 pr= etty simple...I've never needed to use the [loop] context I guess so never = utilized it before. Rich---------------------------------------------------------This message i= s sent to you because you are subscribed tothe mailing list .To unsubscribe= , E-mail to: archives: http://mail.webdna.us/list/talk@webdna.usBug Reporti= ng: support@webdna.us ---------------------------------------------------------This message is se= nt to you because you are subscribed tothe mailing list .To unsubscribe, E-= mail to: archives: http://mail.webdna.us/list/talk@webdna.usBug Reporting: = support@webdna.us ------=_Part_4929521_714599499.1458856920514 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
I'll give your way a try= Brian...

I was thinking [Loop] was the wa= y to go.

Tried another simple loop attempt a = moment ago.
This caused errors messages= and a total of 25,282 blank records to be created.....
The code I used based on what I thought I should do accord= ing to the docs:

[search db=3Dproducts.db&eqVisibledatarq=3DT&asSKUsort= =3D1]
[numfound] Product Listings Found</p>

[founditems]
[loop start=3D1&end=3D[numfoun= d]&advance=3D1]
[append db=3Dproducts_new.db&SKU=3D[SKU]][/append]
[/loop]
[/founditems]

[/search]

Would the above [loop] code work= if handled differently?



=
On Thursday, March 2= 4, 2016 4:18 PM, Brian Burton <brian@burtons.com> wrote:


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=09field1=09= field2=09field3
[/writefile]

<= div class=3D"yiv6397747923">[search db=3Doriginal.db&neIDfield=3D[blank= ]]
=09[founditems]
=09=09[appendfile file=3Dnew.db&secure=3DF][index] [o= riginaldb-field-a]=09[originaldb-field-d] [originaldb-field-f]
[/appendfile]
=09[/founditems]
[/search]

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

<= br clear=3D"none" class=3D"yiv6397747923">
-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?
<= div class=3D"yiv6397747923" id=3D"yiv6397747923yui_3_16_0_ym18_1_1458850617= 761_2879">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, co= uldn'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 si= mple...
I've never needed to use the [loop] con= text 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:=20 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:=20 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 ------=_Part_4929521_714599499.1458856920514-- . 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)
267 ------=_Part_4929521_714599499.1458856920514 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable I'll give your way a try Brian... I was thinking [loop] was the way to go. Tried another simple loop attempt a moment ago.This caused errors messages = and a total of 25,282 blank records to be created.....The code I used based= on what I thought I should do according to the docs: [search db=3Dproducts.db&eqVisibledatarq=3DT&asSKUsort=3D1][numfound] Produ= ct Listings Found

[founditems][loop start=3D1&end=3D[numfound]&advance=3D1][append db=3Dprodu= cts_new.db&SKU=3D[SKU]][/append][/loop][/founditems] [/search] Would the above [loop] code work if handled differently? =20 On Thursday, March 24, 2016 4:18 PM, Brian Burton w= rote: =20 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?=C2=A0 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] [ori= ginaldb-field-f][/appendfile] [/founditems][/search] in this case, the [founditems] is doing the work of a looping type function= ality.=C2=A0 -Brian B. Burton On Mar 24, 2016, at 3:23 PM, Rich Kwas wrote: I have a db with 3100+ recordsI 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 blan= k records was being written into a new db. I was searching for "all" the re= cords 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 pr= etty simple...I've never needed to use the [loop] context I guess so never = utilized it before. Rich---------------------------------------------------------This message i= s sent to you because you are subscribed tothe mailing list .To unsubscribe= , E-mail to: archives: http://mail.webdna.us/list/talk@webdna.usBug Reporti= ng: support@webdna.us ---------------------------------------------------------This message is se= nt to you because you are subscribed tothe mailing list .To unsubscribe, E-= mail to: archives: http://mail.webdna.us/list/talk@webdna.usBug Reporting: = support@webdna.us ------=_Part_4929521_714599499.1458856920514 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
I'll give your way a try= Brian...

I was thinking [loop] was the wa= y to go.

Tried another simple loop attempt a = moment ago.
This caused errors messages= and a total of 25,282 blank records to be created.....
The code I used based on what I thought I should do accord= ing to the docs:

[search db=3Dproducts.db&eqVisibledatarq=3DT&asSKUsort= =3D1]
[numfound] Product Listings Found</p>

[loop start=3D1&end=3D[numfoun= d]&advance=3D1]
[append db=3Dproducts_new.db&SKU=3D[SKU]][/append]
[/loop]
[/founditems]

[/search]

Would the above [loop] code work= if handled differently?



=
On Thursday, March 2= 4, 2016 4:18 PM, Brian Burton <brian@burtons.com> wrote:


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=09field1=09= field2=09field3
[/writefile]

<= div class=3D"yiv6397747923">[search db=3Doriginal.db&neIDfield=3D[blank= ]]
=09=09[appendfile file=3Dnew.db&secure=3DF][index] [o= riginaldb-field-a]=09[originaldb-field-d] [originaldb-field-f]
[/appendfile]
=09[/founditems]
[/search]

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

<= br clear=3D"none" class=3D"yiv6397747923">
-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?
<= div class=3D"yiv6397747923" id=3D"yiv6397747923yui_3_16_0_ym18_1_1458850617= 761_2879">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, co= uldn'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 si= mple...
I've never needed to use the [loop] con= text 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:=20 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:=20 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 ------=_Part_4929521_714599499.1458856920514-- . Rich Kwas

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:

Nested tags count question (1997) [WebDNA] DNA suffix (2008) (1997) Help with nested search (1998) Nested tags count question (1997) Multi-User Security on *nix using mod_rewrite (2002) problems with WebCat-Plugin (1997) Emailer Erreur 551 (2001) TCP Connect (2000) Problem (1997) Associative lookup style? + bit more (1997) Cyberstudio and WebDNA (1997) Multiple cart additions (1997) Questions To Answer (1997) Browser frames and URLs in the Location field (2004) WebCatalog for Postcards ? (1997) OT : Virus (2000) member access (2000) Date search - yes or no (1997) [WebDNA] Sales Tax on CUstom WebDNA Site (2008)