Viewing 15 posts - 4,771 through 4,785 (of 8,753 total)
Quick suggestion
😎
USE tempdb;
GO
SET NOCOUNT ON;
declare @Users table(UserID int identity(1,1) primary key,Name varchar(50),Active bit);
declare @CreditCards table(IdCredicard int identity(1,1) primary key, UserID int,CardNo bigint,Active bit,Date_Created datetime);
insert into @Users(Name,Active)
select 'Name1',1 union all
select 'Name2',1...
August 10, 2015 at 10:44 pm
peter 82125 (8/10/2015)
August 10, 2015 at 10:32 pm
Further on the subject, what is killing the performance is most certainly the distinct sort and table scans for the xml subquery. Adding an index on InvoiceID, Row_Num and include...
August 10, 2015 at 10:25 pm
sandhuz24 (8/10/2015)
Still, I would like to know if it possible to optimise the query when reading entire table.Thanks
Quick thought, too much information missing, without it one is just guessing!
😎
Post the...
August 10, 2015 at 8:14 pm
jan.dewettinck (8/9/2015)
Not sure if the following link provides a better explanation.
https://msdn.microsoft.com/en-us/library/ms187928.aspx
I based my answer on the part about the style which says that the default is...
August 10, 2015 at 5:30 am
NLV (8/10/2015)
Thanks Erikson for your help.
You are very welcome
😎
August 10, 2015 at 4:22 am
Quick suggestion
😎
USE tempdb;
GO
SET NOCOUNT ON;
IF OBJECT_ID(N'dbo.test') IS NOT NULL DROP TABLE dbo.test;
GO
CREATE TABLE dbo.test (
action_id numeric,
action VARCHAR(20) NOT NULL,
action_by VARCHAR(20) NOT NULL,
action_date VARCHAR(20) NOT NULL
);
INSERT INTO dbo.test (action_id,action, action_by,action_date)
VALUES...
August 10, 2015 at 4:05 am
chandrika5 (8/7/2015)
I am using SQLSERVER Management Studio for both the queries.
1. select * from dbo.mytable
VS
Expand the Instance --> Databases --> tables --> Right click the table and select...
August 9, 2015 at 6:54 am
StillaLearner (8/8/2015)
August 8, 2015 at 2:10 am
As Jason said, 11.2.xxx is a typo.
😎
BTW, you should be running 11.00.5623, kb 3072100, Cumulative update package 7 (CU7) for SQL Server 2012 Service Pack 2.
August 8, 2015 at 1:14 am
Quick question, could there be more than one row returned? You can check this by filtering the set by the given parameters/predicates.
😎
Further, can you post the actual code you are...
August 8, 2015 at 12:45 am
studySQL (8/7/2015)
Violation of PRIMARY...
August 8, 2015 at 12:19 am
Add an identity column, and as it looks the table is a heap so use the opportunity and make it clustered.
August 7, 2015 at 10:40 am
Viewing 15 posts - 4,771 through 4,785 (of 8,753 total)