Results 1 to 3 of 3

Thread: SQLquery Sqlserver -> Access RESOLVED

  1. #1

    Thread Starter
    Frenzied Member oh1mie's Avatar
    Join Date
    Sep 2001
    Location
    Finland
    Posts
    1,043

    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:
    1. 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


  2. #2
    PowerPoster
    Join Date
    Nov 2001
    Location
    Trying to reach and stay in the cloud
    Posts
    2,089
    getdate = now 'in access

    check the DATABASE_NAME and form a query...

  3. #3

    Thread Starter
    Frenzied Member oh1mie's Avatar
    Join Date
    Sep 2001
    Location
    Finland
    Posts
    1,043
    Originally posted by veryjonny
    getdate = now 'in access

    check the DATABASE_NAME and form a query...
    Thanks Veryjonny

    I solved it thisway

    VB Code:
    1. 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
  •  



Click Here to Expand Forum to Full Width