dbTalk Databases Forums  

TSQL run fine in Query Analyzer But Not in DTS

microsoft.public.sqlserver.dts microsoft.public.sqlserver.dts


Discuss TSQL run fine in Query Analyzer But Not in DTS in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Culam
 
Posts: n/a

Default TSQL run fine in Query Analyzer But Not in DTS - 02-03-2004 , 01:45 PM






Hi,
I used DTS to move data into text. The TSQL codes ran
fine in QA. However when I put it in DTS package, it
truncated some of the fields. My codes contains a lot of
formating.

Ex:
Below query codes will truncate my other date fields
CONVERT(CHAR(12),
REPLICATE(' ', 4) +
SUBSTRING(CONVERT(CHAR(12),cert.[maturity],101),
1, 2) + SUBSTRING(CONVERT(CHAR(12),cert.[maturity],101),
4, 2) + SUBSTRING(CONVERT(CHAR(12),cert.[maturity],101),
7, 4)
) AS [Maturity Date],
CONVERT(CHAR(9), CAST(cert.[rate], DECIMAL(9,3) ) AS
[Interest Rate],

I change code to below:
CONVERT(CHAR(12),
REPLICATE(' ', 4) +
SUBSTRING(CONVERT(CHAR(12),cert.[maturity],101),
1, 2) + SUBSTRING(CONVERT(CHAR(12),cert.[maturity],101),
4, 2) + SUBSTRING(CONVERT(CHAR(12),cert.[maturity],101),
7, 4)
) AS [Maturity Date],
CONVERT(CHAR(9), cert.[rate] ) AS [Interest Rate],

Can anyone help me explain this,
Thanks in Advance,
Culam

Reply With Quote
  #2  
Old   
Russel Loski, MCSD
 
Posts: n/a

Default RE: TSQL run fine in Query Analyzer But Not in DTS - 02-03-2004 , 10:06 PM






Can you send an example of what it looks like when run in QA and what it looks like in DTS?

Russ

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.