![]() |
| |||||||
| Sponsored Links |
![]() |
| | LinkBack | Thread Tools | Display Modes |
|
#1
| |||
| |||
| Hi, I have a table the design is like this Id Description I want to find out if the tables description field has any values that start with Sem-Conf And if so then display all the values that start with Sem-Conf So say for example it will hold values like this Sem-Conf Discussion making for kids Sem-Conf Teach kids about maths So when i display the values i only want to display Discussion making for kids Teach kids about maths I tried the % in sql but it didnt work any idea todd |
| Sponsored Links |
|
#2
| ||||
| ||||
| It should be something like:- Code: strsql = "SELECT Id,Description WHERE Description LIKE 'Sem-Conf%'"
.
.
.
.
.
if not rs.eof then
do until rs.eof
response.write(replace(rs("Description"),"Sem-Conf ",""))
rs.movenext
loop
end if
Hope that helps. |
|
#3
| ||||
| ||||
| As I responded in the other forum about your database, you have an underlying flaw in the design of your table. It violates First Normal Form, in that you are coding more than one piece of data in the same field. In a properly designed table, every data field should be "atomic"--a single indivisible value. Then you wouldn't be having this problem. |
![]() |
|
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| retrieve values | todd2006 | SQL Development | 5 | June 19th, 2008 01:46 PM |
| Store Calculated Values (Updating Fields) | sbenj69 | Microsoft Access | 6 | May 26th, 2008 10:18 AM |
| Finding Datalist Row on auto postback | richyrich | .Net Development | 1 | May 12th, 2008 04:52 AM |