Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Database > SQL Language
SQL Language SQL Language discussions not specific to a particular RDBMS program or vendor.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the SQL Language section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old February 1st, 2006, 10:07 AM
Registered User
Join Date: Feb 2006
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Subquery SQLServerCE


I would like to know if there is a way to do a subquery with SQLServerCE (the one for PocketPC)

SELECT IDField, Sum(Value)
   SELECT IDField, Value FROM Table1
   SELECT IDField, Value FROM Table2
) t

It gave me a Parsing Error on the second SELECT... but this query work on SQLServer.

Does anybody have a hint about how to be able to do this query ?


Old February 16th, 2006, 06:36 AM
Friend of Wrox
Join Date: Dec 2005
Posts: 132
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to nalla Send a message via Yahoo to nalla

Hi Jeff,
Yes you can.

SELECT * FROM table WHERE field IN (SELECT field FROM table WHERE field condition)
Please post if you need more help regarding this.

nalaka hewage

Similar Threads
Thread Thread Starter Forum Replies Last Post
Subquery debbiecoates SQL Server 2000 4 June 25th, 2008 03:49 AM
Subquery as table brettk_1 Oracle 1 January 22nd, 2007 02:10 PM
Do i have to use a subquery, if yes then how? code_lover SQL Language 2 January 2nd, 2007 02:22 PM
subquery khansa MySQL 1 February 21st, 2006 02:49 AM
SqlServerCE pponce General .NET 3 September 6th, 2005 02:00 AM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.