Sunday, December 4, 2011

How would you make an SQL statement about the date?

it wants me to sort by itinerary date and the actual "date" is from the itinerary table. Would it be something like





SELECT Date


FROM Itinerary


ORDER BY Itinerary date





Thanks|||It would be like:





SELECT *


FROM Itinerary


ORDER BY Itinerary_date (Field/Column name containing date) asc/desc (optional)


Date cannot be a field name as it is a Keyword.|||I'm guessing "Itinerary date" and "Date" are actually the same thing, right?





In that case it should be:





SELECT Itinerary date


FROM Itinerary


ORDER BY Itinerary date





add in ASC or DESC if required.

No comments:

Post a Comment