Click here to Skip to main content
15,893,904 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi

I am currently trying to create a view where a user will be able to look at data,

a Receiving table and a dispatch table

i want to show only show records where the dispatch date is > than the receiving date.
Posted
Comments
Karthik Harve 11-Mar-13 8:12am    
What is a problem ? where you stuck ?
gvprabu 11-Mar-13 8:21am    
Give some samples....
isi19 11-Mar-13 8:30am    
I am not sure how to exclude the dates which the dispatch date < Receiving date.

Select * from ReceivingDatesbyDispatch where (case when???)

1 solution

HINTS:*
Consider a LEFT JOIN of the two tables.
A date comparison can be used to cull the undesired records from the join.

A LEFT JOIN is suggested because it's not clear if all records are always in both tables. The left side of the join would, of course, be the table to which there may/may not be a match (i.e., the primary table). If they're always 1:1, then you can use an inner join.

* Without the schema for the two tables, all I can do is give you a push in the right direction.



.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900