Viewing 15 posts - 4,636 through 4,650 (of 7,613 total)
Sergiy (11/18/2015)
ScottPletcher (11/18/2015)
Lol. So you think Amazon.com has every gift code number they've ever issued in their current gift codes table? Unbelievable.
Why not?
May be not "ever issued", may...
SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".
November 18, 2015 at 3:55 pm
Sergiy (11/18/2015)
ScottPletcher (11/18/2015)
SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".
November 18, 2015 at 3:04 pm
Sergiy (11/18/2015)
ScottPletcher (11/18/2015)
First, how do you know that inactive codes are routinely searched? That's almost never the case.
Mobile top up numbers. Gift cards. iTunes cards. Game access codes. Software...
SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".
November 18, 2015 at 2:49 pm
I suggest trying the BULK INSERT command, since you can stop it after only one row. Specify a never-found field terminator to make sure you read the entire first...
SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".
November 18, 2015 at 12:40 pm
I would think first create a temp table that matches the output of that command:
CREATE TABLE #filelistonly ( ... )
then do this:
INSERT INTO #filelistonly
EXEC('restore filelistonly from disk = ''G:\folder1\backupfile091.bak'')
Finally, of...
SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".
November 18, 2015 at 12:17 pm
Sergiy (11/17/2015)
ScottPletcher (11/17/2015)
SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".
November 18, 2015 at 8:57 am
SQL-DBA-01 (11/17/2015)
SELECT CHARINDEX('_', name) FirstIndexOf,
--CHARINDEX('_', name)+1,
CHARINDEX('_', name, (CHARINDEX('_', name)+1)) SecondIndexOf,
charindex('_',name, CHARINDEX('_',name,(charindex('_',name ) + 1 )) + 1 ) ThirdIndexOf,
charindex('_',name,CHARINDEX('_',name,(charindex('_', name ,(charindex('_',name ) + 1 )) +...
SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".
November 17, 2015 at 3:49 pm
First you'll need to decide how you want to handle birthdays on Feb 29. In non-leap years, do you want to treat Feb 28 as the birthday, or March...
SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".
November 17, 2015 at 9:33 am
insert into #test values
('2100110'),
('2100110,12')
select
HID,
case when last_comma = 0 then HID
when next_to_last_comma = 0 then LEFT(HID, LEN(HID) - last_comma)
else...
SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".
November 17, 2015 at 9:10 am
Sergiy (11/16/2015)
ScottPletcher (11/16/2015)
But there is still no reason whatsoever to cluster this table by identity.
Actually, there is.
And I pointed on it in my previous post:
to preserve...
SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".
November 17, 2015 at 7:54 am
Sergiy (11/16/2015)
ScottPletcher (11/16/2015)
[Yes, (maybe) that gives you less fragmentation on the base table, but that's irrelevant if you (almost) never look up by the id anyway!!
I'd say it this...
SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".
November 16, 2015 at 5:09 pm
Arjun Sivadasan (11/16/2015)
ScottPletcher (11/16/2015)
If the table does not exist at all, SQL defers name resolution ("deferred name resolution") for that table.<snip/>
Thanks for the reply Scott. If a table does not...
SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".
November 16, 2015 at 4:19 pm
Sergiy (11/16/2015)
ScottPletcher (11/16/2015)
but still cluster the table on the RedemptionCode.Clustering a column with randomly generating values is not the best approach ever.
That's a drastic overstatement. Remember, the table...
SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".
November 16, 2015 at 2:50 pm
The best solution is to tune the existing indexes, starting with verifying that you have the best clustered index on every table. Btw, empty/unused space within the db will...
SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".
November 16, 2015 at 12:59 pm
I don't think SQL will have to use an implicit conversion for varchar to char, since it pads spaces when doing character comparisons anyway. Not 100% sure, so I'd...
SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".
November 16, 2015 at 12:41 pm
Viewing 15 posts - 4,636 through 4,650 (of 7,613 total)