Type Conversion of string to number

Database

Type Conversion of string to number

=If([Fiscalyear]) = '1999';'1';If([Fiscalyear]) = '2000';'2';If([Fiscalyear])InList( '2002';'2003');'3')))
i need to convert this number to a string.i defined fiscal year to be a dimension in my requirement.
How CAST can be used in this case??

Shruthi
1 REPLY
Enthusiast

Re: Type Conversion of string to number

your question is not clear to me.
But u can change number to char as below:

select cast('2000' as char(6));
select cast(2000 as char(10));

I think this may help you.