Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 How I List all possible variations????

Author  Topic 

rmalone
Starting Member

1 Post

Posted - 2003-05-31 : 06:08:14
I'm having a db programming drama. We have a series of questionnaires;
each questionnaire is comprised of a series of forms that a user must
fill out. A document is produced at the end of the questionnaire. Some
of the fields are required and some are not, depending on how the
fields are filled out can make the document look very different.

My aim is to produce something that lists all the possibilities that
the question can be filled out in. The list of the form fields are in
a SQL Server 200 database table "tblDocPageFields", the structure of
the table is similar to this:

tblDocPageFields
- ID
- Page ID
- Field Name
- Field Order

Another table specifies whether the field is required or not which
contains the fieldID and a validation Message to be displayed if the
field is not filled in.

tblDocPageFieldsReq
- ID
- FieldID
- ValidationText

For example if I have a document with 2 fields and the first one of
them are required the possibilities are:

Field1 Field2

Filled Nothing
Filled Filled

NothingFilled

I need to be able to list this somehow, as some of the surveys have a
huge amount of questions that need to be checked for all
possibilities. Does any one have any idea How I can accomplish this
through a stored procedure or ASP logic or something… Please help!!!

ryan@lawcentral.com.au



jsmith8858
Dr. Cross Join

7423 Posts

Posted - 2003-05-31 : 08:56:48
CAn you be a little more specific? I'd like to help you out but I don't totally follow ...

Is it always just filled/nothing that you want to see for possible values, or are there lists of values possible for each field and you want to see all combinations of those values?

Also, can you be more specific about how you'd like the results to be returned?

Sample data and expected output would help greatly.

Browse some other questions here for examples of posting a few CREATE TABLE statements, and a few INSERT statments to put some data in. Then we can just cut and paste your code and get to work very quickly to help solve your problem.


- Jeff
Go to Top of Page
   

- Advertisement -