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 |
peace
Constraint Violating Yak Guru
420 Posts |
Posted - 2013-10-18 : 05:09:32
|
i have this data:BookedID Booked_Date114199636 2013-01-09 14:55:21.740would like to get the output into txt format with delimited in between columns.i tried this but getting this error: Error converting data type varchar to bigint.select BookedID+'|'+Booked_Date from tableA |
|
bandi
Master Smack Fu Yak Hacker
2242 Posts |
Posted - 2013-10-18 : 05:16:20
|
select CAST( BookedID AS VARCHAR(20))+'|'+Booked_Date from tableA--Chandu |
 |
|
peace
Constraint Violating Yak Guru
420 Posts |
Posted - 2013-10-18 : 05:21:20
|
still getting the error |
 |
|
bandi
Master Smack Fu Yak Hacker
2242 Posts |
Posted - 2013-10-18 : 05:35:52
|
what are the datatypes og BookedID and Booked_Date--Chandu |
 |
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2013-10-18 : 08:02:34
|
would like to get the output into txt format with delimited in between columns.for that you can use export import wizard or bcp with format file------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/https://www.facebook.com/VmBlogs |
 |
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2013-10-19 : 10:18:30
|
quote: Originally posted by bandi select CAST( BookedID AS VARCHAR(20))+'|'+Booked_Date from tableA--Chandu
You need to convert booked_date into varchar too. But Visakh's suggestion is the way to goMadhivananFailing to plan is Planning to fail |
 |
|
|
|
|