on 05-06-2013 3:28 PM
I need to split data from one existing columns into two display columns based on a field's data when Left(field,2) <>16 the data needs to be displayed in column A, whereas Left(field,2)=16 needs to be displayed in column B.
I have tried creating two new objects in the universe that use the field as the source data, but have been unable to find a way that lets me do a left() function on the data in this field.
Is there another way to do this that I am missing, or is there a function I can use to do this comparison in the universe?
hi john,
As Yuvraj says is right,
if you are using a variable is string then you have to match with LEFT(field,2)<>"16" or ="16".
if your filed is number then you have to first convert it to string then using left function and then try it out for split column.
Thank You,
Haresh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi John,
The functions available at universe level are specific to the Database you are using.
-- Could you please provide BO version + Database version?
-- Also, can you please update on the DATA TYPE of [field] object as Left function is used on Strings and you are trying to compare it with numeric value i.e. 16.
If [field] is a String then try Left([field],2) <> '16' or ='16' -- passing 16 as string with single codes.
Else try,
CAST (Left([field],2) as number(2)) = 16 -- converting the field to number before comparing.
NOTE: functions used above are specific to teradata database. Please use the similar functions specific to your database.
-- Also try to share error message if any
Hope it will help in some way.
Regards,
Yuvraj
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
In Web Intelligence it's called "Left" function for a string but if you want to the same thing in the universe side, you'll have to use "LTRIM" I imagine.
In universe you have to use Database function and not Web Intelligence function.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Can you please explain with some example on what you are trying to achieve?? Also May I know what is the error that you are getting??
Hope the field is a Character string and not number because I believe Left function can only be used for a String.
And did you try achieving this at the WebI end??
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.