Read in Book, looked on line, not sure of the proper syntax.
Issue: appending data in decimal(15,0) into INT field
I am using the DECLARE a local INT variable, and assigning the value into the variable for the append query to work, if this is the best way,
Is the declare syntax like this?
DECLARE @i int
set @i = hdr.CUST_ACCOUNT_ID
INSERT INTO [SG_CRM_SA_HEADERS]
SELECT hdr.ID AS CONTRACTID,
hdr.CONTRACT_NUMBER AS intCONTRACT,
@i
FROM SG_CRM_HDR hdr
or is the syntax like this?
DECLARE @i int
set @i = Select SG_CRM_HDR.CUST_ACCOUNT_ID from SG_CRM_HDR;
INSERT INTO [SG_CRM_SA_HEADERS]
SELECT hdr.ID AS CONTRACTID,
hdr.CONTRACT_NUMBER AS intCONTRACT,
@i
FROM SG_CRM_HDR hdr
or is there another way? format is not currently working. . .
thanks
sportsguy
MS Access 20 years, SQL hack