Viewing 14 posts - 1,186 through 1,199 (of 1,199 total)
IDENTITY can give you gaps, and if gaps are a concern, you should not use IDENTITY. You use IDENTITY (or sequences in SQL 2012) to improve concurrency. Because IDENTITY is...
July 5, 2013 at 2:04 am
Eh, why? Deadlocks are nothing to be alarmed of as long as they are only occasional. If you have a deadlock each and every minute, you have a problem, but...
July 5, 2013 at 1:58 am
This is more likely to happen in SQL 2012 where they have changed caching for IDENTITY, so numbers may skip more abruptly when SQL Server is restarted. But there are...
July 4, 2013 at 4:08 pm
It only locks one table at a time (and I don't think it locks the full table either, but only the smallest index).
Then again, there should rarely be any reason...
July 4, 2013 at 3:24 pm
This is easily achieved with CTE that numbers the rows and then you can filter on rowno = 1:
; WITH numbering AS (
SELECT RecID, DateEntered, Status,
...
July 4, 2013 at 2:25 pm
You can view possible suspects in the view sys.server_triggers. Beside being created manually, server triggers can also be added by Policy-Based Management.
Although, I would place my bets on that this...
July 4, 2013 at 2:17 pm
If you try this on SQL 2000:
CREATE TABLE [dbo].[sequence_number](
[table_name] [varchar](50) NOT NULL,
[last_number] [decimal](15, 0) NOT NULL)
go
INSERT sequence_number(table_name, last_number) VALUES ('project_assignment', 99)
DECLARE @pak decimal(2,0)
UPDATE sequence_number
SET @pak=last_number=last_number+10
WHERE table_name='project_assignment'
SELECT...
July 4, 2013 at 2:14 pm
There is no quick answer to this one. Luis gave you a query, but it has nothing to do with the last seven days. It just gives you a dump...
July 4, 2013 at 1:53 pm
The solution is to install the most recent Service Pack. This particular warning with failure ID 29 is no longer produced.
July 3, 2013 at 3:56 pm
SELECT * FROM tbl WHERE ltrim(rtrim(col)) NOT LIKE '%[^0-9]%'
Although this will also spit out negative numbers.
On SQL 2012 this is easier where you can use
SELECT * FROM tbl WHERE try_convert(int,...
July 3, 2013 at 2:26 pm
There is something that does not seem quite right here. You say that you retrieve StartDate and EndDate, but your sample query only has two columns.
Your error message barfs about...
July 3, 2013 at 2:22 pm
To find the permissions required for a specific catalog view or DMV, look up to the topic for the view in question in Books Online. There is usually a permissions...
July 3, 2013 at 2:02 pm
To expand a little on Luis's answer, SQL Server has a strict data type-precedence which says that when two types meet, the type with lower precedence will be converted to...
July 3, 2013 at 1:52 pm
Viewing 14 posts - 1,186 through 1,199 (of 1,199 total)