Click here to Skip to main content
15,892,059 members
Home / Discussions / Database
   

Database

 
AnswerRe: sql conctante first name and last name Pin
i.j.russell23-Mar-10 6:01
i.j.russell23-Mar-10 6:01 
AnswerRe: sql conctante first name and last name Pin
Avi Berger23-Mar-10 6:15
Avi Berger23-Mar-10 6:15 
AnswerRe: sql conctante first name and last name Pin
Corporal Agarn23-Mar-10 7:39
professionalCorporal Agarn23-Mar-10 7:39 
Questionplease help me with sql query (fine tune the sql query) Pin
poornas23-Mar-10 4:28
poornas23-Mar-10 4:28 
AnswerRe: please help me with sql query (fine tune the sql query) Pin
PSK_23-Mar-10 4:53
PSK_23-Mar-10 4:53 
AnswerRe: please help me with sql query (fine tune the sql query) [modified] Pin
i.j.russell23-Mar-10 5:11
i.j.russell23-Mar-10 5:11 
GeneralRe: please help me with sql query (fine tune the sql query) Pin
Corporal Agarn23-Mar-10 7:43
professionalCorporal Agarn23-Mar-10 7:43 
QuestionSwitch Case stmt! Pin
Learner52023-Mar-10 0:42
Learner52023-Mar-10 0:42 
Hi everOne

I have used switch case statment before but not sure the way I want to use it is implementable or not. If it is then please could you convert the following code into switch Case statement.

create proc Details_GetBYID
(
@Id int,
@TypeId nvarchar(max)
)
AS
IF @TypeId = 'P1'
BEGIN
SELECT motot.Completed,motot.Hours,motot.Subject
FROM MasterT as motot
INNER JOIN PSALevel as psal on psal.Id = motot.Id
WHERE motot.Id = @Id
END

ELSE IF @TypeId = 'P2'
BEGIN
SELECT motot.Completed,motot.Hours,motot.Subject
FROM MasterT as motot
INNER JOIN PSALevel as psal on psal.Id = motot.Id
WHERE motot.Id = @Id
END

ELSE
BEGIN
SELECT motot.Completed,motot.Hours,motot.Subject
FROM MasterT as motot
INNER JOIN PSALevel as psal on psal.Id = motot.Id
WHERE motot.Id = @Id
END


any help would be appriciated.

thanks in adv.


regards
learner
AnswerRe: Switch Case stmt! Pin
i.j.russell23-Mar-10 1:05
i.j.russell23-Mar-10 1:05 
AnswerRe: Switch Case stmt! Pin
Mschauder24-Mar-10 3:06
Mschauder24-Mar-10 3:06 
QuestionCalling procedure inside a procedure in sqlserver 2005 Pin
sumit703422-Mar-10 19:01
sumit703422-Mar-10 19:01 
AnswerRe: Calling procedure inside a procedure in sqlserver 2005 Pin
Mycroft Holmes22-Mar-10 20:12
professionalMycroft Holmes22-Mar-10 20:12 
QuestionAttempting to use Redemption and Powershell to import .msg files from a folder Pin
codekernel22-Mar-10 5:59
codekernel22-Mar-10 5:59 
AnswerRe: Attempting to use Redemption and Powershell to import .msg files from a folder Pin
i.j.russell22-Mar-10 6:19
i.j.russell22-Mar-10 6:19 
QuestionPrimary Key in SQL Server Table Variable Pin
John Gathogo22-Mar-10 2:44
John Gathogo22-Mar-10 2:44 
AnswerRe: Primary Key in SQL Server Table Variable Pin
Eddy Vluggen22-Mar-10 6:30
professionalEddy Vluggen22-Mar-10 6:30 
QuestionSQLEXPRESS silent installation. Pin
Yosh_21-Mar-10 22:36
professionalYosh_21-Mar-10 22:36 
AnswerRe: SQLEXPRESS silent installation. Pin
Steven J Jowett24-Mar-10 1:33
Steven J Jowett24-Mar-10 1:33 
GeneralRe: SQLEXPRESS silent installation. Pin
Yosh_5-Apr-10 23:53
professionalYosh_5-Apr-10 23:53 
QuestionHow to connect remote sql server(within LAN) using ADO? Pin
kcynic21-Mar-10 17:16
kcynic21-Mar-10 17:16 
AnswerRe: How to connect remote sql server(within LAN) using ADO? Pin
Mycroft Holmes21-Mar-10 20:38
professionalMycroft Holmes21-Mar-10 20:38 
GeneralRe: How to connect remote sql server(within LAN) using ADO? Pin
kcynic21-Mar-10 20:41
kcynic21-Mar-10 20:41 
GeneralRe: How to connect remote sql server(within LAN) using ADO? Pin
Mycroft Holmes21-Mar-10 20:48
professionalMycroft Holmes21-Mar-10 20:48 
GeneralRe: How to connect remote sql server(within LAN) using ADO? Pin
kcynic21-Mar-10 20:55
kcynic21-Mar-10 20:55 
GeneralRe: How to connect remote sql server(within LAN) using ADO? Pin
Mycroft Holmes21-Mar-10 21:02
professionalMycroft Holmes21-Mar-10 21:02 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.