|
|
-
26
Liked
|
21
Learned
|
5 Comments
|
|
While you are working in Query window, if you want to delete the current row, you have to highlight entire row and press delete key. Another alternate is to use SHIFT+DEL key. The cursor can be at any position and the entire row will be deleted......
|
|
-
50
Liked
|
49
Learned
|
15 Comments
|
|
Suppose you have three tables named test1,test2 and test3 and you want to drop all these three, you can do it in a single DROP statement
[code]DROP table test1,test2,test3[/code]......
|
|
-
14
Liked
|
12
Learned
|
1 Comments
|
|
Recently a colleague of mine asked me to give him a code for replacing spaces,dots(.),hyphens(-),braces '(' and ')'.
Here is my solution
[Code]string str= "This is a string having - and - - - - It also has dot (.) Many dots(.....)"; [/Code]
A......
|
|
-
8
Liked
|
7
Learned
|
0 Comments
|
|
Recently while working with data migration,got an error while running a following query where Server2 has beed added as linked server.
[CODE]
SELECT
*
FROM Server1.Database1.dbo.Table1
WHERE Column1 NOT IN
(SELECT Column1 FROM Server2.Databas......
|
|
-
18
Liked
|
15
Learned
|
3 Comments
|
|
In SQL Server Management Studio, we can select text and press SHIFT+CTRL+U and SHIFT+CTRL+L to change the selected text to upper case and lower case respectively. I have been looking for a similar option in Microsft word and just learned that this can b...
|
|
-
5
Liked
|
3
Learned
|
5 Comments
|
|
Earlier this week, one of the developers encountered issues when he tried to make a copy of the database on the server instance with a different name. He used the copy database wizard to perform this task. I was under the impression that he used the bac...
|
|
-
5
Liked
|
2
Learned
|
4 Comments
|
|
Sometimes we need to print informations like...
Name
Address1,
Address2,
City ... etc.. in this format.
In SSRS, Put one Text Box and set expression. In expression use **VBCRLF** OR **Chr(10)**
for new line create.
e..g: "Alpesh Gorasia" & V...
|
|
-
10
Liked
|
5
Learned
|
12 Comments
|
|
Sometimes it happens that we need random row (or set of randoms rows) from table.
Itzik Ben-Gan shows us, in one of his book, the efficient way to do this:
SELECT TOP(1) * FROM someTable ORDER BY NEWID()
Changing the value in TOP operator, we can, in...
|
|
-
6
Liked
|
4
Learned
|
1 Comments
|
|
Learned today that converting hexadecimal values to varbinary and vice versa is easier in SQL Server 2008 compared to SQL Server 2005. MS made life simpler with SQL 2K8 :)
See below.
declare @hexstring varchar(max);
set @hexstring = '0xabc...
|
|
-
6
Liked
|
3
Asked
|
4 Comments
|
|
Recently i came across this questions, "Is it possible to create a trigger on a table, which is in another database"...
|
|