Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Database & SysAdmin
  3. Database
  4. Help in query design

Help in query design

Scheduled Pinned Locked Moved Database
databasedesignxmlhelp
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • N Offline
    N Offline
    NetBot
    wrote on last edited by
    #1

    Hi all, following is my yable schema Tic_pk | Tic_Denom_No | Tic_start_no | Tic_end_no -------------------------------------------------- 100 | 5 |111112411| 111112510 101 | 5 |111112511 | 111112610 102 | 5 |111112611 | 111112710 all i want that when user selects a Tic_denom, a start num and an end number the middle record should also b considered eg: tic_denom_no=5 startno:111112411 end no: 111112710 the middle record should also be returned because the start and end of the middle rec also falls in the range.. pls help thanks in adv

    P 1 Reply Last reply
    0
    • N NetBot

      Hi all, following is my yable schema Tic_pk | Tic_Denom_No | Tic_start_no | Tic_end_no -------------------------------------------------- 100 | 5 |111112411| 111112510 101 | 5 |111112511 | 111112610 102 | 5 |111112611 | 111112710 all i want that when user selects a Tic_denom, a start num and an end number the middle record should also b considered eg: tic_denom_no=5 startno:111112411 end no: 111112710 the middle record should also be returned because the start and end of the middle rec also falls in the range.. pls help thanks in adv

      P Offline
      P Offline
      Paul Conrad
      wrote on last edited by
      #2

      Maybe something like: SELECT DISTINCT * FROM _YourTable_ WHERE Tic_Denom_No=5 AND (Tic_start_no > 111112411 AND Tic_end_no < 111112710) Or something along those lines...

      "Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups