Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
DB Engine
SQL ServerMSDESQL Server CE
Services
Analysis (Data Mining)Analysis (OLAP)DTSIntegration ServicesNotification ServicesReporting Services
Programming
CLRConnectivitySQLXML
Other Technologies
ClusteringEnglish QueryFull-Text SearchReplicationService Broker
General
Data WarehousingPerformanceSecuritySetupSQL Server ToolsOther SQL Server Topics
DirectoryUser Groups
Related Topics
MS AccessOther DB ProductsMS Server Products.NET DevelopmentVB DevelopmentJava DevelopmentMore Topics ...

SQL Server Forum / DB Engine / SQL Server CE / November 2006

Tip: Looking for answers? Try searching our database.

Subquery before FROM

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Teemu - 18 Nov 2006 17:58 GMT
Hello!

This kind of query works well with Access:

SELECT Field1, (SELECT Field2 FROM Table2 WHERE Key=1) AS Field2 FROM Table1

But when I try execute it with SQL Server Everywhere it says "Token in error
= SELECT".

How can I do this kind query with it? I can't use JOIN here, I have to have
subquery before FROM.

I'm sure that my subquery returns only one value so that is not a problem.

-Teemu
Teemu - 18 Nov 2006 18:25 GMT
"Teemu" <tsirkia@hotmail.com> kirjoitti
viestissä:TQH7h.55053$ym5.21939@reader1.news.jippii.net...

> How can I do this kind query with it? I can't use JOIN here, I have to
> have subquery before FROM.

And the reason for this is that my subquery can contain COUNT-function.

-Teemu
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.