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
Share on other sites

  • 2 weeks later...
This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.