Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Data Bases > Informix > Re: what is the...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 17 of 17 Topic 14213 of 15119
Post > Topic >>

Re: what is the syntax error in this code?its a small code

by bozon <curtis@[EMAIL PROTECTED] > Jul 1, 2008 at 02:12 PM

On Jun 22, 1:52=A0pm, "Art Kagel" <art.ka...@[EMAIL PROTECTED]
> wrote:
> IDS 10.00 does NOT sup****t derived tables (ie a select in the FROM
clause
> acting as a table). =A0That syntax is first sup****ted in IDS 11.10.
=A0Yo=
u can
> unwind this to a simple query as:
>
> SELECT =A0 =A0 loc.location, loc.code, acc.descr, count(loc.reqd_for) AS
> CountReqdfor
> FROM =A0 =A0 =A0informix.loc_accessorials loc, informix.accessorial acc
> WHERE =A0 =A0loc.code=3Dacc.code =A0AND loc.code =3D '1018'
> GROUP BY loc.location, loc.code, acc.desc;
>
> It is VERY rare that you cannot turn a derived table reference into a
sim=
ple
> query or join. =A0The most common case where you cannot is when you need
=
to
> perform other operations on the results of an aggregation. =A0In those
ca=
ses,
> Informix provides temp tables, which is really how derived tables are
> implemented when they cannot be folded automatically by the engine into
a
> simpler query (IDS 11.50 tries to do that for you).
>
> Art
>
> On Fri, Jun 20, 2008 at 9:57 AM, saad_tariq via DBMonster.com <
>
> u43...@[EMAIL PROTECTED]
> wrote:
> > SELECT =A0 exp.*
> > FROM =A0 =A0 (SELECT =A0 loc.location, loc.code, acc.descr,
count(loc.r=
eqd_for)
> > AS
> > CountReqdfor
> > FROM =A0 =A0 =A0informix.loc_accessorials loc, informix.accessorial
acc
> > WHERE =A0 =A0loc.code=3Dacc.code =A0AND loc.code =3D '1018'
> > GROUP BY loc.location, loc.code, acc.descr) exp
>
> --
> Art S. Kagel
> Oninit (www.oninit.com)
> IIUG Board of Directors (a...@[EMAIL PROTECTED]
)
>
> Disclaimer: Please keep in mind that my own opinions are my own opinions
=
and
> do not reflect on my employer, Oninit, the IIUG, nor any other
organizati=
on
> with which I am associated either explicitly or implicitly. Neither do
th=
ose
> opinions reflect those of other individuals affiliated with any entity
wi=
th
> which I am affiliated nor those of the entities themselves.

I completely concur I think if you search for derived tables in this
news group I have several rants on the subject that should just be
referenced in the future. ;-)
Here is one:
http://groups.google.com/group/comp.databases.informix/browse_thread/thread=
/5fa50a300d9b6e59/e1d9624e38bf9a67?lnk=3Dgst&q=3Dderived+tables#e1d9624e38b=
f9a67
 




 17 Posts in Topic:
what is the syntax error in this code?its a small code
"saad_tariq via DBMo  2008-06-20 13:57:31 
Re: what is the syntax error in this code?its a small code
Serge Rielau <srielau@  2008-06-20 10:17:21 
Re: what is the syntax error in this code?its a small code
"saad_tariq via DBMo  2008-06-20 14:37:45 
Re: what is the syntax error in this code?its a small code
RedGrittyBrick <RedGri  2008-06-20 15:45:49 
Re: what is the syntax error in this code?its a small code
"saad_tariq via DBMo  2008-06-20 14:59:40 
Re: what is the syntax error in this code?its a small code
TBP <thebigpotato@[EMA  2008-06-20 16:07:19 
Re: what is the syntax error in this code?its a small code
"saad_tariq via DBMo  2008-06-20 15:16:50 
Re: what is the syntax error in this code?its a small code
RedGrittyBrick <RedGri  2008-06-20 16:16:42 
Re: what is the syntax error in this code?its a small code
"saad_tariq via DBMo  2008-06-20 15:24:20 
Re: what is the syntax error in this code?its a small code
"saad_tariq via DBMo  2008-06-20 15:27:21 
Re: what is the syntax error in this code?its a small code
"saad_tariq via DBMo  2008-06-20 15:30:11 
Re: what is the syntax error in this code?its a small code
"Kevin Cherkauer&quo  2008-06-20 12:38:53 
Re: what is the syntax error in this code?its a small code
dcruncher4@[EMAIL PROTECT  2008-06-20 09:38:47 
Re: what is the syntax error in this code?its a small code
"saad_tariq via DBMo  2008-06-20 19:36:31 
Re: what is the syntax error in this code?its a small code
Nilesh Ozarkar <nilesh  2008-06-20 14:55:07 
Re: what is the syntax error in this code?its a small code
"Art Kagel" <  2008-06-22 13:52:42 
Re: what is the syntax error in this code?its a small code
bozon <curtis@[EMAIL P  2008-07-01 14:12:01 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Tue Dec 2 23:51:00 CST 2008.