Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » DBISAM Technical Support » Support Forums » DBISAM SQL » View Thread |
Messages 1 to 2 of 2 total |
Consecutive rows |
Fri, Oct 12 2018 9:03 AM | Permanent Link |
Mirco Malagoli | Hi,
I have a table like this: field1 val 1 A 3 B 4 C I need a select to retun all consecutive rows (ordered by field1) from 1 to 5 also if does not exist in the table. Result field1 val 1 A 2 - (this is the miss value) 3 B 4 C 5 - The field1 column have no duplicate. What the faster way? Thanks! |
Mon, Oct 15 2018 3:49 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Mirco,
<< field1 val 1 A 3 B 4 C I need a select to retun all consecutive rows (ordered by field1) from 1 to 5 also if does not exist in the table. Result field1 val 1 A 2 - (this is the miss value) 3 B 4 C 5 - The field1 column have no duplicate. >> Hmm, that's a tough one. There's really no way to produce rows that don't already exist without using INSERT statements (or recursive SQL, which DBISAM doesn't support). You might need to drop down to navigational mode in order to create a "Numbers" table that you can join against (LOJ) to produce the result that you want. Tim Young Elevate Software www.elevatesoft.com |
This web page was last updated on Monday, April 22, 2024 at 04:13 AM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |