|
|
|
|
-
Madhivanan Liked 1 Days ago through Blogs
Changing database options to make it read-only, or taking a database offline? If you are using sp_dboption, your code will not work with SQL Server 2012. Use ALTER DATABASE...SET statement instead....
|
|
|
-
Madhivanan Posted 1 Days ago through Blogs
declare @str varchar(200) = '[p]a]a]s]s][p'
set @str=replace(replace(replace(@str,'][',''')+upper('''),'[','+upper('''),']',''')+lower(''')
select @str='select '+right(@str,len(@str)-1)+''')'
exec(@str)
...
|
-
Madhivanan Liked 4 Days ago through Blogs
This procedure will generate the script of a table
Create Procedure GenerateScript
(
@tableName varchar(100)
)
as
If exists (Select * from Information_Schema.COLUMNS where Table_Name= @tableName)
...
|
-
Madhivanan Liked 4 Days ago through Blogs
Jeff Smith in his weblog showed how to generate Crosstab reports using a stored procedure. It works only for one PIVOT Column.I had a requirement to generate crosstab reports with more than one pivot column. So I used the same approach he used and modif...
|
-
Madhivanan Liked 4 Days ago through Blogs
Apart from using DTS and Import/Export wizard, we can also use this query to export data from SQL Server2000 to Excel and vice versa To export data from SQL Server table to Excel file, create an Excel file named testing having the headers same as tha...
|
-
Madhivanan Liked 4 Days ago through Blogs
"How do I find Nth maximum value?" is one of the most asked questions Here are some methods
I explain how to find 5th Maximum value
declare @number table(num integer)
Insert into @number values(3456)
Insert into @number values(846)
Insert in...
|
-
Madhivanan Liked 4 Days ago through Blogs
Pinal Dave, founder of www.sqlauthority.com, started a new series of posts in which a question will be asked each day. Two persons will be chosen randomly to get a book. Answering these questions are not only helping you to improve your knowledge, but a...
|
-
Madhivanan Liked 4 Days ago through Blogs
As I have informed you earlier in this post, there are some interesting tips I have contributed in July 2011. You may find them interesting if you follow them. The following are some of my tips I posted there
Most Learned Posts of all time
Google is a...
|