This seems so simple yet I can't figure it out.
I have a table that has two important columns for this query.
Column A has varchar
Column B is datetime
All I want to do is select any record that is between 5:00 am and
10:00 am regardless of what date it falls under.
In my brain I see
Select *
From <table>
Where B Between Like ‘%5%am' and Like ‘%10%am'
This chokes and I suppose its because Between is literal and Like is
variable.
I cant convert column B to just times because I still need to see the
date in the results of the query.
Thanks in advance for help
I have a table that has two important columns for this query.
Column A has varchar
Column B is datetime
All I want to do is select any record that is between 5:00 am and
10:00 am regardless of what date it falls under.
In my brain I see
Select *
From <table>
Where B Between Like ‘%5%am' and Like ‘%10%am'
This chokes and I suppose its because Between is literal and Like is
variable.
I cant convert column B to just times because I still need to see the
date in the results of the query.
Thanks in advance for help
Comment