troubleshooting Question

Conversion failed when converting date and/or time from character string.

Avatar of JAYDUB
JAYDUB asked on
Microsoft SQL Server
9 Comments2 Solutions870 ViewsLast Modified:
This is my first official question on experts exchange, so please bear with me.  Have a "string" CSV field TRNSDATE that I am importing into SQL DB field that is "datetime" via SIS.  The below  works for a sister company (all database properties, csv properties, etc. appear identical) but give me the above "conversion failed...." error for this one company.  I'm stumped and appreciate suggestions.

insert into partsros([invnum/ponum], partnum, partnumdesc, [tran], tc, trnsdate, qty, ucost, extcost, extsale, counterman, custnum)
select partsrostemp.[invnum/ponum],
partsrostemp.partnum,
partsrostemp.partnumdesc,
partsrostemp.[tran],
partsrostemp.tc,
convert(datetime,partsrostemp.trnsdate),
convert(money,partsrostemp.qty),
convert(money,partsrostemp.ucost),
convert(money,partsrostemp.extcost),
convert(money,partsrostemp.extsale),
partsrostemp.counterman,
partsrostemp.custnum
from partsrostemp
left outer join partsros on partsrostemp.[invnum/ponum] = partsros.[invnum/ponum]
where partsros.[invnum/ponum] is null
ASKER CERTIFIED SOLUTION
TMarkham1

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 2 Answers and 9 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 2 Answers and 9 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros