IWETHEY v. 0.3.0 | TODO
1,095 registered users | 0 active users | 0 LpH | Statistics
Login | Create New User
IWETHEY Banner

Welcome to IWETHEY!

New Column Selects

Out of desperation, I finally got a correlated subquery to give me the answer I wanted by putting a select statement into the column list in Oracle (9i I think). I did not know this was possible. I have never seen an example do that. They are always *after* the column specifiers, not inside. How many other vendors allow that?

select a, b, (select.....) x from .... where .....

Is this, rare, unrecommended, or do my books just suck?
________________
New thats just a nested query? standard I would expect
TAM ARIS QUAM ARMIPOTENS
New Fairly standard
Works in Transact-SQL.

select
   a,
   b,
   (select c FROM lookuptable WHERE d = zed.d) x
from datatable zed
where (zed.a = 'cond')

One resource that might be of help is the mimer validator. It allows you to enter a query and test for compliance for [link|http://developer.mimer.com/validator/parser92/|SQL-92], [link|http://developer.mimer.com/validator/parser99/|SQL-99], or [link|http://developer.mimer.com/validator/parser200x/|SQL-200x]. The above query shows as core compliant for SQL-99 and SQL-200x (intermediate compliance on SQL-92).

     Column Selects - (tablizer) - (2)
         thats just a nested query? standard I would expect -NT - (boxley)
         Fairly standard - (ChrisR)

Does this snake smell funny to you?
37 ms