Click here to Skip to main content
15,902,114 members
Home / Discussions / Database
   

Database

 
AnswerRe: hi friends how to install SQL express in silent mode with parameters Pin
Wendelius18-Nov-08 4:37
mentorWendelius18-Nov-08 4:37 
QuestionExplanation for the Query PLZZZZZ Pin
harsha_mec34517-Nov-08 18:39
harsha_mec34517-Nov-08 18:39 
AnswerRe: Explanation for the Query PLZZZZZ Pin
Muhammad Shahid Farooq17-Nov-08 19:15
professionalMuhammad Shahid Farooq17-Nov-08 19:15 
GeneralRe: Explanation for the Query PLZZZZZ Pin
harsha_mec34517-Nov-08 19:34
harsha_mec34517-Nov-08 19:34 
GeneralRe: Explanation for the Query PLZZZZZ Pin
Muhammad Shahid Farooq17-Nov-08 19:50
professionalMuhammad Shahid Farooq17-Nov-08 19:50 
QuestionTrigger a SQL Script to Run Based on a Column in Flat File Source In SSIS Pin
rangermutt17-Nov-08 9:47
rangermutt17-Nov-08 9:47 
AnswerRe: Trigger a SQL Script to Run Based on a Column in Flat File Source In SSIS Pin
Muhammad Shahid Farooq17-Nov-08 19:41
professionalMuhammad Shahid Farooq17-Nov-08 19:41 
QuestionHandling a SELECT in a stored procedure Pin
stormydaniels17-Nov-08 5:54
stormydaniels17-Nov-08 5:54 
Hi,

I have a stored proc which retrieves a value from my database. If I select the value I then want to do a case statement and return a string. This is my code but I can't get it to work:

create procedure procGetEventType
  (@EventID int, @EventHeading varchar(12))
as
  declare@desc varchar(50)
  select @desc = 'Unknown event type'

begin
  select [EventID], [EventHeading] 
  from tblEvents 
  where [EventID] = @EventID 
			
  if ([EventHeading] = 'Info')  desc = 'Information'
  if ([EventHeading] = 'Warn')  desc = 'Warning'
  if ([EventHeading] = 'Error') desc = 'Error'
		
  return @desc		
end


I can't even create the stored procedure because I get a syntax error. It complains about EventHeading being an invalid column heading and when I comment out the "if" lines it's OK. If I have done a select on a column can I not then refer to it later on?
Any ideas? Confused | :confused:
AnswerRe: Handling a SELECT in a stored procedure Pin
Wendelius17-Nov-08 7:02
mentorWendelius17-Nov-08 7:02 
GeneralRe: Handling a SELECT in a stored procedure Pin
stormydaniels17-Nov-08 8:54
stormydaniels17-Nov-08 8:54 
GeneralRe: Handling a SELECT in a stored procedure Pin
Wendelius17-Nov-08 9:00
mentorWendelius17-Nov-08 9:00 
QuestionFileSystemObject Pin
topcatalpha17-Nov-08 2:30
topcatalpha17-Nov-08 2:30 
QuestionGet Max Pin
Zeyad Jalil16-Nov-08 22:37
professionalZeyad Jalil16-Nov-08 22:37 
AnswerRe: Get Max Pin
Wendelius17-Nov-08 4:50
mentorWendelius17-Nov-08 4:50 
AnswerRe: Get Max Pin
harsha_mec34517-Nov-08 18:32
harsha_mec34517-Nov-08 18:32 
Questionsp_cursoropen - does not return rowcount Pin
Krishnraj16-Nov-08 20:10
Krishnraj16-Nov-08 20:10 
AnswerRe: sp_cursoropen - does not return rowcount Pin
topcatalpha17-Nov-08 2:27
topcatalpha17-Nov-08 2:27 
GeneralRe: sp_cursoropen - does not return rowcount Pin
Krishnraj17-Nov-08 3:14
Krishnraj17-Nov-08 3:14 
AnswerRe: sp_cursoropen - does not return rowcount Pin
Wendelius17-Nov-08 4:47
mentorWendelius17-Nov-08 4:47 
GeneralRe: sp_cursoropen - does not return rowcount Pin
Krishnraj17-Nov-08 19:53
Krishnraj17-Nov-08 19:53 
GeneralRe: sp_cursoropen - does not return rowcount Pin
Wendelius18-Nov-08 4:52
mentorWendelius18-Nov-08 4:52 
GeneralRe: sp_cursoropen - does not return rowcount Pin
Krishnraj18-Nov-08 18:16
Krishnraj18-Nov-08 18:16 
GeneralRe: sp_cursoropen - does not return rowcount Pin
Wendelius19-Nov-08 4:11
mentorWendelius19-Nov-08 4:11 
QuestionDatabase Update issue Pin
AndieDu16-Nov-08 16:38
AndieDu16-Nov-08 16:38 
AnswerRe: Database Update issue Pin
Wendelius16-Nov-08 18:01
mentorWendelius16-Nov-08 18:01 

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.