Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 I dont know how to re-locate string

Author  Topic 

wkm1925
Posting Yak Master

207 Posts

Posted - 2010-01-05 : 12:49:15
I've table as follow,

declare @tDay table
(
wDay varchar(7)
)
insert into @tDay values('1011100')
insert into @tDay values('1111000')
insert into @tDay values('0011101')
insert into @tDay values('0011000')
insert into @tDay values('0011101')

wDay is a 7 character. I dont know, to move 1st character to last character. so that, my result as follows,
wDay
-----
0111001
1110001
0111010
0110000
0111010

looking for help

DP978
Constraint Violating Yak Guru

269 Posts

Posted - 2010-01-05 : 12:52:52
Select (Right(wday,6) + left(wday,1)) as newwDay from @tDay
Go to Top of Page

wkm1925
Posting Yak Master

207 Posts

Posted - 2010-01-05 : 23:37:53
tq very much
Go to Top of Page
   

- Advertisement -