Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
w1102157
Yak Posting Veteran
80 Posts |
Posted - 2012-04-04 : 04:44:38
|
| Hi Guys,need help on a task i am doing , i need to know how do i do a query to extract data from a table where the apointment date is greater then the createdate?for example id name address createddate appointmentdate 1 a bb 01/01/2012 01/02/20122 b cc 10/02/2012 05/02/20123 c dd 11/02/2012 01/02/2012 4 d ee 20/02/2012 01/03/2012 from the above the out put would beid name address createddate appointmentdate 1 a bb 01/01/2012 01/02/20124 d ee 20/02/2012 01/03/2012i would be greatful for any help providedthank you |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2012-04-04 : 04:50:13
|
[code]select *from yourtablewhere appointmentdate > createdate[/code] KH[spoiler]Time is always against us[/spoiler] |
 |
|
|
sql-programmers
Posting Yak Master
190 Posts |
Posted - 2012-04-04 : 04:50:32
|
| It may help ..SELECT ID, NAME, ADDRESS, CREATEDDATE, APPOINTMENTDATE FROM TABLE1 WHERE CREATEDDATE < APPOINTMENTDATESQL Server Programmers and Consultantshttp://www.sql-programmers.com/ |
 |
|
|
|
|
|