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.
| Author |
Topic |
|
shanmugaraj
Posting Yak Master
219 Posts |
Posted - 2012-01-08 : 16:35:43
|
| Remove the 0 beforeHI,I need the query for belowI have data from flat file and i want to save the code column without 0 beforecolumnscode nvarchar(7) name nvarchar(40)----------flat file----------EmpCode name003 Raj048 Kumar073 selvam100 gopal140 gomathiT3R NayakiYEU YasodhaOPE Easwari063 RaniI want to insert removing 0 before code column----------SQL Insert----------EmpCode Name3 Raj48 Kumar73 selvam100 gopal140 gomathiT3R NayakiYEU YasodhaOPE Easwari63 RaniKindly help me with queryI tried below and not working :( LTRIM(EmpCode,'0'); (CAST (CAST EmpCode AS int) AS varchar(7)) THANKSSHANMUGARAJnshanmugaraj@gmail.com |
|
|
GilaMonster
Master Smack Fu Yak Hacker
4507 Posts |
Posted - 2012-01-08 : 16:52:52
|
| Duplicate post. No replies to this thread please. Direct replies to:[url]http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=169940[/url]--Gail ShawSQL Server MVP |
 |
|
|
|
|
|