Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

stored procedure not working

Status
Not open for further replies.

samantha72

Programmer
Jul 31, 2001
14
0
0
CA
Hi,

I need columns to be displayed like this

Kit ID Type Desc
12 Form jddd
13 Kit fff


CREATE PROCEDURE dbo.DisplayKits_Forms_pr
(@language int)
AS

BEGIN
if @language = 1
select kit_id as 'Kit ID', form_ind as Type, english_desc as Description
from kit order by kit_id
else
select kit_id as 'Id de Trousse', form_ind as Type, french_desc as Description from kit order by kit_id

select form_ind,
case
when form_ind = 0
then 'Kit'
when form_ind = 1
then 'Form'
end from kit

I cannot get this to work. My type field in the database is 0 and 1 but i need to display
form when it is 1 and kit when it is 0

Any ideas

Samantha
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top