Then this should work:
WHERE ( "afd", "dss", "dat") <= ('fb',13,'2002080719163600' )
ORDER BY "afd" DESC , "dss" DESC , "dat" DESC LIMIT 1;
If you use < intstead of <= you will not get the equivalant result as
your initial query.
You would get something like:
WHERE ( "afd" < 'fb' )
or ( "
Jean-Luc Lachance wrote:
Bonjour Frederik,Seems to me that instead of WHERE ( "afd" = 'fb' and "dss" = 13 and "dat" < '2002080719163600' ) or ( "afd" = 'fb' and "dss" <13 ) or ( "afd" < 'fb' ) ORDER BY "afd" DESC , "dss" DESC , "dat" DESC LIMIT 1;you can write: WHERE ( "afd",
Bonjour Frederik,
Seems to me that instead of
WHERE ( "afd" = 'fb' and "dss" = 13 and "dat" < '2002080719163600' )
or ( "afd" = 'fb' and "dss" <13 ) or ( "afd" < 'fb' )
ORDER BY "afd" DESC , "dss" DESC , "dat" DESC LIMIT 1;
you can write:
WHERE ( "afd", "dss", "dat") <= ('fb
Hello experts,
Abstract;
If I select 1 record on the primary key I know exists postgresql is very
fast, selecting the previous or next record (with limit 1) is horible.
Given this table:
CREATE TABLE dsrgl ("f6lock" int4, "afd" varchar( 4), "dss" int4, "dat"
varchar( 16), "srt" int4, "akt"