hello.
is there a way which i am able to cast/ convert my substrings into integer?
This is what i have been trying to do, apparently, it does not work.

SELECT campaignmonth

CAST(campaignmonth, substring(campaignmonth,1,1)as Jan)


FROM campaign a;

thanks

You can't cast to Jan. Jan isn't a datatype. Is campaignmonth an integer and you want it to be a string? Use a case statement.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.