Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Dear all,
I need to read in a database table from Oracle and need to filter somehow:
Each DB entry in the table has a name and a version [1..5], e.g.
Name | Version |
myName1 | 1 |
myName1 | 2 |
myName2 | 1 |
myName2 | 2 |
myName2 | 3 |
myName2 | 4 |
myName3 | 1 |
How can I get a list of the entries with the highest version numbers, i.e.:
Name | Version |
myName1 | 2 |
myName2 | 4 |
myName3 | 1 |
Any ideas?
Thanks for any help!
Oliver
Either of the two following will work:
SQL SELECT Name, Max(Version) as Version FROM <Table> GROUP BY Name;
Load Name, Max(Version) as Version Group By Name;
SQL SELECT * FROM <Table> ;
HIC
Either of the two following will work:
SQL SELECT Name, Max(Version) as Version FROM <Table> GROUP BY Name;
Load Name, Max(Version) as Version Group By Name;
SQL SELECT * FROM <Table> ;
HIC
Hi Oliver,
Table
Load *;
SQL SELECT * FROM ..... ;
Load Name, Max(Version) as Version
Resident Table
Group By Name;
Use
SQL SELECT Name, Max(Version) as Version FROM <Table> GROUP BY Name;
if you want do it in SQL Side, otherwise use (Will Decrease load on qlikview)
Load Name, Max(Version) as Version Group By Name;
SQL SELECT * FROM <Table> ;