| Author |
Topic |
|
JJins
Yak Posting Veteran
81 Posts |
Posted - 2010-11-08 : 09:15:28
|
| I have a scatered amount of programids I want to select in one query. but the programids are not in sequence. here is the example query.SELECT table1.*FROM table1 Where coverageid = 11 and programid = 1823 and pcmax = 8 and limitmax = 1000but I want to select these specific programids all at once. Thanks for the help.1823, 1826, 1829, 1832, 1835, 1838, 1841, 1844, 1847, 1850, 1853, 1856, 1859, 1862, 1865, 1868, 1871, 1874, 1877, 1880, 1883, 1886, 1889, 1892, 1895, 1898, 1901, 1904, 1907, 1910BestGG |
|
|
jimf
Master Smack Fu Yak Hacker
2875 Posts |
Posted - 2010-11-08 : 09:28:02
|
| You can do thisSELECT table1.*FROM table1 Where coverageid = 11 and pcmax = 8 and limitmax = 1000and programid IN (1823, 1826, 1829, 1832, 1835, 1838, 1841, 1844, 1847, 1850, 1853, 1856, 1859, 1862, 1865, 1868, 1871, 1874, 1877, 1880, 1883, 1886, 1889, 1892, 1895, 1898, 1901, 1904, 1907, 1910) JimEveryday I learn something that somebody else already knew |
 |
|
|
JJins
Yak Posting Veteran
81 Posts |
Posted - 2010-11-08 : 09:28:52
|
| Great! thanks for the help. |
 |
|
|
|
|
|