Re: Question on create view
Posted in 1996
>=20
> Can I create a view on a column which is define as either date or =
datetime
> and retrieving only the latest row of data ?
>=20
> Example:
> 100 10/25/93
> 100 02/05/95
> 200 08/09/96
>=20
> I want my view to display only the second and third row.
>=20
Dominic,
Yes... I think :-)
create view view_name as
select col1, max(date_col) from table_name;
Check out the "Informix Guide to SQL - Syntax" manual for more details. =
It
doesn't say you CAN'T do this !!
Cheers,
Richard.
----------------------------------------------------------------- =20
| _ =AF\\ | Richard Thomas |
| \\ 0_ | r.thomas@csl.gov.uk |
| \\ / | |
| oo/ | "20 Regal and a four-pack, |
| / \\ | I guess I'm set for the night" |
| \\_/ | - "TV Tan" The Wildhearts |
-----------------------------------------------------------------