April 27, 2012

sp_helplanguage (Transact-SQL MetaData) Definition

Please note: that the following source code is provided and copyrighted by Microsoft and is for educational purpose only.
The meta data is from an SQL 2012 Server.

I have posted alot more, find the whole list here.

Goto Definition or MetaData

Definition:

sys.sp_helplanguage(nvarchar @language)

MetaData:

 create procedure sys.sp_helplanguage -- - 1996/04/08 00:00  
@language sysname = NULL
as
-- Print all languages if the user didn't give the language name.
if @language is null
begin
if exists (select * from sys.syslanguages)
select * from sys.syslanguages
else
raiserror(15452,-1,-1)

-- Find out whether us_english is there or not.
if not exists (select * from sys.syslanguages
where name = 'us_english')
raiserror(15453,-1,-1)

return (0)
end

-- Report information on this language.
if exists (select * from sys.syslanguages where name = @language)
begin
select * from sys.syslanguages where name = @language
return (0)
end

if exists (select * from sys.syslanguages where alias = @language)
begin
select * from sys.syslanguages where alias = @language
return (0)
end

-- Couldn't find this language.
if @language = 'us_english'
begin
raiserror(15453,-1,-1)
return (0)
end
else
begin
raiserror(15033,-1,-1,@language)
return (1)
end
-- sp_helplanguage

No comments:

Post a Comment

Total Pageviews