Re: Interpolation Query...
From: Michel Walsh (vanderghast_at_VirusAreFunnierThanSpam)
Date: 02/06/04
- Next message: Michel Walsh: "Re: DELETE query"
- Previous message: Van T. Dinh: "Re: Question on using the LIKE Condition"
- In reply to: DIOS: "Re: Interpolation Query..."
- Next in thread: DIOS: "Re: Interpolation Query..."
- Reply: DIOS: "Re: Interpolation Query..."
- Messages sorted by: [ date ] [ thread ]
Date: Fri, 6 Feb 2004 06:42:30 -0500
Hi,
You are absolutely right, the four auxiliaries provide the max and the
min. You should add the site condition in those queries AND in the top most
query, just like:
...
FROM ( SELECT x, y, u
FROM xyData
WHERE x IN( SELECT * FROM Qxmin )
AND y IN ( SELECT * FROM Qymin)
AND Site=TheSite ) As a,
Each of these virtual tables,
SELECT x, y, u
FROM xyData
WHERE x IN( SELECT * FROM Qxmin )
AND y IN ( SELECT * FROM Qymin)
AND Site=TheSite
should return just one record. If not, there is probably a duplicated
(Site, x, y) value, but you can still add a DISTINCT:
SELECT DISTINCT x, y, u
FROM xyData
WHERE x IN( SELECT * FROM Qxmin )
AND y IN ( SELECT * FROM Qymin)
AND Site=TheSite
Hoping it may help,
Vanderghast, Access MVP
"DIOS" <sindizzy@softhome.net> wrote in message
news:7d00f3c.0402051432.70256bed@posting.google.com...
> Well Im running some tests that are limited to certain sites and I am
> getting multiple records back. If I do not specicfy the site i get
> even more records back. I follow your interpolation math but the SQL
> query is a little bit over my head and im trying to grasp what its
> doing. The 4 auxiliaries are providing the max and mins for my two
> variables and then my main query will do the interpolation correct?
> Why then do i get multiple records back. They look to be repeated as
> well.
>
> AGP
>
> "Michel Walsh" <vanderghast@VirusAreFunnierThanSpam> wrote in message
news:<egwF00B7DHA.3420@TK2MSFTNGP11.phx.gbl>...
> > Hi,
> >
> > I am glad it worked.
> >
> > Indeed, with ... FROM ( SELECT ... ), this is a known bug... you
have to
> > edit the SQL statement in the SQL view only. If you edit it from the
design
> > view, you are ... done. And that applies only for Jet (the design
interface
> > with MS SQL Server does not have that bug).
> >
> >
> > Vanderghast, Access MVP
> >
> > "DIOS" <sindizzy@softhome.net> wrote in message
> > news:7d00f3c.0402051015.4d158d5a@posting.google.com...
> > > The message is "The Microsoft Jet database engine cannot find the
> > > input table or query 'SELECT x, y, u FROM xyData WHERE x IN( SELECT *
> > > FROM Qxmin ) AND y IN ( SELECT * FROM Qymin)'".
> > >
> > > The SQl take out of the designer is as fllows:
> > > SELECT
> >
0.25*((1-[xi])*(1-[eta])*a.u+(1+[xi])*(1-[eta])*b.u+(1+[xi])*(1+[eta])*c.u+(
> > 1-[xi])*(1+[eta])*d.u)
> > > AS uw, 2*([xw]-a.x)/(b.x-a.x)-1 AS xi, 2*([yw]-a.y)/(d.y-a.y)-1 AS eta
> > > FROM (SELECT x, y, u FROM xyData WHERE x IN( SELECT * FROM Qxmin )
> > > AND y IN ( SELECT * FROM Qymin) ) AS a, (SELECT x, y, u FROM xyData
> > > WHERE x IN( SELECT * FROM Qxmax ) AND y IN ( SELECT * FROM Qymin) )
> > > AS b, (SELECT x, y, u FROM xyData WHERE x IN( SELECT * FROM Qxmax )
> > > AND y IN ( SELECT * FROM Qymax) ) AS c, (SELECT x, y, u FROM xyData
> > > WHERE x IN( SELECT * FROM Qxmin ) AND y IN ( SELECT * FROM Qymax) )
> > > AS d;
> > >
> > > I changed all the square brackets to parenthesis and it worked!!! yet
> > > when I reopen the qury in the designer the brackets are back. So
> > > everytime i edit the query i have to make sure the brackets are
> > > replaced with parenthesis. Weird. let me test some more since im going
> > > to be actually calling the queries through code rather than through
> > > the query designer.
> > >
> > > AGP
> > >
> > >
- Next message: Michel Walsh: "Re: DELETE query"
- Previous message: Van T. Dinh: "Re: Question on using the LIKE Condition"
- In reply to: DIOS: "Re: Interpolation Query..."
- Next in thread: DIOS: "Re: Interpolation Query..."
- Reply: DIOS: "Re: Interpolation Query..."
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|