• 6,994 Topics
  • 21,886 Replies

6994 Topics

find next higher number based on certain where-conditions (SQL)

Hi all,sorry, this is more of a general SQL question. I have to find the next higher sequence-number depending on certain where-conditions:Table-example:╔═══════╦══════════════════╦═══════════════════════════╗║  Seq    ║       Start_Time       ║             Queue           ║╠═══════╬══════════════════╬═══════════════════════════╣║ 34962 ║ 28.07.2020 17:06 ║ PQ_NEW PRICE REQUEST GMDM ║║ 35393 ║ 29.07.2020 11:03 ║                           ║║ 35394 ║ 29.07.2020 11:03 ║                           ║║ 42886 ║ 04.09.2020 14:16 ║ PQ_NEW PRICE REQUEST GMDM ║║ 42887 ║ 04.09.2020 14:16 ║ PQ_NEW PRICE REQUEST GMDM ║║ 42888 ║ 04.09.2020 14:16 ║                           ║║ 42889 ║ 04.09.2020 14:16 ║                           ║║ 42890 ║ 04.09.2020 14:17 ║ PQ_COST SWEDEN            ║║ 42891 ║ 04.09.2020 14:17 ║ PQ_COST SWEDEN            ║║ 42892 ║ 04.09.2020 14:17 ║                           ║║ 42893 ║ 04.09.2020 14:17 ║                           ║║ 42894 ║ 04.09.2020 14:17 ║ PQ_NEW PRICE REQUEST GMD

Badges

  • 5th Reply
    BeHohas earned the badge 5th Reply
  • 1st Answer
    BeHohas earned the badge 1st Answer
  • 1st Topic
    LancePhas earned the badge 1st Topic
  • 1st Topic
    SSkinnerhas earned the badge 1st Topic
  • 5th Reply
    Bhanwarhas earned the badge 5th Reply
Show all badges