Viewing 15 posts - 3,241 through 3,255 (of 19,564 total)
San snapshots can also cause an extra backup entry in your backuphistory. Are you doing SAN snapshots by chance?
April 3, 2014 at 12:48 pm
djj (4/3/2014)
Guess I am not the only one not reading today. 🙂
:hehe::-D
April 3, 2014 at 8:26 am
Without table definitions and without sample data, all we could do is say the query you provided should do the trick.
April 3, 2014 at 8:25 am
rvenkatesan (4/3/2014)
I am looking for items that have more than one occurrence in track, in the above sample track 204 has 3 distinct Multiples and the track...
April 3, 2014 at 8:20 am
If you are looking for 2008R2 and later, you can query a dmv for this info (throwing it out there due to the recent activity on this thread).
SELECT *
FROM sys.dm_server_services;
April 3, 2014 at 8:17 am
This should produce the results you have requested
DECLARE @table TABLE (Track INT, Books CHAR(1))
INSERT INTO @Table
VALUES (204,'A'),
(204,'B'),
(204,'B'),
(204,'C'),
(206,'A'),
(204,'A'),
(204,'A'),
(203,'A'),
(202,'C'),
(202,'C'),
(202,'B');
WITH presel AS (
SELECT Track
FROM @table
GROUP BY Track
HAVING COUNT(*) > 1
)
SELECT Track, Books
FROM @table...
April 3, 2014 at 8:09 am
Are you trying to dedupe the data in this table or just the result set?
April 3, 2014 at 7:52 am
Jeff Moden (4/2/2014)
April 3, 2014 at 7:41 am
crookj (4/3/2014)
Ed Wagner (4/2/2014)
SQLRNNR (4/2/2014)
snowing - againEnough
5-inches this morning.
That would be fun to have down in Vegas.
April 3, 2014 at 7:39 am
Oh and here is the rest of the setup to update ColumnB
DECLARE @table TABLE (ColumnA VARCHAR(20), ColumnB varchar(20))
INSERT INTO @table (ColumnA) VALUES ('2300>MC13');
SELECT SUBSTRING(ColumnA,CHARINDEX('>',ColumnA),LEN(ColumnA)-CHARINDEX('>',ColumnA)+1)
FROM @table;
UPDATE t
SET ColumnB = SUBSTRING(ColumnA,CHARINDEX('>',ColumnA),LEN(ColumnA)-CHARINDEX('>',ColumnA)+1)
FROM @table...
April 2, 2014 at 7:28 pm
It is a limitation in Power.
SELECT POWER(2,34)
Produces
Msg 232, Level 16, State 3, Line 1
Arithmetic overflow error for type int, value = 17179869184.000000.
April 2, 2014 at 7:25 pm
Here is a means to get that data that allows for some variances - just in case.
DECLARE @table TABLE (ColumnA VARCHAR(20), ColumnB varchar(20))
INSERT INTO @table (ColumnA) VALUES ('2300>MC13')
SELECT SUBSTRING(ColumnA,CHARINDEX('>',ColumnA),LEN(ColumnA)-CHARINDEX('>',ColumnA)+1)
FROM @table
April 2, 2014 at 7:22 pm
ramyours2003 (4/2/2014)
April 2, 2014 at 6:59 pm
Viewing 15 posts - 3,241 through 3,255 (of 19,564 total)