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. The Lounge
  3. Confused !!!

Confused !!!

Scheduled Pinned Locked Moved The Lounge
questiondatabasesysadminhelptutorial
10 Posts 6 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.
  • D Offline
    D Offline
    denniskang2004
    wrote on last edited by
    #1

    When I read the book "teach yourself SQL in 21 days", day 7, first example:: SELECT * FROM TABLE1 WHERE TABLE1.SOMECOLUMN = (SELECT SOMEOTHERCOLUMN FROM TABLE2 WHERE SOMEOTHERCOLUMN = SOMEVALUE) When I tried this subquery, it doesn't work in SQL-server 2000 at all ! After that I searched online, then found that I have to use "IN" instead of "=" to express the subquery. I am confused ! Why the book writes like that? Is this an old SQL ? SQL is supposed to be universal, why I cannot use above example in SQL2000? I also found some other places which is not wworking in Sql-server 2000 environment. Please help me on this silly question. Thanks Dennis

    Y C 2 Replies Last reply
    0
    • D denniskang2004

      When I read the book "teach yourself SQL in 21 days", day 7, first example:: SELECT * FROM TABLE1 WHERE TABLE1.SOMECOLUMN = (SELECT SOMEOTHERCOLUMN FROM TABLE2 WHERE SOMEOTHERCOLUMN = SOMEVALUE) When I tried this subquery, it doesn't work in SQL-server 2000 at all ! After that I searched online, then found that I have to use "IN" instead of "=" to express the subquery. I am confused ! Why the book writes like that? Is this an old SQL ? SQL is supposed to be universal, why I cannot use above example in SQL2000? I also found some other places which is not wworking in Sql-server 2000 environment. Please help me on this silly question. Thanks Dennis

      Y Offline
      Y Offline
      Yulianto
      wrote on last edited by
      #2

      When the subquery returns more than 1 result, you have to use "IN". You can use "=", when the subquery returns 1 result.


      Work hard and a bit of luck is the key to success.

      You don`t need to be genius, to be rich.

      Y 1 Reply Last reply
      0
      • Y Yulianto

        When the subquery returns more than 1 result, you have to use "IN". You can use "=", when the subquery returns 1 result.


        Work hard and a bit of luck is the key to success.

        You don`t need to be genius, to be rich.

        Y Offline
        Y Offline
        Yulianto
        wrote on last edited by
        #3

        Next time post your question in the right forum:)


        Work hard and a bit of luck is the key to success.

        You don`t need to be genius, to be rich.

        D 1 Reply Last reply
        0
        • Y Yulianto

          Next time post your question in the right forum:)


          Work hard and a bit of luck is the key to success.

          You don`t need to be genius, to be rich.

          D Offline
          D Offline
          denniskang2004
          wrote on last edited by
          #4

          forget

          1 Reply Last reply
          0
          • D denniskang2004

            When I read the book "teach yourself SQL in 21 days", day 7, first example:: SELECT * FROM TABLE1 WHERE TABLE1.SOMECOLUMN = (SELECT SOMEOTHERCOLUMN FROM TABLE2 WHERE SOMEOTHERCOLUMN = SOMEVALUE) When I tried this subquery, it doesn't work in SQL-server 2000 at all ! After that I searched online, then found that I have to use "IN" instead of "=" to express the subquery. I am confused ! Why the book writes like that? Is this an old SQL ? SQL is supposed to be universal, why I cannot use above example in SQL2000? I also found some other places which is not wworking in Sql-server 2000 environment. Please help me on this silly question. Thanks Dennis

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

            denniskang2004 wrote: SQL is supposed to be universal, why I cannot use above example in SQL2000? ROTFL. Well, in an ideal world..... Any decent beginner SQL book will cover the major dialects, and explain the differences to you. All implimentations differ. If they didn't, on what basis would they compete in the marketplace ? Christian I have several lifelong friends that are New Yorkers but I have always gravitated toward the weirdo's. - Richard Stringer

            D 1 Reply Last reply
            0
            • C Christian Graus

              denniskang2004 wrote: SQL is supposed to be universal, why I cannot use above example in SQL2000? ROTFL. Well, in an ideal world..... Any decent beginner SQL book will cover the major dialects, and explain the differences to you. All implimentations differ. If they didn't, on what basis would they compete in the marketplace ? Christian I have several lifelong friends that are New Yorkers but I have always gravitated toward the weirdo's. - Richard Stringer

              D Offline
              D Offline
              Daniel Turini
              wrote on last edited by
              #6

              Christian Graus wrote: on what basis would they compete in the marketplace ? Performance, support, administration features and tools? Yes, even I am blogging now!

              A 1 Reply Last reply
              0
              • D Daniel Turini

                Christian Graus wrote: on what basis would they compete in the marketplace ? Performance, support, administration features and tools? Yes, even I am blogging now!

                A Offline
                A Offline
                Andy Brummer
                wrote on last edited by
                #7

                Yes, but where is the vendor lock-in?


                I can imagine the sinking feeling one would have after ordering my book, only to find a laughably ridiculous theory with demented logic once the book arrives - Mark McCutcheon

                D 1 Reply Last reply
                0
                • A Andy Brummer

                  Yes, but where is the vendor lock-in?


                  I can imagine the sinking feeling one would have after ordering my book, only to find a laughably ridiculous theory with demented logic once the book arrives - Mark McCutcheon

                  D Offline
                  D Offline
                  Daniel Turini
                  wrote on last edited by
                  #8

                  andy brummer wrote: Yes, but where is the vendor lock-in? Customer satisfaction is the ultimate vendor lock-in. Yes, even I am blogging now!

                  C 1 Reply Last reply
                  0
                  • D Daniel Turini

                    andy brummer wrote: Yes, but where is the vendor lock-in? Customer satisfaction is the ultimate vendor lock-in. Yes, even I am blogging now!

                    C Offline
                    C Offline
                    Colin Angus Mackay
                    wrote on last edited by
                    #9

                    Daniel Turini wrote: Customer satisfaction is the ultimate vendor lock-in Not really - a change of management at the client could change the political landscape and a new vendor is sought for no good reason than the new management want to assert their power.


                    Do you want to know more? WDevs.com - Open Source Code Hosting, Blogs, FTP, Mail and Forums

                    C 1 Reply Last reply
                    0
                    • C Colin Angus Mackay

                      Daniel Turini wrote: Customer satisfaction is the ultimate vendor lock-in Not really - a change of management at the client could change the political landscape and a new vendor is sought for no good reason than the new management want to assert their power.


                      Do you want to know more? WDevs.com - Open Source Code Hosting, Blogs, FTP, Mail and Forums

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

                      Yeah - it happens in every field. New management want to prove they are better than the old, so they start to change anything they can. Christian I have several lifelong friends that are New Yorkers but I have always gravitated toward the weirdo's. - Richard Stringer

                      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