[thelist] subquerry instead of a join

Matt Warden mwarden at gmail.com
Mon May 29 14:51:30 CDT 2006


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Dan Berbece wrote:
> I must rewrite the following querry:
> 
> select * from table2, table1
> where table2.base= table1.base and
> substring(table1.dest, 1, table2.dig_len) =
> table2.digit
> 
> using a subquerry rather than a join. This has prooven
> to be a little tricky for me, since I am kinda' new to
> SQL. :D

That's like saying that walking on water has proven tricky for you,
since you're kind of new to gravity.

It's not possible to write that query without a join.

Any particular reason you've been asked to do this? Maybe we can help
find you a better solution.

- --
Matt Warden
Oxford, OH, USA
http://mattwarden.com


This email proudly and graciously contributes to entropy.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFEe1DCrI3LObhzHRMRAjM7AKDoWbngYHkz9q8LuG6bTpm3TI7lqACeIGUK
mjnmQNsRl7DXwt3t10tdfGs=
=/0Br
-----END PGP SIGNATURE-----



More information about the thelist mailing list