Article View: borland.public.interbase.sql
Article #11291Stored proc.
From: Henry Olive
Date: Tue, 26 Nov 2002 18:45
Date: Tue, 26 Nov 2002 18:45
39 lines
1853 bytes
1853 bytes
IB6, D6 , SqlQuery I have 2 comboboxes on a form , for filtering a report. but i have heard (here) that filter is slower than SQL. so i decided to use a s.proc. Could you please add necessary codes in to below s.p. ? Combobox1's items = A , B , Combobox2's items = C , D how can i control these.? if combobox.text='A' then C.PROCESS='AAA'; if combobox.text='B' then C.PROCESS='BBB'; if combobox2.text='C' then C.PSTATE:=Null if combobox2.text='D' then C.PSTATE:=Not Null CREATE PROCEDURE CHECKRPT ( RETURNS ( CUSTNO INTEGER, TOTAL DOUBLE PRECISION, DUEDATE TIMESTAMP, PSTATE VARCHAR(8), CUSTNAME VARCHAR(40) ) AS BEGIN FOR SELECT DISTINCT C.CUSTNO, C.TOTAL, C.DUEDATE, C.PSTATE, D.CUSTNAME FROM CHECK C , CUSTOMERS D WHERE (C.CUSTNO=D.CUSTNO) ORDER BY C.DUEDATE, C.CUSTNO INTO :CUSTNO, :TOTAL, :DUEDATE, :PSTATE, :CUSTNAME DO SUSPEND; END Thank You.
Technical Details
Message-ID:
<3de3c125@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-05!sn-xit-01!sn-xit-08!supernews.com!newsfeed.news2me.com!nntp1.phx1.gblx.net!nntp.gblx.net!nntp.gblx.net!feeder.via.net!nntp-relay.ihug.net!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 114a0e,eeb00b0c9b1e6578,start X-Google-Attributes: gid114a0e,public X-Google-ArrivalTime: 2002-11-26 10:52:24 PST From: "Henry Olive" <zed@zedltd.com> Newsgroups: borland.public.interbase.sql Subject: Stored proc. Date: Tue, 26 Nov 2002 20:45:40 +0200 Lines: 41 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.00.2919.6600 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6600 NNTP-Posting-Host: 195.175.163.167 Message-ID: <3de3c125@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1038336293 195.175.163.167 (26 Nov 2002 10:44:53 -0800) Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-05!sn-xit-01!sn-xit-08!supernews.com!newsfeed.news2me.com!nntp1.phx1.gblx.net!nntp.gblx.net!nntp.gblx.net!feeder.via.net!nntp-relay.ihug.net!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail