🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: pl.comp.lang.delphi.bazy-danych
Article #70226

Re: Filtrowanie

#70226
From: wloochacz
Date: Tue, 26 Jun 2007 09:17
20 lines
1480 bytes
> Wiam, wie ktoś może jak przefiltrować tabele po kolumne, która jest 
> integer-em,
> próbuję tak
Wiem

> TSimpleDataSet.Filter := ID like '1%';
> TSimpleDataSet.Filtered := True;
> 
> na polu tekstowym jest OK, ale dla pola liczbowego jest błąd.
> Da się to jakoś ominąć i zrobić podobne sortowanie dla pól liczbowych??
To sortowanie czy filtrowanie?

> Baza danych: Firebird 2, Komponent dbExpress, Turbo Delphi Explorer.

1) Obsłyżyć zdarzenie OnFilterRecord
2) zaprząc SQL'a do roboty; select * from tabela where cast(ID as 
char(20)) like '1%'

-- 
wloochacz
Technical Details
Message-ID: <f5qlif$9ei$1@atlantis.news.tpi.pl>
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!newsfeed.gazeta.pl!news.nask.pl!news.nask.org.pl!newsfeed.tpinternet.pl!nemesis.news.tpi.pl!atlantis.news.tpi.pl!news.tpi.pl!not-for-mail
References: <f5pcd5$rm6$1@atlantis.news.tpi.pl>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!newsfeed.gazeta.pl!news.nask.pl!news.nask.org.pl!newsfeed.tpinternet.pl!nemesis.news.tpi.pl!atlantis.news.tpi.pl!news.tpi.pl!not-for-mail
From: wloochacz <wl@no.spam>
Newsgroups: pl.comp.lang.delphi.bazy-danych
Subject: Re: Filtrowanie
Date: Tue, 26 Jun 2007 11:17:11 +0200
Organization: tp.internet - http://www.tpi.pl/
Lines: 20
Message-ID: <f5qlif$9ei$1@atlantis.news.tpi.pl>
References: <f5pcd5$rm6$1@atlantis.news.tpi.pl>
NNTP-Posting-Host: plast-box.pl
Mime-Version: 1.0
X-Trace: atlantis.news.tpi.pl 1182849423 9682 195.205.119.237 (26 Jun 2007 09:17:03 GMT)
X-Complaints-To: usenet@tpi.pl
NNTP-Posting-Date: Tue, 26 Jun 2007 09:17:03 +0000 (UTC)
User-Agent: Thunderbird 1.5.0.12 (Windows/20070509)
In-Reply-To: <f5pcd5$rm6$1@atlantis.news.tpi.pl>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit