Viewing 15 posts - 5,101 through 5,115 (of 7,597 total)
Sean Lange (5/7/2015)
nick.latocha (5/7/2015)
create table #items (itemID varchar(10), statusID int)
create table #statuses (statusName varchar(50), statusID int)
insert into #items values ('Item 1',1|2|8)
insert into #items values ('Item 2',1|4)
select *...
May 8, 2015 at 9:56 am
You can use bigint, doubling the bits from an int ;-).
May 8, 2015 at 9:53 am
SQL does sort of track modification counts (for indexes, not heaps), but the data is cumulative and does necessarily persist. Look at view:
sys.dm_db_index_operational_stats
However, while an index is...
May 8, 2015 at 9:48 am
Don't get overly focused on having a primary key per se. Some tables require them, some don't. Data integrity is vital, but a primary key doesn't guarantee it...
May 8, 2015 at 9:41 am
GG_BI_GG (5/8/2015)
OUTER APPLY (
SELECT
...
May 8, 2015 at 8:13 am
The table design is probably less than ideal/perfect.
However, the query can still be improved, hopefully dramatically. Keep in mind that I don't have sample data to test it ahead...
May 7, 2015 at 5:02 pm
TomThomson (5/4/2015)
Sergiy (5/1/2015)
TomThomson (5/1/2015)
No Idiocracy, just people applying the KISS principle, I think.
It only seems simple for someone who never had to deal with real calling systems.
5 developers for almost...
May 4, 2015 at 4:09 pm
What is the total table size? If the whole table is 20M rows, you're probably better off breaking replication, doing the delete, and then taking a new snapshot to...
May 4, 2015 at 4:06 pm
I would think SQL would also need a schema stability lock on the table, to make sure the structure doesn't change while it is being read.
If you use "SELECT ......
May 4, 2015 at 9:25 am
WhiteLotus (4/28/2015)
I have some questions :
1.Is it OK to shrink Master, model ? the transaction log for those databases are full .
2.Is it OK to set the Recovery...
May 1, 2015 at 9:08 am
You should have no problem changing the logical names, except maybe for some scripted restores that have a MOVE clause using the logical name.
April 30, 2015 at 3:55 pm
SELECT SUBSTRING(string, t.tally + 3, CHARINDEX('##]', string, t.tally + 3) - t.tally - 3)
FROM ( --#MyTable
SELECT CAST('William Shakespeare was an English [##poet##], [##playwright##], and [##actor##], widely...
April 30, 2015 at 1:35 pm
Lynn Pettis (4/30/2015)
ScottPletcher (4/30/2015)
ScottPletcher (4/30/2015)
Don't name the constraint, as constraint names have to be unique.ALTER TABLE dbo.test
ADD PRIMARY KEY CLUSTERED
( ReportRunTime, VisitID, SourceID, BaseID, OccurrenceSeqID, [DateTime], SeqID, QueryID, Response );
The...
April 30, 2015 at 1:20 pm
ScottPletcher (4/30/2015)
Don't name the constraint, as constraint names have to be unique.ALTER TABLE dbo.test
ADD PRIMARY KEY CLUSTERED
( ReportRunTime, VisitID, SourceID, BaseID, OccurrenceSeqID, [DateTime], SeqID, QueryID, Response );
The original version was...
April 30, 2015 at 12:56 pm
Viewing 15 posts - 5,101 through 5,115 (of 7,597 total)