August 19, 2008 at 2:01 am
I am trying to make the expression work but i have some difficulties and beeing busy for a while with this and now i don't have a clue any more. Someone there can make this work maybe?
getdate() >= (DT_DBTIMESTAMP) (SUBSTRING(Ingangsdatum,1,4) + "-" + SUBSTRING(Ingangsdatum,5,2) + "-" + SUBSTRING(Ingangsdatum,7,2)) & getdate() <= Afloopdatum == "" ? NULL(DT_DBTIMESTAMP) : (DT_DBTIMESTAMP) (SUBSTRING(Afloopdatum,1,4) + "-" + SUBSTRING(Afloopdatum,5,2) + "-" + SUBSTRING(Afloopdatum,7,2)) ?"J" : "N"
The expression is on the derived column name indhuidig and the data type is string.
The error is that the data type dt_bool cannot be used with binary operator ""
:hehe:
August 19, 2008 at 3:11 am
&& instead of &
Cheers,CrispinI can't die, there are too many people who still have to meet me!It's not a bug, SQL just misunderstood me!
August 19, 2008 at 4:50 am
Hi Crispin,
I found it when you use the & SQL uses this one for integer and the && is the logival and.
Thanx
Sjaak
:hehe:
August 19, 2008 at 4:54 am
Most languages & and | are bitwise AND and ORs and && and || are logical.
One that catches me is the == and =
If MyVar = "123" will ALWAYS be true. When skimming code for the problem, this illusive little bugger hides well. :crazy:
Cheers,CrispinI can't die, there are too many people who still have to meet me!It's not a bug, SQL just misunderstood me!
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply