Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Data Query 2

Data Query 2

Scheduled Pinned Locked Moved C#
helpdatabase
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    Sean89
    wrote on last edited by
    #1

    I posted something just earlier regarding a similar issue. This isnt something I would normally have trouble with, as this is pretty basic data handling. However, I have another problem :( I am executing the following query: SELECT * FROM Groups WHERE Group = 1 on this table(Group being the primary key):

    Groups:
    Group | In_Stock | On_Order_Short | On_Order_Long | Lead_Time
    1 13 0 0 30
    2 3 0 0 30
    3 6 0 0 21
    4 7 0 0 21
    5 10 0 0 21
    6 1 30 70 30

    It says there is a syntax error in my WHERE clause... It doesn't look like there is an error to me. Can anyone think of something that would be causing this :confused: It seems to only be doing it when I use "Group" in the WHERE clause, any other column it will work fine. Thanks again for any responses ;) -- modified at 22:10 Wednesday 26th April, 2006

    G 1 Reply Last reply
    0
    • S Sean89

      I posted something just earlier regarding a similar issue. This isnt something I would normally have trouble with, as this is pretty basic data handling. However, I have another problem :( I am executing the following query: SELECT * FROM Groups WHERE Group = 1 on this table(Group being the primary key):

      Groups:
      Group | In_Stock | On_Order_Short | On_Order_Long | Lead_Time
      1 13 0 0 30
      2 3 0 0 30
      3 6 0 0 21
      4 7 0 0 21
      5 10 0 0 21
      6 1 30 70 30

      It says there is a syntax error in my WHERE clause... It doesn't look like there is an error to me. Can anyone think of something that would be causing this :confused: It seems to only be doing it when I use "Group" in the WHERE clause, any other column it will work fine. Thanks again for any responses ;) -- modified at 22:10 Wednesday 26th April, 2006

      G Offline
      G Offline
      Gerald Schwab
      wrote on last edited by
      #2

      Group is a sql keyword. Put braces around it it.

      SELECT * FROM Groups WHERE [Group] = 1

      S 1 Reply Last reply
      0
      • G Gerald Schwab

        Group is a sql keyword. Put braces around it it.

        SELECT * FROM Groups WHERE [Group] = 1

        S Offline
        S Offline
        Sean89
        wrote on last edited by
        #3

        I probably should have known that :) Thanks a million!

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups