2,519 reputation
612
bio website
location
age
visits member for 3 years, 1 month
seen 2 days ago

Jul
1
comment Is select * still a big no-no on SQL Server 2012?
ANd I will point out that if you have an inner join there is a 100% chance you are returning more data than you need.
Feb
5
comment What's the difference between a temp table and table variable in SQL Server?
I have to say this is pretty much the best answer I have seen on any of the Stack Overflow sites.
Jan
15
comment Downgrade database from SQL Server 2012 to 2008
@StevenSmith, you have to tell them the risks and the costs in time and money. They upgrade path is far less risky and the workaround is likely to take weeks or months.
Jan
15
comment Downgrade database from SQL Server 2012 to 2008
Your lead is catastrophically wrong. There will be far fewer problems if you upgrade dev and it will take less time.
Nov
12
comment Version control for database objects
Oh and when we first put database code in source control , someone periodically ran a script to delete any objects not in source control. Only takes once for that to convince everyone that it is a good idea.
Nov
12
comment Version control for database objects
No dev anywher should push to prod. If you don't have a dba (And if you have database and your applications rely on it and you don't have one, then that is simply irresponsible) then only managers should push code.
Nov
4
comment Databases: are there universal datatypes?
WHy are you planning to switch to a different database? The only times I have ever seen anyone switch was when they used COYS softeware that has to work on several backends. Even then, using universal types insteand of teh ones that work for that particular backend would save some time but create some major performance or data integrity issues. (one reason why every single COTS product I have ever had to support, and there have been a lot of them through the years, had lousy performance). So it would not be recommended to cripple youru database to save a little dev time.
Sep
17
comment Select @@identity in Merge Replication
@@Identity should not be used. You should switch to using OUTPUT (scope_ideinty() works but has problems if parralleism is used, OUTPUT works in all conditions) and yes that requires code changes.
Sep
3
comment Optimizing a query with ORDER BY in a derived table
Just becasue you can do something, doesn't mean you should. It is a poor practice to do group bys this way in ALL databases even if you think you can.
Aug
21
comment SET IDENTITY_INSERT equivalent in Access
And you should not ever be doing this in SQL server either. Identitiy insert is only for the use when you mneed to migrate records. Using it for this purpose is bery bad.
Aug
21
comment SET IDENTITY_INSERT equivalent in Access
YOu should under no circumstance want to reuse autonumber values. THat completely defeats the purpose of using thema nd it creates risks inteh database. If you don;t want gaps (and a legal reuirement for no gaps is really the only reason that is acceptable here) then you need to roll your own number scheme and not use an autonumber fuield. HOwever, even then, it is a BAD idea that almost 100% will result in data integrity issues or cofusion. It is really really a bad idea.
Jul
16
comment INNER JOIN Giving time out on large database
@Harinder, you actually havea teeny tiny database. A big database would have more like a billion records.
Jul
10
comment What's the difference between a CTE and a Temp Table?
One place where a CTE could be faster is if it is used instead of a correlated subquery.
Jul
8
comment How to migrate data between “all-surrogate” databases?
The only data that should be in source control would be lookup tables that are not ever changed from the application.
Jul
8
comment How to migrate data between “all-surrogate” databases?
Every object and every change to an object in a database should be in source control. You should be able to run the scripts in order by version.
Jun
5
comment Find procedures that haven't been called in <n> days
amazon.com/… If you are doing this, the techniques in here will be invaluable implementing the changes once you identify what you want to change. They will help you keep people informed and help keep you from missing things when you do the drop commands, etc.
Jun
5
comment Need an idea for a complex SQL question
Exactly how do you know how the accepted and any nonaccetped records are relarted? Do they have the same id or some other field that ties them together?
May
29
comment Bit column vs multiple join tables
I like the date idea, conceivably over time someone could be both a student and then an instructor and in reporting you might want to know which one he was at various points in time. One of the biggest weaknesses in many database deisgns is that they don't consider how the data will change over time and what that means for how they intend to use the data (especially in reporting) because the designers are often only concerned with data entry.
May
24
comment Are individual queries faster than joins?
Your answer is so much better than mine, that I deleted mine. This is what I wanted to say but didn't manage to actually say.
May
14
comment Left Join not giving desired result
Your problem is the data doesn't support the result set you want. You have no payments for fee 300.