How to get range in a query with starting & ending numbers?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • shankar k
    New Member
    • Jan 2011
    • 3

    #1

    How to get range in a query with starting & ending numbers?

    Hi,
    i have a tagle in this standing & ending number
    Emp: - Standing Ending
    30003791742 30003791506
    50001622241 50001622005
    10046044993 10046040001
    for this i what to get the in between number can any one help me............

    Thax Shankar........ ..
  • TheSmileyCoder
    Recognized Expert Moderator Top Contributor
    • Dec 2009
    • 2322

    #2
    =(Standing+Endi ng)/2

    You need to be more specific with what it is your require.

    Comment

    • shankar k
      New Member
      • Jan 2011
      • 3

      #3
      i have Two numbers as given above in this i need to get the in between number (range) kindly help me in case
      Emp: 30002890002.... ....30002890003 up-to 3000289990...

      Than you
      Shankar

      Comment

      • Stewart Ross
        Recognized Expert Moderator Specialist
        • Feb 2008
        • 2545

        #4
        Unless you have another table which you populate with all possible whole numbers that could be used in your ranges you can't generate a list of whole numbers using SQL techniques.

        You'd need to use a programmed approach to generate all numbers between the two values (which is straightforward using a loop to do so).

        Without knowing more about your application I don't want to start showing how this could be coded, as we cannot provide full-code solutions for you, particularly when you are providing very little input yourself.

        Are you intending to have all the whole numbers shown as individual rows in a table? If not, how do you intend to access each number?

        Please advise.

        -Stewart

        Comment

        • shankar k
          New Member
          • Jan 2011
          • 3

          #5
          hi thank you,
          i am trying to do the one semple programm it's like, i am working in a logistics as reginal coordinater i what to track the Air way bill number as i given two number above when i will issue to AWB to branch's that time i will take only stating & ending ofter this i will track one by one for that i whant to get this hol numbers this is barcode number every next number it will add 11 digit & when last number will come 6 it will add 4 so kindly look into this & help me in this case if any details kindly give your Email id i will send soft copy

          Thank's
          Shankar

          Comment

          • Stewart Ross
            Recognized Expert Moderator Specialist
            • Feb 2008
            • 2545

            #6
            Sorry, we can assist with specific issues, but it is not possible for us to act as software authors for you. If you have tried out ideas and need our assistance then please post the detail of what you have tried so we can advise you further.

            -Stewart

            Comment

            Working...