Kahuna
(1000+ posts)
Send PM |
Profile |
Ignore
|
Fri Jan-29-10 09:44 PM
Original message |
Hello Techies. I have a ASP 101 question. I need to know |
|
how to suppress a row with no data.
I have 19 rows as follows for ingredients 1 through 19.
<% IF RS( "Ingredient9" ) <> "?????" THEN %> <%=RS( "Ingredient9" )%> <% END IF %>
How do I suppress rows with "?????" so that if Ingredient5 through ingredient19 have "?????", empty row spaces are not created? Or, a big gap is not created after row Ingredient5 and the next line of code that would come after Ingredient19?
I know this is really simple, but I just picked up ASP less than a month ago, and I need a solution to this problem, as soon as possible. So, if any of you techies will send me a PM with the solution, I'd really appreciate it.
|
paparush
(1000+ posts)
Send PM |
Profile |
Ignore
|
Thu Apr-01-10 12:18 PM
Response to Original message |
1. Lets back up a step - Should your query be returning empty rows? |
bergie321
(797 posts)
Send PM |
Profile |
Ignore
|
Thu Apr-01-10 01:51 PM
Response to Original message |
2. If you are locked into the data structure |
|
you could use the VB ternary function IIf(expression,trueResponse,falseResponse)
ex: IIf(RS( "Ingredient9" ) = "?????", "", RS( "Ingredient9" ))
That will return an empty string if Ingredient9 is "?????" otherwise it will return the value of Ingredient9.
Best solution is to rewrite the data structure and have the ingredients in a separate Many to One table that links to the table that currently has columns for Ingredient1-19.
|
DU
AdBot (1000+ posts) |
Mon Sep 08th 2025, 05:46 PM
Response to Original message |