View Single Post

   
  #5 (permalink)  
Old 02-28-2008, 11:29 AM
Good Man
 
Posts: n/a
Default Re: ON in INNER JOIN depending on AS in CASE, How?

pim@impulzief.nl wrote in
news:1194382124.736645.40970@v29g2000prd.googlegro ups.com:


> In other words I could also ask:
>
> SELECT column1 AS helloHere FROM table1 INNER JOIN table2 ON
> table2.hellotext=helloHere
>
> I want to use the helloHere value to select the row from another
> table.


As far as I know, that cannot be done, the JOIN would have to be "ON
table2.hellotext=table1.column1" because the alias is really only used when
displaying the result - it's not changing the name of the column for the
rest of the query.
Reply With Quote