SitePoint Sponsor

User Tag List

Results 1 to 5 of 5

Thread: type mismatch

  1. #1
    SitePoint Wizard dethfire's Avatar
    Join Date
    Aug 2000
    Posts
    2,477
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    type mismatch

    I get an access error of type mismatch, however every field is text, here is my sql

    SELECT clients.* FROM clients LEFT OUTER JOIN description ON clients.userid = description.userid WHERE description.religion='cath'

    any suggestions?
    Free Science Homework Help
    http://www.physicsforums.com

  2. #2
    SQL Consultant gold trophysilver trophybronze trophy
    r937's Avatar
    Join Date
    Jul 2002
    Location
    Toronto, Canada
    Posts
    39,341
    Mentioned
    63 Post(s)
    Tagged
    3 Thread(s)
    cannot answer your mismatch error problem without more info, but from the query itself, it seems like an outer join is not necessary

    are you sure the fields are all text? which client rows exactly are you trying to find?
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL
    "giving out my real stuffs"

  3. #3
    SitePoint Wizard dethfire's Avatar
    Join Date
    Aug 2000
    Posts
    2,477
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by r937
    cannot answer your mismatch error problem without more info, but from the query itself, it seems like an outer join is not necessary

    are you sure the fields are all text? which client rows exactly are you trying to find?
    What other info do you need?

    How would you write the sql statement better?
    Free Science Homework Help
    http://www.physicsforums.com

  4. #4
    SQL Consultant gold trophysilver trophybronze trophy
    r937's Avatar
    Join Date
    Jul 2002
    Location
    Toronto, Canada
    Posts
    39,341
    Mentioned
    63 Post(s)
    Tagged
    3 Thread(s)
    more info for the mismatch error? table layouts (datatypes of each field, especially the religion one)

    the outer join is used to find all clients, whether or not they have matching religion rows, but then you stipulate religion='cath', so an inner join makes more sense

    rudy

  5. #5
    The doctor is in... silver trophy MarcusJT's Avatar
    Join Date
    Jan 2002
    Location
    London
    Posts
    3,509
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Are both userid fields of the same data type?
    And is religion a string?
    MarcusJT
    - former ASP web developer / former SPF "ASP Guru"
    - *very* old blog with some useful ASP code

    - Please think, Google, and search these forums before posting!


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
  •