Subject | Re: [IBO] TIB_Grid, add rows manually |
---|---|
Author | Markus Ostenried |
Post date | 2002-06-25T00:10:31Z |
At 21:23 Monday, 24.06.2002 +0200, you wrote:
UNION select sum(val1), sum(val2) from table
but I think you have to select the same fieldtypes
after the UNION part as you select before it.
e.g.
SELECT
field1 // e.g. 3 Varchar(20) fields
, field2
, field3
, '1' as OrderField
from TableA
UNION
SELECT
cast(sum(val1) as Varchar(20))
, cast(sum(val2) as Varchar(20))
, cast('-' as Varchar(20))
, '2' as OrderField
from TableB
ORDER BY 4
But I don't know if you can make this so
to have it updateable.
HTH,
Markus
>Hi!maybe you can append this to your SQL Select statement:
>
>Is there any way to get additional rows into a TIB_Grid?
>I have a TIB_Grid, datasource to a query.
>Query is something like this: "select val1, val2 from table"
>In the grid, I'd like to add one rows at the very end.
>E.g. select sum(val1), sum(val2) from table;
>
>Any ideas?
>Regards, Boris
UNION select sum(val1), sum(val2) from table
but I think you have to select the same fieldtypes
after the UNION part as you select before it.
e.g.
SELECT
field1 // e.g. 3 Varchar(20) fields
, field2
, field3
, '1' as OrderField
from TableA
UNION
SELECT
cast(sum(val1) as Varchar(20))
, cast(sum(val2) as Varchar(20))
, cast('-' as Varchar(20))
, '2' as OrderField
from TableB
ORDER BY 4
But I don't know if you can make this so
to have it updateable.
HTH,
Markus