Greetings, I'm using SQL 18.12.1
I run my query that assigns new titles to the fields for readability.
I also have a result that is from a CASE WHEN THEN END.
I have a result that collates two fields (first/last name)
I receive my results, which shows the information as I want.
I then 'Save Results As...', choose my file name and location for the CSV.
I open the CSV and see
- Fields that are not in my SQL Results display at all
- Fields that should be as one result but show in separate columns, like 'FirstName' and 'LastName'
- Fields that show appear in my CSV, as they do in me SQL Results, but don't.
I just want WYSIWYG.
Your advice is most appreciated.
General.ErrorLog.ErrorLogID AS 'ID',
General.ErrorLog.WhenOccurred AS 'When',
General.ErrorLog.ErrorMessage AS 'Error Message',
General.ErrorLog.Source,
General.ErrorLog.ApplicationProcedure AS 'Application Procedure',
General.ErrorLog.LastSQL AS 'Last SQL',
CASE
WHEN General.ErrorLog.Workstation = 'DC05951' THEN 'U1-CLL'
WHEN General.ErrorLog.Workstation = 'DC07461' THEN 'U1-CLM'
WHEN General.ErrorLog.Workstation = 'DC07552' THEN 'U1-CLR'
ELSE '--??--' END AS 'Loc',
Security.Users.FirstName + ' ' + Security.Users.LastName AS 'Name'
FROM
General.ErrorLog INNER JOIN
Security.Users ON General.ErrorLog.UserID = Security.Users.UserID
WHERE
General.ErrorLog.WhenOccurred > '04/06/2023' AND
General.ErrorLog.ErrorMessage LIKE '%Timeout%'
ORDER BY
--Found just after the dbo. listings in Tables
General.ErrorLog.WhenOccurred
Picture of SQL Headings:
Picture of CSV Headings: