Joined: 31 Aug 2010
Online Status: Offline
Posts: 32
Topic: Display Gaps in Sequence based on range Posted: 30 Aug 2018 at 3:43am
I have two fields in a table with a starting number and ending number and I want to find each value between. I then want to compare it to another field and only display the missing values.
Example: (table name and field)
Start Range: 4000 (POEX.start)
End Range: 4999 (POEX.end)
Purchase Orders in Use: 4000, 4001, 4002 (PO.NUM)
Results: 4003, 4004, ect..
Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Posted: 31 Aug 2018 at 3:06am
best case scenario is you have a table that has a row for each number. from there you can do outer joins to get the result row per number which will be easier to use. Or you can create a temp table with the values using a stored procedure (or its equivalent depending on your data source)
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum