Confused !!!
-
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
-
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
-
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.
-
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.
forget
-
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
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
-
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
Christian Graus wrote: on what basis would they compete in the marketplace ? Performance, support, administration features and tools? Yes, even I am blogging now!
-
Christian Graus wrote: on what basis would they compete in the marketplace ? Performance, support, administration features and tools? Yes, even I am blogging now!
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
-
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
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!
-
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!
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
-
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
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