Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
UGSCU-G
QUSJIE-G
when field values are like this if i want to omit the '-G' just to get
UGSCU
QUSJIE
????
Left(FIELDNAME, index(FIELDNAME,'-',1)-1) as FIELDNAME
If you always want to remove every instance of '-G', then you can just use:
Replace(FIELDNAME, '-G', '') as FIELDNAME
sorry not to mention that there are also other values as
KSIJED-M
OQKDL-C
by using above condition replace i can eliminate -G but how about '-M' & '-C' from the field values??
Well, if the '-G/M/C' is always at the end of the string, it might be easier to just pick everything on the left of the first '-'. Something along these lines:
Left(FIELDNAME, index(FIELDNAME,'-',1)) as FIELDNAME
THE ABOVE EXPRESSION RETURNs the values with ending '-' as
KSIJED-
OQKDL-
UGSCU-
QUSJIE-
i tried to change the position number still the same outcome??
Left(FIELDNAME, index(FIELDNAME,'-',1)-1) as FIELDNAME
THANKS JOHN.
Hi
this is good
but if we have different symbols in the values
then how we use this expr
like _,-,&,#,@
this type of special characters how to remove this
all in one field values
If you're only looking to remove certain characters, use the function PurgeChar()
Hi
thanks
purgechar()
it give all values without symbols
but i need to trim from that special character onwords
like above exm
Left(FIELDNAME, index(FIELDNAME,'-',1)-1) as FIELDNAME
here how to use multiple symbols