[AccessD] SQL in-line subquery

Jim DeMarco Jdemarco at hshhp.org
Thu May 8 08:51:52 CDT 2003


A97 generates an error (Syntax error in FROM clause) using the second syntax but not the []. syntax

Jim DeMarco
Director of Product Development
HealthSource/Hudson Health Plan


-----Original Message-----
From: davesharpe2 at cox.net [mailto:davesharpe2 at cox.net]
Sent: Thursday, May 08, 2003 9:41 AM
To: accessd at databaseadvisors.com
Subject: Re: RE: [AccessD] SQL in-line subquery


Charles, I agree. 

One thing I would like to note that I'm not
sure that I see the significance of the
"[ ]. syntax" ( while I agree that it works ).

I get the same results using the following
two queries. ( I regret that my client word-
wrapped the examples )

================================
1 - Using [ ].
SELECT
Count(*) AS DaysUnique
FROM
[SELECT DISTINCT po_date  FROM LAW70_PURCHORDER]. AS subDistinctDays

2 - Using a normal "SubQuery in the From Clause"
SELECT
Count(*) AS DaysUnique
FROM
(SELECT DISTINCT po_date  FROM LAW70_PURCHORDER) AS subDistinctDays

Dave

> 
> From: "Wortz, Charles" <CWortz at tea.state.tx.us>
> Date: 2003/05/08 Thu AM 08:20:49 EDT
> To: <accessd at databaseadvisors.com>
> Subject: RE: [AccessD] SQL in-line subquery
> 
> Dave,
>  
> Nice article, but it does not discuss the specific type of subquery that
> is the subject of the original questioner; namely, the [ ]. syntax for
> subqueries.
>  
> 
> Charles Wortz 
> Software Development Division 
> Texas Education Agency 
> 1701 N. Congress Ave 
> Austin, TX 78701-1494 
> 512-463-9493 
> CWortz at tea.state.tx.us 
> 
> -----Original Message-----
> From: dave sharpe [mailto:davesharpe2 at cox.net] 
> Sent: Wednesday 2003 May 07 21:42
> To: accessd at databaseadvisors.com
> Subject: Re: [AccessD] SQL in-line subquery
> 
> 
> Friends I found this on the subject and thought that
> it might be of benefit to some members of the group.
>  
> http://www.nesug.org/Proceedings/nesug98/dbas/p005.pdf
>  
> Dave
>  
> 
> 	----- Original Message ----- 
> 	From: Wortz, Charles <mailto:CWortz at tea.state.tx.us>  
> 	To: accessd at databaseadvisors.com 
> 	Sent: Wednesday, May 07, 2003 12:45 PM
> 	Subject: RE: [AccessD] SQL in-line subquery
> 
> 	Also, about a year ago this subject was brought up with about
> the same
> 	amount of information documented.
> 	
> 	Charles Wortz
> 	-----Original Message-----
> 	From: Charlotte Foust [mailto:cfoust at infostatsystems.com] 
> 	Sent: Wednesday 2003 May 07 11:16
> 	To: accessd at databaseadvisors.com
> 	Subject: RE: [AccessD] SQL in-line subquery
> 	
> 	But, Gustav, we just created references to it here! <VBG>
> 	
> 	Charlotte Foust
> 	
> 	-----Original Message-----
> 	From: Gustav Brock [mailto:gustav at cactus.dk] 
> 	Sent: Tuesday, May 06, 2003 11:51 PM
> 	To: accessd at databaseadvisors.com
> 	Subject: Re: [AccessD] SQL in-line subquery
> 	
> 	
> 	Hi Charlotte
> 	
> 	> ..  If you ever find it in help, for goodness sake, post the
> reference
> 	
> 	> here!
> 	
> 	I would say: if you ever find any reference to this, post it
> here.
> 	
> 	/gustav
> 	_______________________________________________
> 	AccessD mailing list
> 	AccessD at databaseadvisors.com
> 	http://databaseadvisors.com/mailman/listinfo/accessd
> 	Website: http://www.databaseadvisors.com
> 	
> 
> 
> _______________________________________________
> AccessD mailing list
> AccessD at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com
> 
> 


***********************************************************************************
"This electronic message is intended to be for the use only of the named recipient, and may contain information from Hudson Health Plan (HHP) that is confidential or privileged.  If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or use of the contents of this message is strictly prohibited.  If you have received this message in error or are not the named recipient, please notify us immediately, either by contacting the sender at the electronic mail address noted above or calling HHP at (914) 631-1611. If you are not the intended recipient, please do not forward this email to anyone, and delete and destroy all copies of this message.  Thank You".
***********************************************************************************



More information about the AccessD mailing list