Help in query design
-
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
-
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
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