using isnull condition on datetime column
hello,
I need to use isnull on a column in precedence constraints with datatype datetime,
when isnull is false there is no problem package is running fine but
even though isnull is true it is taking some default date running in different
condition path.
Can any one please tell me how to test this null values in datetime column
using isnull???????
thanks
Sasi.
December 15th, 2010 5:53pm
thanks for reply but I am sorry I forgot to mention that I need to use it in precedence constraints,
as a condition.
thanks
Sasi.
Free Windows Admin Tool Kit Click here and download it now
December 15th, 2010 7:57pm
Hello Developer IQ,
I need to use it in precedence constraints as a condition.
Can you help me in this regard
thanks
Sasi.
December 15th, 2010 7:59pm
there is no Precedence Constraint in data flow,
if you mean green/red arrows in data flow they named "data path"
and you can not put condition on data path, but you can use Conditional Split transformation to put condition on data stream and direct rows to specific data paths.
for example if you want to fetch only not null values in the myDate column and direct them to destination, you can add a Conditional Split Transform, and write this expression:
!ISNULL(myDate)
then set output name as NotNullOutput
then connect this output from conditional split transform to destination.
http://www.rad.pasfu.com
Free Windows Admin Tool Kit Click here and download it now
December 16th, 2010 12:22am
hello Reza,
thanks for reply, I am using precedence constraints in control flow, I need to take one path if there is any date if its null then other path in control flow it self, this is just to skip running unwanted
package. here my problem is even though upcoming value is null (its a date )its taking some default date and taking wrong path..........
hopes now its clear I think
thanks
Sasi.
December 16th, 2010 9:28am
You should use conditional split in this case and evaluate rows based on that. It will be a simple split with a condition ISNULL(Date) == TRUE. Let me know if you need more help with this.
Free Windows Admin Tool Kit Click here and download it now
December 16th, 2010 11:59am
hello DeveloperIQ,
yes please, that is my problem, when there is any date it is taking right(1st) path, even if there is NULL value
instead of taking other(2nd) path by taking some default date(like 01/01/1900) its taking wrong path(1st path). please help me in this regard
thanks
Sasi.
December 16th, 2010 1:58pm
What I am suggesting is that instead of using precedence constraints, please use conditional split transformation. And make sure your date is in Dattime format. It works just fine for me when I do both of these.
If it doesnt for you, please give me more details on what is your data types and where exactly do you have the precendence constraints set at?
Free Windows Admin Tool Kit Click here and download it now
December 16th, 2010 2:25pm