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 |
reddymade
Posting Yak Master
165 Posts |
Posted - 2006-06-02 : 16:09:24
|
I have the following select query, the two fields i am concatenating.the first one is a real(4) datatype and the second one is varchar.i want to concatenate both with varchar.************************************************************SELECT SequenceNO + ' - ' + englishtextfrom TAB_ccsNetRF rf, TAB_ccsNetModuleLinks link, TAB_ccsNetPickLists pick where link.LinkModuleRecordID = @ModuleID and link.LinkModuleName = 'CN' and link.ModuleRecordID = rf.rfid and link.ModuleName = 'RF' and rf.rftype= pick.pickid and pick.fieldlabelkey = 'lblrftype'***********************************************************Thank you very much for the info. |
|
sanjnep
Posting Yak Master
191 Posts |
Posted - 2006-06-02 : 16:44:27
|
SELECT CAST(SequenceNO AS VARCHAR(20)) + ' - ' + englishtextfrom TAB_ccsNetRF rf, TAB_ccsNetModuleLinks link, TAB_ccsNetPickLists pick where link.LinkModuleRecordID = @ModuleID and link.LinkModuleName = 'CN' and link.ModuleRecordID = rf.rfid and link.ModuleName = 'RF' and rf.rftype= pick.pickid and pick.fieldlabelkey = 'lblrftype'Sanjeev Shrestha12/17/1963 |
|
|
RyanRandall
Master Smack Fu Yak Hacker
1074 Posts |
Posted - 2006-06-05 : 06:30:32
|
Or (if you want to avoid representations like '3.3E+8')...SELECT ltrim(str(SequenceNO, 20))) + ' - ' + englishtextfrom TAB_ccsNetRF rf, TAB_ccsNetModuleLinks link, TAB_ccsNetPickLists pick where link.LinkModuleRecordID = @ModuleID and link.LinkModuleName = 'CN' and link.ModuleRecordID = rf.rfid and link.ModuleName = 'RF' and rf.rftype= pick.pickid and pick.fieldlabelkey = 'lblrftype' Ryan Randallwww.monsoonmalabar.com London-based IT consultancy Solutions are easy. Understanding the problem, now, that's the hard part. |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2006-06-05 : 07:01:45
|
Why do you want to concatenate?If you use front end application, do concatenation thereMadhivananFailing to plan is Planning to fail |
|
|
|
|
|