Article View: borland.public.intrabuilder.data.sql
Article #75Re: SQL Sorting
From: Henning Hirschmann
Date: Mon, 22 Jun 1998 00:00
Date: Mon, 22 Jun 1998 00:00
19 lines
997 bytes
997 bytes
Hi, it is a bit tricky, but this should work. You have the three parameters for name, hairs and eyes, yea? Then say "Select iif(eyes=param_eyes and name = param_name and hairs = param_hairs , 3, iif(eyes = eyes_param and name = name_param, 2, iif(eyes = eyes_param, 1, 0))) AS HITS, * from ..table where eyes = Param_eyes or hairs = param_hairs or name = param_name order by HITS DESC" This iif does nothing but count the matches per record. Hope it works ,-)) Greetings Henning
Technical Details
Message-ID:
<6mm6fr$hft12@forums.borland.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<6lkmcl$7rm7@forums.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 101d9a,6e90a44b7b671cbd X-Google-Attributes: gid101d9a,public From: "Henning Hirschmann" <merlin32@T-Online.de> Subject: Re: SQL Sorting Date: 1998/06/22 Message-ID: <6mm6fr$hft12@forums.borland.com> X-Deja-AN: 365041468 References: <6lkmcl$7rm7@forums.borland.com> X-MimeOLE: Produced By Microsoft MimeOLE V4.71.1712.3 Organization: Another Netscape Collabra Server User Newsgroups: borland.public.intrabuilder.data.sql