troubleshooting Question

SQL Syntax Explantion Needed

Avatar of rwheeler23
rwheeler23Flag for United States of America asked on
Microsoft SQL Server 2005Microsoft SQL Server 2008
4 Comments2 Solutions278 ViewsLast Modified:
I know what thisstatement does below but can someone explain two things?

1) What does the N' do in this expression? Is it necessary? What is its purpose?
2) In the Type function, what are valid arguments? Does P mean stored procedure? What does PC mean? What are the other values? Is there documentation someplace that details all of this?

/****** Object:  StoredProcedure [dbo].[glCalcPMBeginningBalance]    Script Date: 12/25/2009 12:43:53 ******/
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[glCalcPMBeginningBalance]') AND type in (N'P', N'PC'))
DROP PROCEDURE [dbo].[glCalcPMBeginningBalance]
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 2 Answers and 4 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 2 Answers and 4 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros