[RESOLVED] Is there a reason someone would use this in a sql statement.-VBForums
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
    786

    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
    233

    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
    786

    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
    786

    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
    3,329

    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'

    When one of my minions says, "Hey, he's just one guy, what can he do?" I say "This"... and shoot them.

    The problem with putting your lair in a volcano is keeping your robot army from melting.

    I know that the human being and the fish can coexist peacefully - George Bush

  6. #6
    PowerPoster TysonLPrice's Avatar
    Join Date
    Sep 2002
    Location
    Columbus, Ohio
    Posts
    2,321

    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
  •  



Featured


Click Here to Expand Forum to Full Width

Survey posted by VBForums.