DTS and Null Values

Hello,

I have a DTS package set up that is doing sevral equations.  I use CASE statements in a sub select and then have to Sum() some of the variables in the outer select (its kinda large and bulky so i dont want to post it unless i have to).

I have some values where part of the equation is Null, thus giving me a Null result, which is desired.  However, when i export the Null value i want something to show up in its place, weather it is a "Null" or a "0" i really don't care, i just dont want the absence of anything (which is what im getting now).

I cant use a case statement in the SQL because i am already Sum()'ing columns for my results.  I have messed around with the "Keep Null Values" option in DTS but weather it is checked or not i get blanks where the Null's are.

I am exporting to a fixed width text file.

Thanks!

-Navicerts
LVL 7
NavicertsAsked:
Who is Participating?
 
adwisemanConnect With a Mentor Commented:
Have you tried using ISNULL(field, 'Null'), if you can't use it in yor SQL, wrap the entire query in a select

Select Field1, ISNULL(Field2, 'Null') as Field2
FROM (Your Query select statement goes here) as tmp
0
 
NavicertsAuthor Commented:
i would be nesting my query for a third time if i did that, wanted to avoid it :(
0
 
Melih SARICAConnect With a Mentor OwnerCommented:
if its not really important to use a fixed length text file.. try to use a delimeter..

0
 
NavicertsAuthor Commented:
fixed length is important unfortunatly
0
 
NavicertsAuthor Commented:
i guess the only way to do it would be to nest it again, thanks for the thoughts guys
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.