Background: Fairly new with SQL Server 2012 but found I'm pretty handy with it. Running 2012 (11.0.2100.60)
On my query, we're attempting to pull meta data for calls to send to a vendor but I can't seem to quote integers. I've read online that this is bad practice and but the suggested method (QUOTENAME(Columnname, '"')) seems to mess up the formatting of the datetime integers column and turns it into "Oct 3 2016 8:59PM" (example) from2016-10-03 20:59:46.000. I think I'm in the right ballpark but am asking the wrong questions. Basically, what I need is to make the second set of datetime to get quoted as is or something relatively similar.
Query:
SQL
SELECTQUOTENAME(CL.recordingFile,'"'),CL.startTimeAScall_date,'"'+outboundNumber+'"'AScustomer_phone_number,REPLACE(USERS.userID,USERS.userID,'"'+USERS.firstName+','+...