Viewing 15 posts - 48,991 through 49,005 (of 49,552 total)
Some comments on order by
SQL is allowed to ignore an order by in a subquery, if there is no top present. There is no order guarenteed in the following query.
SELECT...
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
September 21, 2006 at 3:51 am
What we do is to insert the results of xp_cmdshell into a table then check the table for error messages.
It's not a perfect solution, as you have to do...
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
September 21, 2006 at 2:52 am
If autoshrink is on, switch it off. Autoshrink should never be on for a production database.
Other than the issue where you don't know when its going to shrink, and may...
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
September 21, 2006 at 12:21 am
It's just the excel formatting. Nothing wrong with the data
Highlight the cells, and apply one of the formats under date.
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
September 18, 2006 at 1:20 am
What error messages are you getting from the application when you try and connect?
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
September 18, 2006 at 1:00 am
Ah, sorry. I misunderstood you.
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
September 17, 2006 at 11:57 pm
Yes, but you need to find out what field is the pk and how the values for it are generated. It may be an autogenerated value, it may be a...
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
September 15, 2006 at 2:59 am
Once more with feeling. Don't take the primary key off unless you know exactly what you're doingf and exactly what the consequences will be.
It's there to ensure data integrity....
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
September 15, 2006 at 2:51 am
There's often a lag in stats update with large tables, even if autoupdate is on. I've seen it a few times on my 50+ million row tables.
Do an update stats,...
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
September 15, 2006 at 2:51 am
You'll have to look at the database structure to find what field is the pk, or ask someone who knows the system. You can see the db structure with Query...
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
September 15, 2006 at 2:31 am
It means that your stored procedures are taking too long to execute.
The connection from the web server has a timout set in it, if the server doesn't return results...
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
September 15, 2006 at 2:26 am
It means that you have a primary key on the table, a constraint that forces all values in a column to be unique.
Since you tried to insert duplicate values...
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
September 15, 2006 at 1:30 am
Insert into Service (GroupNo,ServiceCode,ServiceName,SystemNo,Upload,ControlNo)
SELECT 6,ServiceCode,ServiceName,SystemNo,Upload,ControlNo
FROM Service
WHERE GroupNo=1
The select takes all the records in Service that have a GroupNo of 1 (Where...)
The constant in the select clause (SELECT 6, ...) means...
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
September 15, 2006 at 12:57 am
Why? Sum ignores nulls. It will add up non-null values. The isnull around the sum is just incase the entire column is null or there are no records. That's the...
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
September 14, 2006 at 11:50 pm
Yes, and you have to join it as meny times as there are levels in the nesting.
Just a warning. It's not going to run fast. I'd recomend that you...
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
September 14, 2006 at 5:13 am
Viewing 15 posts - 48,991 through 49,005 (of 49,552 total)