+ Reply to Thread
Results 1 to 2 of 2

Thread: query problem

  1. #1
    Barn Loyal todd2006 is an unknown quantity at this point todd2006's Avatar
    Join Date
    Mar 2008
    Posts
    889
    Rep Power
    4

    query problem

    Hello,

    I have this query

    Code:
    str="select std.*, stdpay.* from std inner join stdpay on std.id=stdpay.id where stdpay.paymentdate between '1/1/2010' and '3/1/2010'
    
    its gives an error data type mismatch in crietria expression

    paymentdate is a datetime filed in access

    thanks

    todd

  2. #2
    Administrator richyrich is a splendid one to behold richyrich is a splendid one to behold richyrich is a splendid one to behold richyrich is a splendid one to behold richyrich is a splendid one to behold richyrich is a splendid one to behold richyrich is a splendid one to behold richyrich's Avatar
    Join Date
    Mar 2008
    Location
    Somewhere only we know...
    Posts
    3,207
    Blog Entries
    14
    Real Name
    Rich
    Rep Power
    14

    If using Access, I think dates need a # before and after. Something like:-
    Code:
    str="select std.*, stdpay.* from std inner join stdpay on std.id=stdpay.id where stdpay.paymentdate between #1/1/2010# and #3/1/2010#"
    

+ Reply to Thread

Similar Threads

  1. query string value expression problem
    By Centurion in forum SQL Development
    Replies: 4
    Last Post: November 2nd, 2009, 10:51 AM
  2. Query problem
    By todd2006 in forum ASP Development
    Replies: 5
    Last Post: September 12th, 2009, 07:32 AM
  3. Query Problem
    By micky in forum SQL Development
    Replies: 7
    Last Post: June 25th, 2009, 10:31 AM
  4. Query Problem
    By micky in forum SQL Development
    Replies: 2
    Last Post: May 25th, 2009, 05:12 AM
  5. Problem with SQL query code
    By kbarnes in forum SQL Development
    Replies: 17
    Last Post: April 6th, 2009, 10:22 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

SEO by vBSEO