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)
 Dumb Case Question

Author  Topic 

Vivaldi
Constraint Violating Yak Guru

298 Posts

Posted - 2001-08-28 : 11:54:52
Hey all,

I am writing a stored proc.
This proc takes in a couple of parameters, one of the parms is a varchar that tells me where I should put the record.

I was hoping to use a Case Statement to decide which insert statement to call, can this be done? All the examples i see are using select statements.

EX:
CASE @strlit
WHEN 'Front' THEN 'Popular Computing'
WHEN 'General' THEN 'sql statement'
ELSE Insert Into GeneralPhoto(residentid,photoid,photodescription) Values (@residentid,@photoid,@strlit)
END

If it weren't for my clients, I could write a decent program.
   

- Advertisement -