Welcome to dbFreaks.com!
FAQFAQ    SearchSearch      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

Questionnaire script with multiple input types

 
   Database Help (Home) -> General Discussions RSS
Next:  Getting UDT for all varchars  
Author Message
ll

External


Since: Jan 10, 2008
Posts: 13



(Msg. 1) Posted: Thu Dec 11, 2008 5:52 pm
Post subject: Questionnaire script with multiple input types
Archived from groups: comp>databases>ms-sqlserver (more info?)

Hi,
I'm working on a questionnaire which will include multiple input types
(check boxes, drop-downs, textarea) to submit answers. Currently, in
my design, I have 3 tables: Answer, Question, and Stream.
The same 5 questions are asked as they relate to the 8 streams of
course discipline - in other words, the 5 questions are asked 8 times
each. I had thought of using loops to accomplish this, although at
present the stumper is getting a graceful and effiicient means of
dealing with the different data types.
The first thing that came to mind was using a different table for each
different data type in the Answers. Would there be something perhaps
more simple and efficient?

Many thanks for any help,
Louis

 >> Stay informed about: Questionnaire script with multiple input types 
Back to top
Login to vote
Erland Sommarskog2

External


Since: May 30, 2004
Posts: 2061



(Msg. 2) Posted: Fri Dec 12, 2008 10:57 pm
Post subject: Re: Questionnaire script with multiple input types [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

ll ( ) writes:
> I'm working on a questionnaire which will include multiple input types
> (check boxes, drop-downs, textarea) to submit answers. Currently, in
> my design, I have 3 tables: Answer, Question, and Stream.
> The same 5 questions are asked as they relate to the 8 streams of
> course discipline - in other words, the 5 questions are asked 8 times
> each. I had thought of using loops to accomplish this, although at
> present the stumper is getting a graceful and effiicient means of
> dealing with the different data types.
> The first thing that came to mind was using a different table for each
> different data type in the Answers. Would there be something perhaps
> more simple and efficient?

Maybe the data type sql_variant can be useful?


--
Erland Sommarskog, SQL Server MVP, esquel DeleteThis @sommarskog.se

Links for SQL Server Books Online:
SQL 2008: http://msdn.microsoft.com/en-us/sqlserver/cc514207.aspx
SQL 2005: http://msdn.microsoft.com/en-us/sqlserver/bb895970.aspx
SQL 2000: http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx

 >> Stay informed about: Questionnaire script with multiple input types 
Back to top
Login to vote
Display posts from previous:   
Related Topics:
Selecting several types - Hi all, So I have these tables of items and item-types, and the items can be of several types: Items: ID ; Name 1 ; Item1 2 ; Item2 ItemType: ID ; Type 100 ; Type1 200 ; Type2 300 ; Type3 Now, to link these 2 I have a "linking" table: Link...

checking the existance of fields and types - I'm trying to write a program in cold fusion to check the existance of fields and data types according to requirements I was looking at the syscolumns table for some of this information but I've discovered that in my playing (creating and deleting..

filtering results by input box? - Hi, i'm new to mssql, i've come from php/mysql.. anyway, i'm using SQL Server 2005.. I've connected to the DB using dreamweaver and sucessfully displayed a recordset on a page as follows: <%@ Page Language="VB" ContentType="text/html&...

Accepting wildcards like % in input parameters of stored p.. - From a security point of view, is accepting wildcards like "%" in input parameters of stored procedures against any best practices? As an example, if a user defined function uses "Productname LIKE @ProductName" in WHERE clause of a s...

T-SQL script for tran log with - in database name - Hi, This is probably a trivial question, as I am simply trying to execute a BACKUP LOG database WITH NO_LOG. Except T-SQL will not accept anything I type when database has a - in it, for example data-base. I have tried: BACKUP LOG 'data-base' WITH..
   Database Help (Home) -> General Discussions All times are: Pacific Time (US & Canada)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You can edit your posts in this forum
You can delete your posts in this forum
You can vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]