the ultimate problem

Results 1 to 3 of 3

Thread: the ultimate problem

  1. #1
    glovesave Guest

    Default the ultimate problem

    Here is my question.<BR><BR>Suppose you have a database with 100 different colomns and 100 different rows. The database keeps a record of people and what appliances they own. Say the rows are people and the colomns are appliances. Furthermore suppose that all the rest of the fields have one of 2 possible values (either own or no-own). How could one construct a select statement that would only look at one particular person and all the appliances that they own. So just to clerify the colomn headers are <BR>Person, Appliance 1, Appl. 2, Appl. 3, Appl. 4, Appl. etc...,<BR><BR>P.S. How can you display the colomn names without actually typing them out.<BR><BR>I hope this question is worth answering. But if it isn&#039t, could you answer it anways, I am really having trouble with it.

  2. #2
    Jason Miller Guest

    Default This might work...

    What you need is a for each loop. I think this syntax is mostly right...<BR><BR>set objRS = select * from table where person = &#039me&#039<BR><BR>for each column in objRS<BR> if objRS(column) = true then response.write column<BR>next

  3. #3 Guest

    Default RE: This might work...

    for each column in objRS<BR> <BR>should be<BR><BR>for each column in objRS.fields<BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts