Reply to Scope in derived tables

Your name:

Reply:


Posted by Stephen2 on 06/29/07 11:09

This is kind of what I'm trying to do in my MS SQL 2000 query. Should
I be able to reference s1.col1 inside the 2nd derived table?

I'm getting 'Invalid column name col1' and it's coming from the 2nd
derived table (I've commented out other refs to just it to check).

Maybe I need to use a temp table instead.


SELECT s1.col1,

(SELECT * FROM

(SELECT COUNT(zzz) AS SomeTotal
FROM tab1
WHERE s1.col1 = zzz)) AS RowCount) /* error here */

FROM
(SELECT col1 FROM table) AS s1


Thank you!

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация