Home » SQL & PL/SQL » SQL & PL/SQL » Update String Concatenation (Oracle 10G, SQL Plus, WINXP 03 SP2)
Update String Concatenation [message #401088] Fri, 01 May 2009 09:11 Go to next message
Jhill
Messages: 1
Registered: May 2009
Location: San Francisco
Junior Member
Hello,

I am wondering what the proper string concatenation (sp?) would be for an update statement to update a new column (BLDG_PHOTO) with the original building number (BLDG_NO) as the first part of the file name. Basically, if the building number is 123, then I want to update the building photo column as 123_1.jpg...

IE:

BLDG_NO BLDG_PHOTO
123 123_1.jpg
456 456_1.jpg

Any suggestions?

Thanks,
Jason
Re: Update String Concatenation [message #401091 is a reply to message #401088] Fri, 01 May 2009 09:17 Go to previous messageGo to next message
BlackSwan
Messages: 25050
Registered: January 2009
Location: SoCal
Senior Member
http://www.lmgtfy.com/?q=oracle+string+concatenation
Re: Update String Concatenation [message #401096 is a reply to message #401088] Fri, 01 May 2009 09:54 Go to previous messageGo to next message
JRowbottom
Messages: 5933
Registered: June 2006
Location: Sunny North Yorkshire, ho...
Senior Member
UPDATE <table> 
SET BLDG_PHOTO = BLDG_NO||'_1.jpg'
 WHERE...
would seem to do the trick.
Re: Update String Concatenation [message #401105 is a reply to message #401096] Fri, 01 May 2009 11:45 Go to previous messageGo to next message
dr.s.raghunathan
Messages: 540
Registered: February 2008
Senior Member
dear JR,

is it such a easy job to load image file directly using set.
I was doing dbms_lop.open / dbms_lob loadfromfile etc for loading the bfile image as some lengthy serial number to insert and update blog column. I was not able to do with the syntax, what you have suggested. I do not know what went wrong with my OracleXE.

yours
dr.s.raghunathan

p.s. assumed bldg_photo is blog

[Updated on: Fri, 01 May 2009 11:47]

Report message to a moderator

Re: Update String Concatenation [message #401107 is a reply to message #401105] Fri, 01 May 2009 12:14 Go to previous message
Michel Cadot
Messages: 64151
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Quote:
is it such a easy job to load image file directly using set.

You misunderstood the statement, it does not load the image, it set the name of the image file.

Regards
Michel
Previous Topic: Inserting data with &
Next Topic: New at Creating Functions
Goto Forum:
  


Current Time: Fri Dec 09 13:38:34 CST 2016

Total time taken to generate the page: 0.10065 seconds