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. Query [modified]

Query [modified]

Scheduled Pinned Locked Moved C#
databasehelp
3 Posts 3 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.
  • N Offline
    N Offline
    Nekshan
    wrote on last edited by
    #1

    i have these data in table 'dealer': dealerid@@@campaignid@@@keyvalue @1@@@@@@@@3@@@@@@@6 @2@@@@@@@@4@@@@@@@3 @3@@@@@@@@2@@@@@@@5 @4@@@@@@@@1@@@@@@@4 @5@@@@@@@@1@@@@@@@2 @6@@@@@@@@2@@@@@@@1 @7@@@@@@@@3@@@@<@NULL@> = NULL is null value in database without the '@'sign between brackets '<','>' and 'NULL' '@' = spacebar,to separate the data. Now i want the dealerid where campaignid = 3 n keyvalue = NULL So, i queried in queryanalyzer of sqlserver2005: SELECT dealerid FROM dealer WHERE (keyvalue = NULL) AND (campaignid = 3) I must get output as 7. But i dont get any output in its output window, neither i am getting any error. Hope to get a reply. regards Nekshan. -- modified at 3:17 Wednesday 4th April, 2007

    C 1 Reply Last reply
    0
    • N Nekshan

      i have these data in table 'dealer': dealerid@@@campaignid@@@keyvalue @1@@@@@@@@3@@@@@@@6 @2@@@@@@@@4@@@@@@@3 @3@@@@@@@@2@@@@@@@5 @4@@@@@@@@1@@@@@@@4 @5@@@@@@@@1@@@@@@@2 @6@@@@@@@@2@@@@@@@1 @7@@@@@@@@3@@@@<@NULL@> = NULL is null value in database without the '@'sign between brackets '<','>' and 'NULL' '@' = spacebar,to separate the data. Now i want the dealerid where campaignid = 3 n keyvalue = NULL So, i queried in queryanalyzer of sqlserver2005: SELECT dealerid FROM dealer WHERE (keyvalue = NULL) AND (campaignid = 3) I must get output as 7. But i dont get any output in its output window, neither i am getting any error. Hope to get a reply. regards Nekshan. -- modified at 3:17 Wednesday 4th April, 2007

      C Offline
      C Offline
      Christian Graus
      wrote on last edited by
      #2

      Your post is illegible. Try keyvalue is null instead of keyvalue = NULL. It's a vagary of SQL, two instances of NULL will not have the same value, so nothing every = NULL.

      Christian Graus - Microsoft MVP - C++ Metal Musings - Rex and my new metal blog "I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )

      J 1 Reply Last reply
      0
      • C Christian Graus

        Your post is illegible. Try keyvalue is null instead of keyvalue = NULL. It's a vagary of SQL, two instances of NULL will not have the same value, so nothing every = NULL.

        Christian Graus - Microsoft MVP - C++ Metal Musings - Rex and my new metal blog "I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )

        J Offline
        J Offline
        joon vh
        wrote on last edited by
        #3

        Christian Graus wrote:

        Your post is illegible.

        I second

        Christian Graus wrote:

        Try keyvalue is null instead of keyvalue = NULL

        This one I also second.

        WHERE keyvalue IS null
        

        should fix your problem.


        Visual Studio can't evaluate this, can you? public object moo { __get { return moo; } __set { moo = value; } }

        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