Viewing 13 posts - 76 through 88 (of 88 total)
SQL Server will implicitly cast varchar '0123' to numeric 123.
January 28, 2015 at 10:00 pm
you can check the log file of master database. U can use
Select [Transaction SID],* from ::fn_dblog(null,null) where [Transaction Name] ='dbdestroy'
January 28, 2015 at 8:50 am
You can use left/right join based on the tables.
January 28, 2015 at 8:36 am
Optimized one..
USE [AdventureWorks2008]
GO
SELECT P.*
FROM
Person.Person P
WHERE
P.BusinessEntityId & 1 = 0
January 28, 2015 at 4:17 am
Check this sample query without using % or mod
USE [AdventureWorks2008]
GO
SELECT P.*
FROM
(SELECT *,ROW_NUMBER() OVER(Order by BusinessEntityId) AS RID FROM Person.Person )P
INNER JOIN (SELECT ROW_NUMBER() OVER(Order by BusinessEntityId) * 2 As...
January 28, 2015 at 3:50 am
USE tempdb
GO
CREATE TABLE myTest (Id INT,Name VARCHAR(256))
GO
INSERT INTO myTest (Id,Name) VALUES (1,'abc')
INSERT INTO myTest (Id,Name) VALUES (2,'def')
INSERT INTO myTest (Id,Name) VALUES (3,'ert')
INSERT INTO myTest (Id,Name) VALUES (4,'xyz')
GO
SELECT * FROM...
January 27, 2015 at 11:31 pm
Try the following Script
SELECT PercRate, Amount, Code
INTO #TestValues
FROM (
SELECT 6.00 PercRate , 172715 Amount , 13 Code UNION ALL
SELECT 6.50, 172716, 13 UNION ALL
SELECT 7.00, 181351, 13 UNION ALL
SELECT 7.50,...
January 27, 2015 at 9:13 pm
Pradeep can you check if there is enough free space on the disk on which you are taking backup.
Also, is there any offline database on the server , and your...
January 27, 2015 at 8:30 pm
Try the following
USE tempdb;
GO
SET NOCOUNT ON;
DECLARE @test-2 TABLE
(
Task VARCHAR(10) NOT NULL
);
INSERT INTO @test-2 (Task)
VALUES
('1.0.0')
...
January 21, 2015 at 4:47 am
You can use DMVs - sys.dm_exec_query_stats ,sys.dm_exec_sql_text,sys.dm_exec_cached_plans
You can use code below.
SELECT TOP 20 DB_NAME(st.dbid) DBName
,OBJECT_SCHEMA_NAME(st.objectid,dbid) SchemaName
,OBJECT_NAME(st.objectid,dbid) StoredProcedure
...
January 21, 2015 at 3:52 am
Accept the two parameters as comma separated string.
Create a function that will split the comma separated string and returns table.
And use that function in where clause
January 21, 2015 at 3:48 am
Viewing 13 posts - 76 through 88 (of 88 total)