Hello all,
I am working on some queries and having the results e-mailed to various people. The queries work and the e-mails are going through but the Column names are wrong.
Example:
Here is my Query:
SELECT
T0.[DocNum] AS 'Document Number',
T0.[DocStatus] AS 'Document Status',
T0.[CardCode] AS 'Cust Code',
T0.[CardName] AS 'Cust Name',
T0.[NumAtCard] AS 'Cust Ref ',
T0.[DocTotal],
T0.[DocDate] AS 'Posting Date',
T0.[DocDueDate] AS 'Due Date',
T0.[TaxDate] AS 'Document Date',
T1.[firstName] AS 'ISP First Name',
T1.[lastName] AS 'ISP Last Name',
T2.[SlpName] AS 'Outside Sales Person'
FROM OQUT T0 INNER JOIN OHEM T1 ON T0.[OwnerCode] = T1.[empID] INNER JOIN OSLP T2 ON T0.[SlpCode] = T2.[SlpCode]
WHERE T0.[DocDate] > getdate()-7
ORDER BY T2.[SlpName]
The results on screen show the correct column names - see picture. The E-mailed report shows the default field names.
Am I doing something wrong in my query where I am changing the column names? I am just trying to get this fixed so that the end reports are clearer for the recipients.
Thank you,
Keith H