[SQL] search and replace possible on SQL?

2000-11-16 Thread Bruno Boettcher
hello, again fiddling around with SQL... wanted to loop over the Base search for Strings beginning with a sequence and replace that sequence with another one. tryed the following: update journal set description='Add '||(select id description from journal subq where subq.description like '%PS

Re: [SQL] search and replace possible on SQL?

2000-11-16 Thread Jens Hartwig
Hello Bruno, try the following: UPDATE journal SET description = 'Add '||description WHERE description LIKE '%PSF%; Is this what you wanted? Best regards, Jens Hartwig Bruno Boettcher schrieb: > > hello, > > again fiddling around with SQL... > wanted to loop over the Base search for S

RE: [SQL] SELECT FROM t1 WHERE id IN (SELECT id FROM t2 UNION SELECT id FROM t3)

2000-11-16 Thread Gary Farmer
I apologize for the lateness of my reply. I played with your query. Would the following work for you? It outputs both idProduct and name, but you can ignore the name. It gets around the postgres problem with UNIONs in subqueries by moving the UNION to the query, instead: SELECT idProduct

Re: [SQL] fetching rows

2000-11-16 Thread Robert B. Easter
On Monday 30 October 2000 14:02, Jeff Hoffmann wrote: > Nikolay Mijaylov wrote: > > Let say we have a select that returns 100 rows. > > > > I can fetch first 25 with simple sql: > > > > BEGIN WORK; > > DECLARE liahona CURSOR FOR SELECT * FROM films; > > FETCH [FORWARD] 25 IN liahona; > > CLOSE lia

[SQL] delete more than one row

2000-11-16 Thread Astrid Hexsel
Hello All, I have a script that is getting the data from a web form with checkboxes, in the first stage this values are inserted in different rows of a table (thanks to two people from this mailist who helped me !), in the second stage I would like to delete some of the rows of the same table ba