|
|
-
14 Liked
| 12 Learned
| 4 Comments
|
|
During working with replication, encountered with one error to use actual server name for replication. For solution we need to change the SQL Server instance name as actual server name with following,
[CODE]
EXEC sp_dropserver 'Old Server Name'
EXE......
|
|
-
14 Liked
| 14 Learned
| 10 Comments
|
|
Just learned from focus.com's Editors article.In that they have identified Top 10 Largest Databases in the World, Here we have the list.
I)The Library of Congress (LC) boasts more than 130 million items ranging from cook books to colonial newspapers ......
|
|
-
14 Liked
| 13 Learned
| 1 Comments
|
|
From, SQL Server help file,
"An UPDATE, INSERT, or DELETE statement that has an OUTPUT clause will return rows to the client even if the statement encounters errors and is rolled back. The result should not be used if any error occurs when you run th......
|
|
-
|
|
When I viewed the code written by co-worker, I found this. To find sales made in 2009, the where clause was written as
[code]
Where year(sales_date)=2009
[/code]
But beware that this will not make use of index available on sales_date column. The ef......
|
|
-
|
|
I just learned one new thing today "how to get comma separated value(CSV) for every column name in tables with COALESCE function." check out following query.
[code]
Use yourdbname
Go
DECLARE @listStr VARCHAR(MAX)
SELECT @listStr = COALESCE(@listS......
|
|
-
|
|
Just learned from Pinal's blog that Try_parse() and parse() functions are CLR functions and it will throw an error if CLR is not installed. Both these functions can be converted from string to numerics/datetime. These will give better performance compar......
|
|
-
14 Liked
| 11 Learned
| 2 Comments
|
|
Many people believe that table variables are stored in memory (RAM) and temp tables are stored in tempdb. I can see a few comments around this post. (http://beyondrelational.com/justlearned/posts/262/sql-server-difference-between-temp-table-and-table-va......
|
|
-
13 Liked
| 13 Learned
| 16 Comments
|
|
Hi,
Just now i Wrote one query to remove special characters from a string..
Hope this is useful.
DECLARE @I VARCHAR(100)
SELECT @I ='abhi *s d ^.l'
WHILE PATINDEX('%[^A-Za-z0-9 ]%' , @I ) <> 0
BEGIN
SELECT @I= STUFF(@I,PATIN...
|
|
-
13 Liked
| 10 Learned
| 9 Comments
|
|
Sometimes when SQL Server is configured to use some port other than default port number (1433), then you may not be able to connect directly in SSMS just by specifying the name of the server in the **Server Name** field in **Connection to Server** dialo...
|
|
-
13 Liked
| 12 Learned
| 1 Comments
|
|
sysname is a special datatype and by default it does not allow NULL, you need to explicitly add NULL in table definition to allow null. sysname is defined as
nvarchar(128) not null
Below code will give error
declare @t1 table ( c1 int, c2 sy...
|
|