I'm trying to write a Microsoft SQL Server stored procedure which takes an
account ID, and returns an authentication ticket and whether the ticket is expired.
Something like this:
SELECT Authentication.ticket, Authentication.TicketExpires < getDate() FROM Authentication WHERE Authentication.accountID = @id
The purpose is to return a row with two columns - the ticket, and a bit field (0 or 1) telling me whether the ticket is expired. This bit field isn't part of the table, the
ticketExpires column is
Does anyone know the correct syntax for this?