I am trying to follow an SSIS tutorial. It is doing a transformation on mainframe data.
It has the statement LTRIM(State) == '' in the Condititonal split editor.
The data type is DT_STR.
Nothing works (dbl quote,brackets, ect)
I have also tried to change the type to DT_WSTR. According to docs ltrim only works with Unicode.
Can someone please tell me how to detect an empty string.
Thanks for any help
walter
Walter_Of_Maggie wrote:
I am trying to follow an SSIS tutorial. It is doing a transformation on mainframe data.
It has the statement LTRIM(State) == '' in the Condititonal split editor.
The data type is DT_STR.
Nothing works (dbl quote,brackets, ect)
I have also tried to change the type to DT_WSTR. According to docs ltrim only works with Unicode.
Can someone please tell me how to detect an empty string.
Thanks for any help
walter
In the conditional split, it'd best be done this way:
TRIM(State) == "" || ISNULL(State)|||
Hello Phil,
That did the trick. The book with the tutorial is Professional SQL Server2005 Integration Services (Wrox)
Is the syntax in the book just flat wrong? LTRIM(State) = '' One article I read said that LTRIM only works with Unicode.
Anyway, thanks for the help
Regards,
Walter
|||They do work with unicode only, but non-unicode gets implicity converted first.LTRIM(State) = "" should work fine as well, unless the data is really NULL, not blank.|||
LTRIM(State) == "" Works now.
It didn't work last night.
I don't know how that.
Maybe it just doesn't work on Tuesday
Anyway, My package is working now. I appreciate your help.
Thanks again
Walter
|||Please mark the appropriate response as the answer to your question.Thanks,
Phil|||
Walter_Of_Maggie wrote:
LTRIM(State) == ""
This is different from what you said on your post at the top of this thread. In there you said (and I've copied and pasted):
LTRIM(State) == ''
Walter_Of_Maggie wrote:
Works now.
It didn't work last night.
I don't know how that.
Maybe it just doesn't work on Tuesday
Anyway, My package is working now. I appreciate your help.
Thanks again
Walter
-Jamie
|||Looks like I made a mistake. I was sure that the book had single quotes (which didn't work) But when I looked with a magnifying glass, they were double quotes.
Nevertheless, I am sure that last night, before I posted, I tried every conceivable syntax, single quotes,double quotes, brackets, even a regex. I got errors on everything.
I'm sorry for the confusion, it works now, that's it.
Thanks for the help
Walter
No comments:
Post a Comment