Click to See Complete Forum and Search --> : Help with Pl/SQL
puneet
07-11-2002, 04:29 PM
Hi
I have a table with 3 columns .
name, type and IP
Is there a way , I can update Name = ' Name' (witha leading space where type =PRINTER.
Regards
stecal
07-11-2002, 04:44 PM
How many places are you going to post this question?
puneet
07-11-2002, 04:50 PM
No more !!
Thanks
stecal
07-11-2002, 04:59 PM
That's okay - I was getting ready to give you five different answers - one for each forum!
puneet
07-11-2002, 06:24 PM
Just for your ref
I have 368 rows with Printers in them .
Regards
stecal
07-11-2002, 07:48 PM
Alrighty then.
Here is one way: use SQL to write SQL for you and spool the output to a file.
select 'update table_name set name = '||chr(39)||chr(32)||name||chr(39)||'
where name = '||chr(39)||name||chr(39)||' and
type = '||chr(39)||'PRINTER'||chr(39)||';' from table_name;
This generates
update table_name set name = ' ATKINS'
where name = 'ATKINS' and
type = 'PRINTER';
How does that work for you?
dba_junior
07-11-2002, 09:03 PM
Sorry to say that...But your quastion is so funy for a site called (DBA SUPPORT)...I Think you are not even related to ORACLE software...dont get offended PLZ..
stecal
07-12-2002, 02:40 PM
Thank you for your contribution, dba_junior. You were more than helpful. I can only hope that my suggestion is up to the lowest standard you have for development.