SQL and WHERE Question?

Results 1 to 3 of 3

Thread: SQL and WHERE Question?

  1. #1
    Join Date
    Dec 1969

    Default SQL and WHERE Question?

    I just figured this out...but how come when I do a select WHERE<BR>id=&#039;14&#039; it fails and if I change that to id=14 it works?<BR><BR>Does it have something to do with a number?<BR><BR>Thanks,<BR><BR>Chris

  2. #2
    Join Date
    Dec 1969

    Default RE: SQL and WHERE Question?

    Putting the single quotes around it is indicating that it&#039;s not a numeric field...such as a text or character filed. Without the quotes it&#039;s interpreted as a numeric field.

  3. #3
    Join Date
    Dec 1969

    Default He means value, not field...

    13 is a numeric value.<BR><BR>&#039;13&#039; is a *text* value.<BR><BR>You (generally) can&#039;t store a text value to a numeric field or vice versa.<BR><BR>You (generally) can&#039;t store a text value into a numeric field or vice versa.<BR><BR>I say "generally" because some database engines are getting "sloppier" about this and allowing some implicit conversions that they didn&#039;t allow in prior versions. Probably just to eliminate newcomers asking these questions?<BR><BR><BR><BR>

Posting Permissions

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