| Author |
Topic |
|
clinton_eg
Yak Posting Veteran
60 Posts |
Posted - 2010-02-21 : 08:16:02
|
| Hi,I have a HTML web page which has a set of 10 Audit Questions. Lets say Question 1 to Queston 10. and 3 marking options as Yes, No, and N/A, where Yes = 4, No = -4, and N/A = 0 (for each quetion).I also have an SQL Table "Audit Scores".Please could you let me know what is the Query i could use to get the data enterred into the HTML page to insert into the mentioned SQL table.Appreciate your help.Ewan Gilby |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2010-02-21 : 08:44:59
|
| whats your table name? what all fields does it have currently?------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
 |
|
|
clinton_eg
Yak Posting Veteran
60 Posts |
Posted - 2010-02-21 : 09:53:29
|
My SQL table name is "Audit Scores"Columns:Employee ID int,Q1_Score int,...., Q10_score int,Total_Score int,Audit_Percentage floatquote: Originally posted by visakh16 whats your table name? what all fields does it have currently?------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/
Ewan Gilby |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2010-02-21 : 10:21:44
|
| is the page showing all the questions in a grid?------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
 |
|
|
clinton_eg
Yak Posting Veteran
60 Posts |
Posted - 2010-02-21 : 10:58:57
|
Hi visakh16,Yes i have the Questions in a html file using a table.quote: Originally posted by visakh16 is the page showing all the questions in a grid?------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/
Ewan Gilby |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2010-02-21 : 11:01:39
|
| why have you designed table in this way? wouldnt it be better to store them rowwise? so that in future if you've more questions you dont need to add new column each time?------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
 |
|
|
clinton_eg
Yak Posting Veteran
60 Posts |
Posted - 2010-02-21 : 11:29:54
|
im sorry but im not sure i understood  quote: Originally posted by visakh16 why have you designed table in this way? wouldnt it be better to store them rowwise? so that in future if you've more questions you dont need to add new column each time?------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/
Ewan Gilby |
 |
|
|
clinton_eg
Yak Posting Veteran
60 Posts |
Posted - 2010-02-26 : 05:59:04
|
How do i go about storing data row wise, any examples or links where i could refer?quote: Originally posted by clinton_eg im sorry but im not sure i understood  quote: Originally posted by visakh16 why have you designed table in this way? wouldnt it be better to store them rowwise? so that in future if you've more questions you dont need to add new column each time?------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/
Ewan Gilby
Ewan Gilby |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2010-02-26 : 08:07:24
|
| you will have questionno field in your table as well as marking option. then store them in rows likeQuestion No marking optionQuestion 1 YesQuestion 2------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2010-02-26 : 08:07:25
|
| you will have questionno field in your table as well as marking option. then store them in rows likeQuestion No marking optionQuestion 1 YesQuestion 2 No...------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
 |
|
|
clinton_eg
Yak Posting Veteran
60 Posts |
Posted - 2010-03-12 : 06:18:10
|
Can i do this using the CREATE TABLE syntax?or are you refering to the HTML table format. If that is the case, then yes in the HTML table i have the Questions is a Row, not column.and Marking options as another column respectively.Question ' # ' Ans ' MarkQuestion1 ' 1 ' Yes ' 4Question2 ' 2 ' No ' -4etc...so based on the selection of Yes, No or N/A the mark is applied and on hitting a button which says Submit i want the data to create a record in the SQL table.This is where im confused and dont know how to proceed (to create a record in an SQL Table).quote: Originally posted by visakh16 you will have questionno field in your table as well as marking option. then store them in rows likeQuestion No marking optionQuestion 1 YesQuestion 2 No...------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/
Ewan Gilby |
 |
|
|
|