SitePoint Sponsor

User Tag List

Results 1 to 3 of 3

Thread: sql problem

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

    sql problem

    Code:
    sqlAccounts = "SELECT *.sub, schoolname.schls FROM submissions AS sub LEFT OUTER JOIN schools AS schls ON schoolid.sub = schoolid.schls WHERE schoolid=" + id;
    error:
    Exception Details: System.Data.OleDb.OleDbException: Syntax error (missing operator) in query expression '*.sub'.
    Free Science Homework Help
    http://www.physicsforums.com

  2. #2
    SitePoint Wizard silver trophy redemption's Avatar
    Join Date
    Sep 2001
    Location
    Singapore
    Posts
    5,269
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    What did you mean by *.sub?

    Did you want to get all fields in the sub table? Then it should be sub.*

    EDIT:
    I noticed your join condition has a "schoolid.sub". Did you mean "sub.schoolid" instead? Remember that the syntax is table_name.field_name.

  3. #3
    SitePoint Wizard dethfire's Avatar
    Join Date
    Aug 2000
    Posts
    2,477
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    ah yes, my alias were messed up, thanks
    Free Science Homework Help
    http://www.physicsforums.com


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
  •