Ms Sql Server Fundamentals
Wednesday, February 8, 2012
REPLICATE
Repeats a string value a specified number of times.
SELECT
EmpName
,
REPLICATE
(
'0'
,
4
)+
convert
(
varchar
(
20
),
Empid
)
+
REPLICATE
(
'0'
,
2
)
AS
ID
FROM
Employee
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
Subscribe To My Blog
Posts
Atom
Posts
Comments
Atom
Comments
Readers
My Blog List
LEARN WITH US
.NET Fundamentals
Categories
Case When Statement
(2)
CMD
(1)
Database Email
(1)
DatePart
(1)
Definitions
(37)
ERROR
(1)
Functions
(11)
INDEXING
(2)
LINQ
(1)
Search
(1)
Smo
(3)
Split Function
(2)
SSRS
(2)
System Stored Procedure
(4)
Transaction
(1)
Wildcard
(1)
XML
(3)
Blog Archive
►
2016
(8)
►
May
(2)
►
April
(2)
►
March
(2)
►
January
(2)
►
2015
(2)
►
December
(2)
►
2013
(3)
►
February
(3)
▼
2012
(21)
►
October
(1)
►
July
(8)
►
June
(1)
►
May
(4)
►
April
(2)
▼
February
(1)
REPLICATE
►
January
(4)
►
2011
(5)
►
December
(2)
►
November
(2)
►
October
(1)
►
2010
(18)
►
December
(1)
►
October
(2)
►
July
(3)
►
March
(5)
►
February
(2)
►
January
(5)
►
2009
(49)
►
December
(1)
►
May
(1)
►
April
(47)
Popular Posts
Handling special characters with FOR XML PATH('')
Issue: Length of LOB data to be replicated exceeds configured maximum 65536
SSRS Prompt for username and password in IE
Start with SMO
To generate insert statement for user defined tables available in SQL Server
No comments:
Post a Comment