Jean,
Ok, let's try it this way...if you take out the ta. references in the CAST
field does the SQL run or fail?
Bill Anderson
On Wed, Oct 29, 2014 at 7:14 AM, Jean MAURICE jsm.maur...@wanadoo.fr
wrote:
Hi Bill,
this is not an error ! cantine_services and cantine_salles are linked
together
Hi Bill : unknown alias ta !
The Foxil
Le 28/10/2014 22:08, Bill Anderson a écrit :
Jean,
That should fail. The column names would not be available to be used in the
SELECT portion of the clause. If you use the HAVING clause as part of the
join, the column names are available to be used.
The only way I've found to do this is to use an external function, like
this:
CLOSE DATABASES ALL
*!* Source tables have 100 rows of random integers
USE colmin1.dbf
USE colmin2.dbf IN 0
USE colmin3.dbf IN 0
USE colmin4.dbf IN 0
CREATE CURSOR cout (f1 I, f2 I, f3 I, f4 I, minv I)
INSERT INTO
On Wed, Oct 29, 2014 at 7:25 AM, Laurie Alvey trukke...@gmail.com wrote:
The only way I've found to do this is to use an external function, like
this:
CLOSE DATABASES ALL
*!* Source tables have 100 rows of random integers
USE colmin1.dbf
USE colmin2.dbf IN 0
USE colmin3.dbf IN 0
USE
Jean,
I think issue is a flaw in the JOIN. I don't see how ta ties to the rest of
the join.
FROM cantine_services sv ;
INNER JOIN cantine_salles sal ON sv.salle = sal.clef, ;
tarifs_cantine ta ;
WHERE ta.anscol = lcannee INTO CURSOR
I don't see how tarif_cantine (ta)
I did something similar to what steve said, and I basically put all the
data in one merged table and did the following mysql query on it
SELECT V, U, H, MIN(cast(P as decimal)) AS L_SALARY, MAX(cast(P as
decimal)) AS U_SALARY, SUM(T) AS W_COUNT, COUNT(U) AS H_COUNT FROM
`wp_lca_2013` where
Hi Bill,
this is not an error ! cantine_services and cantine_salles are linked together
(it's a school restaurant, pupils are dispached in 4 groups that eat in 2 rooms)
but tarifs_cantine is independant (it's the cost of different menus) and I want
a 'cartesian product' (?) : on line per
today, the simplest way to solve the issueis the ICASEgiven by Paul Hill.
The Foxil
___
Post Messages to: ProFox@leafe.com
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list:
You don't have to make as many comparisons as Paul suggested, make 3
comparisons, then 2 then 1:
SELECT DISTINCT ta.codtarif AS tarif, ;
sv.clef AS clefserv, sv.salle, sv.capacite AS servdispo, sv.libelle AS
service, ;
sal.capacite AS salledispo, sal.libelle AS nomsalle, ;
ta.capacite AS
Jean
If you take out the Disponible field does the query work and produce
accurate results?
Bill Anderson
On Wed, Oct 29, 2014 at 3:39 AM, Jean MAURICE jsm.maur...@wanadoo.fr
wrote:
Hi Bill : unknown alias ta !
The Foxil
Le 28/10/2014 22:08, Bill Anderson a écrit :
Jean,
That should
Yes. For years I have written CAST(O AS Integer) AS disponible in the SQL query
followed by a REPLACE ALL after the query.
The Foxil
Le 29/10/2014 16:21, Bill Anderson a écrit :
Jean
If you take out the Disponible field does the query work and produce
accurate results?
Bill Anderson
I have a curious issue !
In a SQL query, I get 4 numeric fields from 4 tables (with subqueries). I want a
fifth field containing the minimum value of the 4 fields (of the current line).
But when I write MIN(), even in an EVALUATE command, SQL thinks it is a SQL MIN().
Is there a way to
Jean,
I remember submitting a tip to the Foxpro Advisor for this very issue. But
offhand I don't remember what the answer was. I wrote the tip using MAX()
but it applied to MIN() as well.
If someone doesn't come up with the answer in a few hours I'll look into it
further. But there *is* an
On Tue, Oct 28, 2014 at 12:17 PM, Jean MAURICE jsm.maur...@wanadoo.fr
wrote:
I have a curious issue !
In a SQL query, I get 4 numeric fields from 4 tables (with subqueries). I
want a fifth field containing the minimum value of the 4 fields (of the
current line). But when I write MIN(), even
Hi Stephen,
I am getting a single cursor with a lot of columns; 4 of them are numeric and
one more is '000.00 AS minimum'
The Foxil
___
Post Messages to: ProFox@leafe.com
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
On Tue, Oct 28, 2014 at 2:14 PM, Jean MAURICE jsm.maur...@wanadoo.fr
wrote:
Hi Stephen,
I am getting a single cursor with a lot of columns; 4 of them are numeric
and one more is '000.00 AS minimum'
Guessing that you are joining tables to pull the 4 columns.
If instead
On 28 October 2014 17:17, Jean MAURICE jsm.maur...@wanadoo.fr wrote:
I have a curious issue !
In a SQL query, I get 4 numeric fields from 4 tables (with subqueries). I
want a fifth field containing the minimum value of the 4 fields (of the
current line). But when I write MIN(), even in an
Jean,
First, this... (VFP 9 specific)
USE ADDBS(HOME(1)) + [Browser.DBF] SHARED NOUPDATE
SELECT CAST(EVALUATE([MIN(1, 2, 3, 4)]) AS N(7, 2)) AS MinimumTest FROM
Browser INTO CURSOR Test
That shows how to use the VFP MIN() function in a SQL Select while
formatting the MinimumTest field.
So in
I try it at once(I already tried with EVALUATE alone but it failed)
The Foxil
Le 28/10/2014 21:12, Bill Anderson a écrit :
Jean,
First, this... (VFP 9 specific)
USE ADDBS(HOME(1)) + [Browser.DBF] SHARED NOUPDATE
SELECT CAST(EVALUATE([MIN(1, 2, 3, 4)]) AS N(7, 2)) AS MinimumTest FROM
Browser
Hi Bill,
it failed !
here is a small SQL query :
SELECT DISTINCT ta.codtarif AS tarif, ;
sv.clef AS clefserv, sv.salle, sv.capacite AS servdispo, sv.libelle AS
service, ;
sal.capacite AS salledispo, sal.libelle AS nomsalle, ;
ta.capacite AS maxtarif, ta.maxjour AS maxjour, ta.libelle
a little more :
writing the table name instead of local alias avoid the syntax error but the
result is wrong.
SELECT DISTINCT ta.codtarif AS tarif, ;
sv.clef AS clefserv, sv.salle, sv.capacite AS servdispo, sv.libelle AS
service, ;
sal.capacite AS salledispo, sal.libelle AS
Jean,
That should fail. The column names would not be available to be used in the
SELECT portion of the clause. If you use the HAVING clause as part of the
join, the column names are available to be used.
Replace the Disponible field with this and see if it works:
Hi Maurice,
I suspect that using EVALUATE you cannot refererence fields and values from
inside the query,
you can only reference fields and values from the VFP environment before
running the query.
Gianni
On Tue, 28 Oct 2014 21:36:36 +0100, Jean MAURICE jsm.maur...@wanadoo.fr wrote:
a little
23 matches
Mail list logo