im adding a column to the sequel query called renewaltime that adds 3 years to the table from the time column:
SELECT [Time],
EmployeeName,
BadgeNumber,
Shift,
Department,
Position,
Radio,
Reason,
DATEADD(YEAR, 3, [Time]) AS [RenewalTime]
FROM EarPlug_Tracker
WHERE NOT EmployeeName = '' AND [Time] BETWEEN :start_Time AND :end_Time
ORDER BY Time DESC
in testing it works but in perspective view it does not work.
This problem is usually because the columns.n.field
property does not match the query column name. It should be
columns.8.field : RenewalTime
and capitalisation matters.
Tip: it may be pronounced "sequel" but it's written as "SQL", the initialisation of Structured Query Language. A "sequel table" would be one that follows a previous table. I suggest that you edit your question title and post so that it shows up correctly in search queries.
unfortunately that was not the issue.
Right-click on the columns property, copy and paste here. Format it using the </> button. (See Wiki - how to post code on this forum for more on this.)
Thank you for your assistance but, I figured it out. I had an error when creating the table. I needed a + in front of the 3
SELECT [Time],
EmployeeName,
BadgeNumber,
Shift,
Department,
Position,
Radio,
Reason,
DATEADD(YEAR, +3, [Time]) AS [RenewalTime]
FROM EarPlug_Tracker
WHERE NOT EmployeeName = '' AND [Time] BETWEEN :start_Time AND :end_Time
ORDER BY Time DESC
Good work. That may be SQL engine specific so it might help someone in the future if you state which flavour of SQL you're using (and include it in future questions).
Also, you can mark your post above as the "Solution" so it shows up on the main index as being solved.