Re: [firebird-support] SELECT IN wildcard

2019-12-13 Thread Mark Rotteveel m...@lawinegevaar.nl [firebird-support]
On 14/12/2019 06:13, Hugo Larson hugo.lar...@yahoo.com [firebird-support] wrote: > Is it possible to use wildcard somehow like this. > > SELECT * FROM PRODUCT > WHERE PRODUCT.ID IN (:param) > > param will be a list or IDs or a wildcard. > % does not work. > Goal is to get all PRODUCT with wildca

[firebird-support] SELECT IN wildcard

2019-12-13 Thread Hugo Larson hugo.lar...@yahoo.com [firebird-support]
Hello, Is it possible to use wildcard somehow like this. SELECT * FROM PRODUCTWHERE PRODUCT.ID IN (:param) param will be a list or IDs or a wildcard. % does not work. Goal is to get all PRODUCT with wildcard :param Thanks, Hugo Larson

Re: [firebird-support] How do I limit an SQL search list to 10 records?

2019-12-13 Thread Clyde Eisenbeis cte...@gmail.com [firebird-support]
Good clarification. Any downside to using an auto increment number? ``` fiKeyID INTEGER GENERATED BY DEFAULT AS IDENTITY PRIMARY KEY ``` On Fri, Dec 13, 2019 at 12:15 PM Mark Rotteveel m...@lawinegevaar.nl [firebird-support] wrote: > > > On 13/12/2019 19:07, Clyde Eisenbeis ct

Re: [firebird-support] How do I limit an SQL search list to 10 records?

2019-12-13 Thread Mark Rotteveel m...@lawinegevaar.nl [firebird-support]
On 13/12/2019 19:07, Clyde Eisenbeis cte...@gmail.com [firebird-support] wrote: > Is a field I create, or is it part of all records? It is a field you create. Which is why I wrote "Where is the table in question, and is a suitable column (eg a timestamp) to determine what the newest record i

Re: [firebird-support] How do I limit an SQL search list to 10 records?

2019-12-13 Thread Clyde Eisenbeis cte...@gmail.com [firebird-support]
Is a field I create, or is it part of all records? On Fri, Dec 13, 2019 at 12:04 PM Mark Rotteveel m...@lawinegevaar.nl [firebird-support] wrote: > > > On 13/12/2019 16:48, Clyde Eisenbeis cte...@gmail.com [firebird-support] > wrote: > > One table contains history. The old history is never rep

Re: [firebird-support] How do I limit an SQL search list to 10 records?

2019-12-13 Thread Mark Rotteveel m...@lawinegevaar.nl [firebird-support]
On 13/12/2019 16:48, Clyde Eisenbeis cte...@gmail.com [firebird-support] wrote: > One table contains history.  The old history is never replaced.  New > history is added.  What is relevant is the most recent history. Is there > a way to find the newest records without the KeyID? Yes, you do SE

Re: [firebird-support] How do I limit an SQL search list to 10 records?

2019-12-13 Thread Clyde Eisenbeis cte...@gmail.com [firebird-support]
One table contains history. The old history is never replaced. New history is added. What is relevant is the most recent history. Is there a way to find the newest records without the KeyID? On Fri, Dec 13, 2019 at 8:58 AM Mark Rotteveel m...@lawinegevaar.nl [firebird-support] wrote: > > > O

Re: [firebird-support] How do I limit an SQL search list to 10 records?

2019-12-13 Thread Mark Rotteveel m...@lawinegevaar.nl [firebird-support]
On 2019-12-13 12:48, Clyde Eisenbeis cte...@gmail.com [firebird-support] wrote: > I added the KeyID so I could sort from newest to oldest. Was it > necessary to add this KeyID, or is there another way to find the > newest records without the KeyID? That depends on what you're trying to achieve,

Re: [firebird-support] How do I limit an SQL search list to 10 records?

2019-12-13 Thread Clyde Eisenbeis cte...@gmail.com [firebird-support]
I added the KeyID so I could sort from newest to oldest. Was it necessary to add this KeyID, or is there another way to find the newest records without the KeyID? On Fri, Dec 13, 2019 at 2:05 AM Mark Rotteveel m...@lawinegevaar.nl [firebird-support] wrote: > > > On 2019-12-13 08:14, Kjell Rilbe

Re: [firebird-support] How do I limit an SQL search list to 10 records?

2019-12-13 Thread Mark Rotteveel m...@lawinegevaar.nl [firebird-support]
On 2019-12-13 08:14, Kjell Rilbe kjell.ri...@marknadsinformation.se [firebird-support] wrote: > Den 2019-12-12 kl. 22:36, skrev Clyde Eisenbeis cte...@gmail.com > [firebird-support]: >> Marcin, Minor tweak => works!  I also added DESC to retrieve the >> newest records using the field key name (num

Re: [firebird-support] How do I limit an SQL search list to 10 records?

2019-12-13 Thread Mark Rotteveel m...@lawinegevaar.nl [firebird-support]
On 2019-12-12 19:59, Clyde Eisenbeis cte...@gmail.com [firebird-support] wrote: > This finds all records: > `` > "SELECT * FROM " + stTableName > > `` > > This does not work: > > `` "SELECT *