July 6, 2017 at 1:24 pm
hello.....
I am trying to achieve a column named ISsytem where i am trying to find the query as expression something like below
Select case when model like '%Mac %' then 0 else 1 end as Issytem
July 6, 2017 at 1:30 pm
Read this: https://docs.microsoft.com/en-us/sql/relational-databases/tables/specify-computed-columns-in-a-table
And it should look like this:
ISsystem AS CASE WHEN model LIKE '%Mac %' THEN 0 ELSE 1 END
July 6, 2017 at 1:33 pm
As I suggested in another, related, thread of yours, use FINDSTRING.
Case expressions in SSIS have the form
Conditional Boolean Test ? [true part] : [false part]
eg:
[Amount] < 300 ? "Low" : "High"
Armed with these bits of info, you should be able to craft your expression.
The absence of evidence is not evidence of absence.
Martin Rees
You can lead a horse to water, but a pencil must be lead.
Stan Laurel
July 6, 2017 at 1:34 pm
Lynn Pettis - Thursday, July 6, 2017 1:30 PMRead this: https://docs.microsoft.com/en-us/sql/relational-databases/tables/specify-computed-columns-in-a-tableAnd it should look like this:
ISsystem AS CASE WHEN model LIKE '%Mac %' THEN 0 ELSE 1 END
My question was to get the "SSIS expression" from the provided tsql query mentioned above.
July 6, 2017 at 1:36 pm
Phil Parkin - Thursday, July 6, 2017 1:33 PM+xkomal145 - Thursday, July 6, 2017 1:24 PMhello.....
I am trying to achieve a column named ISsytem where i am trying to find the query as expression something like below
Select case when model like '%Mac %' then 0 else 1 end as IssytemAs I suggested in another, related, thread of yours, use FINDSTRING.
Case expressions in SSIS have the form
Conditional Boolean Test ? [true part] : [false part]
eg:[Amount] < 300 ? "Low" : "High"
Armed with these bits of info, you should be able to craft your expression.
Thanks for the suggestion in another post for findstring , i was able to create a script component to find the strings. For this i am trying to do derived column for another purpose so got struck with syntax.
July 6, 2017 at 1:45 pm
komal145 - Thursday, July 6, 2017 1:36 PMPhil Parkin - Thursday, July 6, 2017 1:33 PM+xkomal145 - Thursday, July 6, 2017 1:24 PMhello.....
I am trying to achieve a column named ISsytem where i am trying to find the query as expression something like below
Select case when model like '%Mac %' then 0 else 1 end as IssytemAs I suggested in another, related, thread of yours, use FINDSTRING.
Case expressions in SSIS have the form
Conditional Boolean Test ? [true part] : [false part]
eg:[Amount] < 300 ? "Low" : "High"
Armed with these bits of info, you should be able to craft your expression.
Thanks for the suggestion in another post for findstring , i was able to create a script component to find the strings. For this i am trying to do derived column for another purpose so got struck with syntax.
OK, the syntax I used above works in derived columns, so you should be all set.
The absence of evidence is not evidence of absence.
Martin Rees
You can lead a horse to water, but a pencil must be lead.
Stan Laurel
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply