|
|
-
13 Liked
| 11 Learned
| 9 Comments
|
|
I've been writing a blog post and needed a way to generate HTML table from the SQL table. From this thread in MSDN forum http://social.msdn.microsoft.com/Forums/en-US/sqlgetstarted/thread/c0ce48e5-ad7d-451a-9a7e-5f1e74d06698 I learned about Tony R blog ......
|
|
-
17 Liked
| 16 Learned
| 8 Comments
|
|
In SQL Server 2008, We have a feature to select multiple lines with specific characters.
In SQL Server 2012, we can append the same text to multiple lines.
Below images will give the clear picture to understand this feature.
Some times we need to add s...
|
|
-
16 Liked
| 17 Learned
| 8 Comments
|
|
Often in forums, we will see this question, "How to calculate running total?". There are various complex methods available for this and this is one of often discussed topic. Now In SQL Server 2012, OVER clause has been enhanced to calculate running tota......
|
|
-
19 Liked
| 21 Learned
| 8 Comments
|
|
Assume that there are two tables table1 and table2 which have same structures and table1 has 10 millions rows and you want to move all rows from table1 to table2. The quickest method that I have learnt is to use Partition Switching
[code]
alter table......
|
|
-
|
|
Run this and see the output
[code]select 1 as ' '[/code]
Not only spaces but other special characters too. Here is the one for tab
[code]select 1 as ' '[/code]......
|
|
-
19 Liked
| 17 Learned
| 8 Comments
|
|
The WRITETEXT statement is used to update a column of datatypes text, ntext and image. However it will not fire INSERT or UPDATE triggers......
|
|
-
15 Liked
| 12 Learned
| 8 Comments
|
|
There is something $IDENTITY to get the identity value for a table contained the identity column.
[Code]
create Table T1(Col1 int identity(1,5),Col2 int)
Go
Insert into T1(Col2) Select 100
Go 100
Select $Identity,* From T1
[/Code]......
|
|
-
|
|
I just reviewed today one undocumented extended stored procedure xp_fileexist-To check if any file or directory is exist or not.check out following examples.
Directory Example:
[code]
Exec xp_fileexist 'D:\data'
Result is:
------------------......
|
|
-
|
|
I just want share one problem faced by me. this morning....
last night I were playing with network options and today I got one error while establishing connection with ssms
A network-related or instance-specific error occurred while establishing a......
|
|
-
21 Liked
| 16 Learned
| 8 Comments
|
|
While trying to retrieve the select top count dynamically, initially tried this way
[code]
Declare @noOfRowsPerChunk int
set @noOfRowsPerChunk = 5
select top @noOfRowsPerChunk RecordID from myTable
[/code]
which throwed the syntax error.
Fix:......
|
|