Results 1 to 6 of 6

Thread: [RESOLVED] Is there a reason someone would use this in a sql statement.

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Aug 2005
    Location
    Wisconsin
    Posts
    788

    Resolved [RESOLVED] Is there a reason someone would use this in a sql statement.

    Is there a reason someone would use a ^ (caret) in a sql statement? (Microsoft Acccess)

  2. #2
    Addicted Member
    Join Date
    Oct 2008
    Location
    Califorina
    Posts
    235

    Re: Is there a reason someone would use this in a sql statement.

    What does the query look like? The first thing that comes to mind is a bitwise operator.

  3. #3

    Thread Starter
    Fanatic Member
    Join Date
    Aug 2005
    Location
    Wisconsin
    Posts
    788

    Re: Is there a reason someone would use this in a sql statement.

    SELECT * FROM Table WHERE RecordID ^ -1;

  4. #4

    Thread Starter
    Fanatic Member
    Join Date
    Aug 2005
    Location
    Wisconsin
    Posts
    788

    Re: Is there a reason someone would use this in a sql statement.

    When I run this query in Access it returns all the rows in table.

  5. #5
    Super Moderator FunkyDexter's Avatar
    Join Date
    Apr 2005
    Location
    An obscure body in the SK system. The inhabitants call it Earth
    Posts
    7,900

    Re: Is there a reason someone would use this in a sql statement.

    I can't find anything that talks about that exact syntax but ^ as a wildcard means Not In (see here) and as a comparison operator ^= means Not Equals (see here). Those examples are as close as I can find to what you're seeing and I'd guess that in means Not Equals in your case - which would be consistent with the behaviour you're getting.

    As for why someone would choose to use an obscure piece of syntax that nobody else has ever come across without commenting their reason for doing so, my guess would be that they were a small minded idiot who wanted to feel important about themself... just sayin'

    The best argument against democracy is a five minute conversation with the average voter - Winston Churchill

    Hadoop actually sounds more like the way they greet each other in Yorkshire - Inferrd

  6. #6
    Wall Poster TysonLPrice's Avatar
    Join Date
    Sep 2002
    Location
    Columbus, Ohio
    Posts
    3,834

    Re: Is there a reason someone would use this in a sql statement.

    Seems to be related to this post:

    http://www.vbforums.com/showthread.p...L-Statement-do

Posting Permissions

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



Click Here to Expand Forum to Full Width