Microsoft
Software
Hardware
Network
Question : SQL Statement. Copy and paste characters from cell into another in same record
The table PartRevisions has the following columns:
(<imrPartID, char(30),>
,<imrPartRevisionID, char(15),>
,<imrPartImageFileName, char(70),>)
At the moment, most of the values in imrPartImageFileName are blank. I would like to copy all the characters from imrPartID (excluding whitespaces) and paste it into the imrPartImageFileName cell and add ‘.jpg’ after it.
Please see image attached it has the first five records already done.
How can I do this with a SQL statement? I would like to check results first with a Select statement before using Update or Insert
Thanks!
partRevisions.gif
(15 KB)
(File Type Details)
partRevisions Table
Answer : SQL Statement. Copy and paste characters from cell into another in same record
sorry I forgot one '
update PartRevisions set imrPartImageFileName = LTRIM(RTRIM(imrPartID)) + '.jpg'
where imrPartImageFileName = ''
Random Solutions
Connect Server Antispam
How to fix corruption of the innodb tables?
How to replace hard drive on Sony VGN-NS240E laptop. PCG-7153L
How do I avoid getting login demands SEVERAL TIMES using .htaccess?
How to find SQL 2000 installation settings ?
Domain Admin Exchange account
How to Schedule to Update the table column in oracle 10g
Lookup table value and assign to text box
WSUS 3.0 SP2 Client Computers are not registering with Windows Update Server
Moving stored procedure from SQL Server 2000 to 2005, multiple table inserts and SCOPE_IDENTITY