Jump to content

[SOLVED] Select statement help needed


deanes02

Recommended Posts

select * from mytable WHERE JobRef BETWEEN '2007-05-01' AND '2007-05-06' ORDER BY JobRef

 

This is the statement I would like to use (or something similar).  It is trying to find Jobs between two dates.  The problem is the column JobRef is actually in the form AR2007-05-04 and EX2007-05-05 etc.  Can I get the select statement to ignore the first 2 characters of the column (preferred)?  Or do I have to create a new column with just the date and do the search on the date range on that (hopefully not)? Or some other solution?

 

Thanks for your help,

 

S

Link to comment
https://forums.phpfreaks.com/topic/60968-solved-select-statement-help-needed/
Share on other sites

  • 2 weeks later...

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.