Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2012 Forums
 SSIS and Import/Export (2012)
 Upper

Author  Topic 

rjhe22
Constraint Violating Yak Guru

283 Posts

Posted - 2014-05-13 : 08:43:04
Hi
i want to do something like this but it keeps giving me an error
FINDSTRING(TRIM(UPPER(Group,"Ignis Absolute Return Credit Fund",1) == 0 ))? "IL02" : ""

i need to use upper encase so of the words are lower or some might be upper as well so want them all the same

webfred
Master Smack Fu Yak Hacker

8781 Posts

Posted - 2014-05-13 : 09:54:40
quote:
Originally posted by rjhe22

Hi
i want to do something like this but it keeps giving me an error
FINDSTRING(TRIM(UPPER(Group,"Ignis Absolute Return Credit Fund",1) == 0 ))? "IL02" : ""

i need to use upper encase so of the words are lower or some might be upper as well so want them all the same




You see?


Too old to Rock'n'Roll too young to die.
Go to Top of Page

rjhe22
Constraint Violating Yak Guru

283 Posts

Posted - 2014-05-13 : 10:08:34
thats not the problem in the end

what i need to do is look at one of my columns that come i from falt file look for the words Ignis Absolute Return Government Bond Fund’ in the column.

but i dont think i can use substring as the text in the column comes in like this

Net Asset Value for Ignis Absolute Return Government Bond Fund . Class A GBP
Total Outstanding shares for Ignis Absolute Return Government Bond Fund . Class A GBP



they are diff lengths anyway around this
Go to Top of Page

webfred
Master Smack Fu Yak Hacker

8781 Posts

Posted - 2014-05-13 : 10:16:22
findstring(upper(column),upper("Ignis Absolute Return Credit Fund),1)


Too old to Rock'n'Roll too young to die.
Go to Top of Page

rjhe22
Constraint Violating Yak Guru

283 Posts

Posted - 2014-05-13 : 10:24:35
every row is coming back the same which is wrong when i use this
FINDSTRING(UPPER(Group),UPPER("Ignis Absolute Return Government Bond Fund’"),1) == 0 ? "IL02" : ""

some should be blank as they dont have Ignis Absolute Return Government Bond Fund
Go to Top of Page

webfred
Master Smack Fu Yak Hacker

8781 Posts

Posted - 2014-05-13 : 10:34:12
there is a single quote after Fund?


Too old to Rock'n'Roll too young to die.
Go to Top of Page

rjhe22
Constraint Violating Yak Guru

283 Posts

Posted - 2014-05-13 : 10:38:31
sweet as
thanks very much for the help.
Go to Top of Page

webfred
Master Smack Fu Yak Hacker

8781 Posts

Posted - 2014-05-13 : 10:44:42



Too old to Rock'n'Roll too young to die.
Go to Top of Page

rjhe22
Constraint Violating Yak Guru

283 Posts

Posted - 2014-05-13 : 11:04:21
actuall;y sorry could i ask u something else

if i want to say
FINDSTRING(UPPER(Group),UPPER("Ignis Absolute Return Government Bond Fund’"),1) == 0 ? "IL02" : ""

but then i wanted to add in in same line
FINDSTRING(UPPER(Group),UPPER("Ignis Absolute Return credit Bond Fund’"),1) == 0 ? "IL01" : ""

so basically if its one thing is ilo2 or blank or ilo1 depending on whats it hits
Go to Top of Page
   

- Advertisement -