Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 8667

Re: [Microsoft][SQL Server Native Client 10.0][SQL Server]Conversion failed when converting date and/or time from character string.  'User-Defined Values' (CSHS)

$
0
0

Dear Sharchar

 

in this example, i insert 5 fields, and select 5 fields for insert.

['+RTRIM(left(convert(char,@tempdate,120),7))+'-Qty'+'] that will come out [2014-01-Qty], that is used as a column name.


The problem is related to how can I pass the value for selection.

(T00.DocDate >= convert(datetime,'+@tempdate+',5)) AND (T00.DocDate <= dateadd(day,-1,(dateadd(month, 1,convert(datetime,'+@tempdate+',5)))))


if I hardcode the date, it doesn't have any problem.


Regards

Edmund


Viewing all articles
Browse latest Browse all 8667

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>