R
Randy Harris
Post the SQL for all three queries.
--
Randy Harris
(tech at promail dot com)
--
Randy Harris
(tech at promail dot com)
Samora said:This the 2nd reply after i tried your solution
After made the substituions on the the field names i obtain
an error telling me that there is not a NumDoc on QryExpDet
Query.
I checked twice and it was there.It was the concatenated
field and the NumDoc field in Ascending
There is also something that doesn't match yours
instructions after i save the query
Here it goes ----------------------
My SQL instruction
SELECT info
FROM [select QryExpCab.Texto as Info, "0000" as NumDoc from
QryExpCab
union all
select QryExpDet.Texto as Info, QryExpDet.NumDoc from QryExpDet
union all
select QryExpRod.Texto as Info, "9999" as NumDoc from
QryExpRod]. AS [%$##@_Alias]
ORDER BY Numdoc;
-----------------------------------------------------
As you can see it changes something and returns me an error
on QryExpDet.NumDoc
That i dont know how i am going to do that...
-----Original Message-----
Yes, that is exactly what John recommended. It is probably the best
solution. Without the ORDER BY, you will NOT have control over the order of
the records.
Here is a sample of what such a query might look like:
select Info from (
select QryExpCab.Header as Info, "0000" as Numdoc from QryExpCab
union all
select QryExpDet.Detail as Info, QryExpDet.Numdoc from QryExpDet
union all
select QryExpRod.Footer as Info,"9999" as Numdoc from QryExpRod
) order by Numdoc
This way you will have control over the order of the records. The Detal
records will be in "Numdoc" order.
If this is not what you want, you will have to explain what is wrong with
it. It does not help to simply say it doesn't work. You must explain what
doesn't work.
--
Randy Harris
(tech at promail dot com)
.