P
Phil Burns
This should be simple, but I'm stuck and need help.
Placing orders on a database, the date of order creation
is automatically added - in dd/mm/yyyy format. Users can
use this as a select criteria to produce despatch notes,
receipts etc. That all works fine.
We want to add to the despatch note a variable message,
depending on the month eg for all orders received in
January, the message would be "Happy New Year" etc.
I'm starting from having a two column table - months and
messages - separate from everything else, so it can be
managed through a form. How can I get my query to retrieve
the appropriate message from the table?
I expect it will be something like
SELECT Orders.OrderDate, Months.message, Orders.OrderDate
FROM Orders INNER JOIN Months ON Orders.OrderDate =
datepart mm
??
Can anyone help me get the right select statement pls?
Placing orders on a database, the date of order creation
is automatically added - in dd/mm/yyyy format. Users can
use this as a select criteria to produce despatch notes,
receipts etc. That all works fine.
We want to add to the despatch note a variable message,
depending on the month eg for all orders received in
January, the message would be "Happy New Year" etc.
I'm starting from having a two column table - months and
messages - separate from everything else, so it can be
managed through a form. How can I get my query to retrieve
the appropriate message from the table?
I expect it will be something like
SELECT Orders.OrderDate, Months.message, Orders.OrderDate
FROM Orders INNER JOIN Months ON Orders.OrderDate =
datepart mm
??
Can anyone help me get the right select statement pls?