Skip to Content
author's profile photo Former Member
Former Member

Cast problem with date on DS Designer

Dear all,

I have a problem of cast in DS Designer in a transform query in the where condition :

columnMonth = (month(sysdate())-1) -> OK

columnMonth is a varchar(2). The database is SQL Server 2008.

Here, it seems that the cast between varchar and integer is implicit but i search to do it :

columnMonth= month(add_months(sysdate(), -1)) -> KO ( no rows returned )

Why is it not casted like previously ??

Do I need to use : columnMonth = cast(month(add_months(sysdate(), -1)),’varchar(02)’) or something like it ?

Best regards,

Michel.

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • author's profile photo Former Member
    Former Member
    Posted on Jan 07, 2014 at 03:35 PM

    Please post your question DS section to get prompt reply.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.