Viewing 15 posts - 1,456 through 1,470 (of 7,613 total)
Based on the limited info we have so far, the JOINs would look something like this:
SELECT *
FROM dbo.main_table mt
LEFT OUTER JOIN dbo.other_table1 ot1 ON ot1.WOQty = mt.WONum
LEFT...
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".
July 1, 2021 at 5:19 pm
DELETE FROM dbo.Table WHERE ID IN (12);
...
With the temporal table, deadlocks are guaranteed every time. Only one of the deletions will succeed; the rest will fail.
We have tried ......
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".
July 1, 2021 at 5:16 pm
Many index-suggestions I get from the database I'm working on, very often suggests quite alot of include-columns. Could this be a sign of poor database-design? As far as I...
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".
July 1, 2021 at 3:18 pm
No idea. They're not system tables that are intrinsic to MS. Some other user/3rd party code/script must be creating them.
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".
June 30, 2021 at 8:51 pm
Again, you haven't ever done an actual logical design, have you? Genuine data modeling, with no indexes, etc.., where you went through a true normalization process.
Heh... more...
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".
June 30, 2021 at 8:08 pm
BWAAAA-HAAAA-HAAAA!!! Ok... I "get it". Yep... I agree... you never have to mention "IDENTITY" in a logical model. I have to tell you, though, that the idea of having...
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".
June 30, 2021 at 6:53 pm
But, IIRC, the default trace does not record what id specifically made the change if that id has certain levels of permission. I think if you want to know the...
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".
June 30, 2021 at 6:51 pm
A DDL trigger should be enough, including putting in place things to monitor it, to make sure no one has modified that trigger.
In a business environment, no one should be...
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".
June 30, 2021 at 3:12 pm
As a first step, make sure you are on the latest CU patch level.
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".
June 30, 2021 at 3:08 pm
That's where you and I would differ... to me, the "customer number" would be the IDENTITY column. Or, perhaps, a Random GUID. 😀 Why would your "customer...
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".
June 30, 2021 at 2:53 pm
It would be really interesting to see you design a Customer or Employee table without one. I'd also be interested in your claim of "it's literally impossible to normalize...
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".
June 29, 2021 at 6:57 pm
Heh... so THAT's the reason why so many people end up with "slow databases" and IDENTITY columns everywhere. 😉 A lot of the important stuff isn't even considered up...
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".
June 29, 2021 at 5:01 pm
Great, sounds good.
Again, though, your initial design should NOT be "tables", it should just be data. It should be at a business level, not at a techy level.
If at all...
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".
June 29, 2021 at 3:58 pm
I want to design a database for an OLTP app where it mainly involves customer and transaction.
Then definitely start the design before tables. That is, do a logical data...
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".
June 28, 2021 at 10:37 pm
[Use ROW_NUMBER() partly because of inherent efficiency] And partly because it's so easy to adapt:
SELECT theDate, value, flag
FROM (
SELECT *, ROW_NUMBER() OVER(PARTITION BY...
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".
June 28, 2021 at 10:18 pm
Viewing 15 posts - 1,456 through 1,470 (of 7,613 total)