Hello all. I am trying to write the code to append data to a table, however, there is some concatenation and formatting involved.
My issue is with the first piece of information. I am trying to create a field entitled "CRMACCT" which will consist of the "[SiteRevised]-[ACCTREVISE
D]" while padding the account revised field with leading zeros and adding a hyphon 3 characters to the right. I am used to the format function in Access which I learning does not apply in SQL server dbs. Any information would be greatly appreciated. Thank you in advance!
declare [SITEREVISED] & "-" & set([ACCTREVISED],"0000000-00") AS CRMACCT, IcomsRawData.SiteID, IcomsRawData.Account, IcomsRawData.[Customer Name], IcomsRawData.[Contact Number], IcomsRawData.[Contact Date], IcomsRawData.[Category Code], IcomsRawData.[SubCategory Code], IcomsRawData.Source, IcomsRawData.Type, IcomsRawData.[Contact Status], IcomsRawData.[Contact UserID], IcomsRawData.Notes INTO ICOMSREVISED