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
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
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
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
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:
>
>
>
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,
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
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
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
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 (number is an auto increment).
> `
> "SELECT FIRST " + stNumOfRecordsToRetrieve + " *
Marcin, Minor tweak => works! I also added DESC to retrieve the newest
records using the field key name (number is an auto increment).
`
"SELECT FIRST " + stNumOfRecordsToRetrieve + " * FROM " + stTableName +
" ORDER BY " + fstKeyID + " DESC";
`
It's
Hi
SELECT FIRST 10 * FROM A_TABLE
Should work
Cheers
Marcin
-- Wiadomość oryginalna --
Od: "Clyde Eisenbeis cte...@gmail.com [firebird-support]"
Do: firebird-support@yahoogroups.com
Data: 12.12.2019 19:59:44
Temat: [firebird-support] How do I limit an SQL search list to 10
12 matches
Mail list logo