|
-
Oct 5th, 2002, 01:53 AM
#1
Thread Starter
Frenzied Member
SQLquery Sqlserver -> Access RESOLVED
How i should write this sql query, than its work on access also.
I like to have all customers who have started 20 years ago from this year
VB Code:
sSQL="select customername,startdate from customers where DATEDIFF(year, startdate, getdate())>19"
Last edited by oh1mie; Oct 5th, 2002 at 02:57 AM.
oh1mie/Vic

-
Oct 5th, 2002, 02:01 AM
#2
PowerPoster
getdate = now 'in access
check the DATABASE_NAME and form a query...
-
Oct 5th, 2002, 02:57 AM
#3
Thread Starter
Frenzied Member
Originally posted by veryjonny
getdate = now 'in access
check the DATABASE_NAME and form a query...
Thanks Veryjonny
I solved it thisway
VB Code:
sSQL="select customername,startdate from customers where DATEDIFF("yyyy",startdate, now)>19"
I use 95% SQLServer and my memory getting shorter with differences between SQLServer and Access
oh1mie/Vic

Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|