From: Stephen W. <wei...@gm...> - 2008-05-01 20:45:07
|
True... I come from more of a DB background and love playing with SQL, data integration and reuse and such -getting a bit carried away. On Thu, May 1, 2008 at 3:44 PM, Neil Young <ny...@as...> wrote: > Technically, that WHERE is in a SELECT subquery syntax, not the actual > INSERT syntax. > > Neil > > Stephen Weinberg wrote: > > Side track since the question is answered, but you can use a where > clause > > with insert if you want to select rows from another table (or group of > > tables) and add them to the new table that way. > > > > insert into table_2 (col1, col2, col3) > > select A. B, C > > from table_0 join table_1 on table_0.id = table_1.id > > > > > > > > Stephen > > > > On Thu, May 1, 2008 at 3:02 PM, Neil Rest <Nei...@rc...> wrote: > > > > > >> Does INSERT take a WHERE? A new row wouldn't be qualified by a WHERE > >> clause. > >> If you're updating a record, try UPDATE. > >> > >> > >> At 02:51 PM 5/1/2008, "Roderick Thomas" <tho...@ms...> wrote: > >> > >> > >>> $query_LogRecordNum="INSERT INTO ChangeLog WHERE conuid='$conuid' > >>> AND changedate='$added_reportdate' SET recordnum='$added_recordnum'"; > >>> > >> Neil > >> -- > >> Nei...@rc... > >> > >> If liberty means anything at all, it means the right to tell people > >> what they do not want to hear. > >> -- George Orwell, 1945 > >> > >> > >> > ------------------------------------------------------------------------- > >> This SF.net email is sponsored by the 2008 JavaOne(SM) Conference > >> Don't miss this year's exciting event. There's still time to save $100. > >> Use priority code J8TL2D2. > >> > >> > http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone > >> _______________________________________________ > >> chiPHPug-discuss mailing list > >> chi...@li... > >> https://lists.sourceforge.net/lists/listinfo/chiphpug-discuss > >> > >> > > > ------------------------------------------------------------------------- > > This SF.net email is sponsored by the 2008 JavaOne(SM) Conference > > Don't miss this year's exciting event. There's still time to save $100. > > Use priority code J8TL2D2. > > > http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone > > _______________________________________________ > > chiPHPug-discuss mailing list > > chi...@li... > > https://lists.sourceforge.net/lists/listinfo/chiphpug-discuss > > > > > ------------------------------------------------------------------------- > This SF.net email is sponsored by the 2008 JavaOne(SM) Conference > Don't miss this year's exciting event. There's still time to save $100. > Use priority code J8TL2D2. > > http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone > _______________________________________________ > chiPHPug-discuss mailing list > chi...@li... > https://lists.sourceforge.net/lists/listinfo/chiphpug-discuss > |