|
Posted by v0lcan0 on 10/07/05 00:36
Im trying to cast and integer type to a varchar and then concatenate
two varchar and 01 and convert it into datetime with the following
code:
CONVERT(datetime, { fn CONCAT({ fn CONCAT(CAST(PeriodYear AS varchar),
CAST(PeriodMonth AS varchar)) }, 01) }, 112) AS date
It gives an error saying syntax error converting datetime from
character string.
Any help appreciated!!
thx..
--
Posted using the http://www.dbforumz.com interface, at author's request
Articles individually checked for conformance to usenet standards
Topic URL: http://www.dbforumz.com/General-Discussions-SQL-Convert-function-ftopict261333.html
Visit Topic URL to contact author (reg. req'd). Report abuse: http://www.dbforumz.com/eform.php?p=900084
Navigation:
[Reply to this message]
|