Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


UPDATE PART OF DATA


UPDATE PART OF DATA

Author
Message
Neel 7777
Neel 7777
Valued Member
Valued Member (60 reputation)Valued Member (60 reputation)Valued Member (60 reputation)Valued Member (60 reputation)Valued Member (60 reputation)Valued Member (60 reputation)Valued Member (60 reputation)Valued Member (60 reputation)

Group: General Forum Members
Points: 60 Visits: 84
I HAVE A TABLE WITH THREE FIELD

COMCOD SIRCODE SIRDESC
3305 180001 KARIM ENTERPRISE
3305 180002 RAHIM ENTERPRISE
3305 180003 JASON G STORE

DATE TYPES COMCOD nchar(4), SIRCODE nvarchar(6) PRIMARY KEY, SERDESC nvarchar(250).

I LIKE TO UPDATE ONLY SIRCODES TO START WITH 19 WHERE SIRCODE FROM THE LEFT STARTED WITH 18 THAT IS NEW TABLE WILL LOOK LIKE

COMCOD SIRCODE SIRDESC
3305 190001 KARIM ENTERPRISE
3305 190002 RAHIM ENTERPRISE
3305 190003 JASON G STORE
Steven Willis
Steven Willis
Mr or Mrs. 500
Mr or Mrs. 500 (597 reputation)Mr or Mrs. 500 (597 reputation)Mr or Mrs. 500 (597 reputation)Mr or Mrs. 500 (597 reputation)Mr or Mrs. 500 (597 reputation)Mr or Mrs. 500 (597 reputation)Mr or Mrs. 500 (597 reputation)Mr or Mrs. 500 (597 reputation)

Group: General Forum Members
Points: 597 Visits: 1721


SELECT
COMCOD
,STUFF(SIRCODE,1,2,'19') AS SIRCODE
,SIRDESC
FROM
[YourTable]
WHERE
LEFT(SIRCODE,2) = '18'



Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search