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.
| Author |
Topic |
|
spshindagi
Starting Member
11 Posts |
Posted - 2008-01-10 : 07:31:21
|
| Hi every one,here is my table: MVPTABLEcolumnName: Accsno JanMail JanVisit JanPhone JanComments FebMail..upto DecMail DecVisit DecPhone DecComments.eg: table with values:Accsno JanMail JanVisit JanPhone JanComments FebMAil FebVisitA234 1 2 3 yes jim 0 2A234 0 2 0 No Comments 1 2As34 0 0 0 No Comments 1 2 A235 1 2 3 yes jim 0 2A235 0 2 0 No Comments 1 2As35 0 0 0 No Comments 1 2 am sending 2 parameter as1> @param1= A2342> @param2= 'JanMail,JanVisit,JanPhone,FebMail,FebVisit,FebPhone,MarMail,MarVisit,MarPhone,AprMail,AprVisit,AprPhone,MayMail,MayVisit,MayPhone,JunMail,JunVisit,JunPhone,JulyMail,JulyVisit,JulyPhone,AugMail,AugVisit,AugPhone,SepMail,SepVisit,SepPhone,OctMail,OctVisit,OctPhone,NovMail,NovVisit,NovPhone,DecMail,DecVisit,DecPhonebased on these 2 parameter i wanted to retrieve respective Commentssay, if @param1 Ac234 @param2= JanMail,JanVisit,JanPhone,MarMailif the value of JanMail or FebMAil....DecMail = 1,then retieve respective commentsif the value of JanVisit,FebVisit..........DecVisit=2,then retrieve respective commentsif the value of JanPhone,or FebPhone,.....DecPhone=3 then retive respective commentsthanks in advancelove all |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2008-01-10 : 09:52:26
|
| Seems like a really bad db design. What does @param2 specify? |
 |
|
|
spshindagi
Starting Member
11 Posts |
Posted - 2008-01-14 : 01:56:29
|
quote: Originally posted by visakh16 Seems like a really bad db design. What does @param2 specify?
.in the front end, i allow user to make enteries as followingmonths mail visit phone comments-----------------------------------------january chkbox chkbox chkbox textboxfebuary chkbox chkbox chkbox textboxmarch chkbox chkbox chkbox textboxapril chkbox chkbox chkbox textboxmay chkbox chkbox chkbox textboxjun chkbox chkbox chkbox textboxjuly chkbox chkbox chkbox textboxAugust chkbox chkbox chkbox textboxSeptember chkbox chkbox chkbox textboxoctober chkbox chkbox chkbox textboxnovember chkbox chkbox chkbox textboxdecember chkbox chkbox chkbox textboxin which all 48 enteries are to be made,if mail checkbox is selected am storing 1 if not selected am storing 0,if visit is checked am inserting 2 else 0if phone is checked am inserting 3 else oif coments is enter,am inserting text, else no comments.as all 48 enteries has to done, am inserting 48 values. then how do u say bad designing of table[justify]love all |
 |
|
|
DonAtWork
Master Smack Fu Yak Hacker
2167 Posts |
Posted - 2008-01-14 : 13:40:10
|
| Look here for "Bad design" justification : http://en.wikipedia.org/wiki/First_normal_form[Signature]For fast help, follow this link:http://weblogs.sqlteam.com/brettk/archive/2005/05/25.aspxLearn SQL or How to sell Used CarsFor ultra basic questions, follow these links.http://www.sql-tutorial.net/ http://www.firstsql.com/tutor.htm http://www.w3schools.com/sql/default.asp |
 |
|
|
|
|
|
|
|