sql server - Select all Item From Table Where Order has any Items between dates -
i have orders
table , orderitem
table. select orderitems
have been shipped between 2 dates, , select additional orderitem
of type shipped outside of 2 dates if it's part of order
has orderitems
shipped between 2 dates.
this seemed easy when first thought of it, i'm having hard time putting sql
statement. i'm using sql server
.
edit:
yes, familiar between keyword. have order
, order #10001
. has 2 items, product shipped on 01/20/2015
, warranty marked shipped on 02/04/2015
. when run query:
select * orderitems shipdate between '01/01/2015' , '01/31/2015'
i 1 product, want warranty on order
well.
hope clarifies question.
are familiar between
keyword?
select ... col between ,
if add more information, such sample data question, can elaborate on answer.
Comments
Post a Comment