Re: MySQL Insert Select statement

From: Date: Sun, 20 Oct 2002 18:48:47 +0000
Subject: Re: MySQL Insert Select statement
Groups: php.general 
Request: Send a blank email to php-general+get-120680@lists.php.net to get a copy of this message
Can you provide an example of how to wrap a select statement with a string function? -----Original Message----- From: Paul DuBois <paul@snake.net> To: dwalker <dwalker@healthyproductsplus.com> Date: Sunday, October 20, 2002 12:59 PM Subject: Re: [PHP-DB] MySQL Insert Select statement >>This time it will be content > >If you can identify the content in some reliable way, then you may be able >to use some kind of string function or combination of functions on the value >to extract the part you want. Whether or not you can do that depends entirely >on the original string and what you want to extract from it. > >> >> >>-----Original Message----- >>From: Paul DuBois <paul@snake.net> >>To: dwalker <dwalker@healthyproductsplus.com> >>Date: Saturday, October 19, 2002 11:58 PM >>Subject: Re: [PHP-DB] MySQL Insert Select statement >> >> >>>At 23:44 -0500 10/19/02, dwalker wrote: >>>>On another subject, would you happen to know how to extract (from a blob) >>a >>>>single string to be placed into the field of another table?? I made the >>>>mistake of importing a text file consisting of more information than I >>>>wanted for the field. Just short of having to delete all 500 records, I >>>>thought I'd see what could be done to move the select string to the >>correct >>>>table and field. >>>> >>>>Any suggestions? >>> >>>Depends. What identifies the string? Position, or content? >>> >>>> >>>> >>>>-----Original Message----- >>>>From: Paul DuBois <paul@snake.net> >>>>To: dwalker <dwalker@healthyproductsplus.com> >>>>Date: Saturday, October 19, 2002 11:45 PM >>>>Subject: Re: [PHP-DB] MySQL Insert Select statement >>>> >>>> >>>>>>said," there is an error in line 1" >>>>> >>>>>That's not too helpful, is it? >>>>> >>>>>I tried both of your statements below and got no error. >>>>>How are you executing these statements? Just typing them as >>>>>shown below into mysql? >>>>> >>>>>> >>>>>> >>>>>> >>>>>>-----Original Message----- >>>>>>From: Paul DuBois <paul@snake.net> >>>>>>To: dwalker <dwalker@healthyproductsplus.com> >>>>>>Date: Saturday, October 19, 2002 11:24 PM >>>>>>Subject: Re: [PHP-DB] MySQL Insert Select statement >>>>>> >>>>>> >>>>>>>>The following represents an example found within the MySQL manual: >>>>>>>> >>>>>>>>INSERT INTO tblTemp2 (fldID) SELECT tblTemp1.fldOrder_ID FROM tblTemp1 >>>>>>WHERE >>>>>>>>tblTemp1.fldOrder_ID > 100; >>>>>>>> >>>>>>>>I tried with out the parenthesis, however, it complained. >>>>>>> >>>>>>>What was the error message? >>>>>>> >>>>>>>> Perhaps I should >>>>>>>>have tried: >>>>>>>> >>>>>>>>INSERT INTO tblTemp2 (fldID) >>>>>>>>SELECT fldOrder_ID >>>>>>>>FROM tblTemp1 >>>>>>>>WHERE fldOrder_ID > 100; >>>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>> >>>>>>Attachment converted: onyx:D Walker.vcf 1 (TEXT/R*ch) (0016229B) >>>>> >>>>> >>>>> >>>> >>>>Attachment converted: onyx:D Walker.vcf 2 (TEXT/R*ch) (001622D1) >>> >>> >>> >> >>Attachment converted: onyx:D Walker.vcf 3 (TEXT/R*ch) (0016240D) > > >

« previous php.general (#120680) next »