|
|
-
|
|
You should note the behaviour in the expressions used in the ORDER BY Clause
[code]select 1 as a, 2 as b order by GETDATE()[/code]
The following code throws an error Msg 245, Level 16, State 1, Line 1
Conversion failed when converting the nvarcha......
|
|
-
13 Liked
| 10 Learned
| 3 Comments
|
|
Today I learned an tip from my colleague about finding the last executed statement for a process in SQL Server.
[code]
DBCC INPUTBUFFER (52)
[/code]
Here 52 is the SPID, that we want to check last executed statement......
|
|
-
|
|
The difference between ISNULL & COALESCE are well known among people.One difference I came to know when I was referring to MSDN & that was while creating computed columns.
- With ISNULL() we can create both persisted & non-persisted computed columns.......
|
|
-
10 Liked
| 10 Learned
| 5 Comments
|
|
I just learned this from MSDN. Below script is used to find what are the stored procs are created with "Recomplie" option.
SELECT OBJECT_NAME(sm.object_id) AS ProcedureName,definition as SQLText
FROM sys.sql_modules SM
INNER JOIN sys.procedures S......
|
|
-
|
|
While the following works without any error
[code]select $*$
select $/$ -- valid and throw divide by zero error
[/code], the following will not work
[code]select $+$
select $-$ [/code]
The correct usage is to wrap by braces
[code]select ($)+($)
......
|
|
-
|
|
Yesterday night, I was reading Inside Microsoft Sql server 2008: Programming - Itzik Ben-Gen. On Cursors section Page number 291, he has tried to explain the scenario for calculating multiplication on row wise manner. He has explained through cursor. Be...
|
|
-
|
|
I was just browsing the history of Microsoft Business intelligence when I learned that "Microsoft entered the market of OLAP tech w/ SQL server 7.0 (1998) after acquiring the technology from Panorama Software"...
|
|
-
|
|
"SQL Authority" Pinal Sir published a tip about $rowguid, which can be used to fetch uniqueidentifier column from a table. It was awesome. You can find the link below.
[SQL SERVER – Identifying Column Data Type of uniqueidentifier without Querying Syst...
|
|
-
|
|
A simple method to find out who altered/modified an object in SQL server using trace.
SELECT I.*
FROM
sys.traces T
CROSS Apply ::fn_trace_gettable(T.path, T.max_files) I
Join sys.trace_events E On I.eventclass = E.trace_event_id
...
|
|
-
|
|
Few hours before I was checking the special features, fixes, and builds of MS SQL Server. I got a great blog...So interesting....This contains unofficial build chart lists all of the known KB articles, hotfixes and other builds of MS SQL Server 2012, 20...
|
|