Viewing 15 posts - 39,811 through 39,825 (of 49,552 total)
Alvin Ramard (4/11/2009)
If you have to use that kind of logic then you might want to use stored procedures and use something like:If A = B
BEGIN
EXEC Stored_Procedure_1
END
ELSE
BEGIN
EXEC Stored_Procedure_2
END
That's often 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
April 11, 2009 at 9:41 am
Shane Redding (4/11/2009)
In regards to the below, perhaps you should go work for the microsoft sql server team as GOTO is not uncommon in TSQL. 🙂
Just because the MS...
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
April 11, 2009 at 9:38 am
Bob Hovious (4/11/2009)
Okay... how many people here advocate the use of GOTO statements in T-SQL?
I do, solely for error handling in SQL 2000. Since there isn't a TRY-CATCH construct in...
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
April 11, 2009 at 9:35 am
Grant Fritchey (4/11/2009)
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
April 11, 2009 at 9:33 am
The clustered index is the table. The leaf level of the clustered index contains the actual data pages of the table (see books online for details on index architecture) so,...
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
April 11, 2009 at 3:15 am
Jeff Moden (4/10/2009)
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
April 10, 2009 at 3:03 pm
Either they were restored from backups of published databases or there was replication at one point and it was removed improperly.
Set the server up for replication, create a publication in...
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
April 10, 2009 at 1:11 pm
That's not what you want to order the final result set by. You want to order it by something that makes the total come after the detail lines.
Think about it....
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
April 10, 2009 at 12:33 pm
Have you looked in Books Online? There's a pretty good list in there. Use the index rather than contents and look for anything that starts with sys.dm
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
April 10, 2009 at 12:00 pm
josephptran2002 (4/10/2009)
I think I solved my problem, I use reporting service.
In that case I would strongly advise you to do the totalling in the report. Reporting services has very...
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
April 10, 2009 at 11:56 am
Reporting services? Crystal Reports? Some other reporting tool?
Most reporting tools have the ability to produce totals within the report, based on the data coming back from the DB. It's generally...
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
April 10, 2009 at 10:28 am
Vijaya Kadiyala (4/10/2009)
Is this in any report? or any Front-End application.
Good point. This is definitely something that's best done in the front end/report rather than in the database.
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
April 10, 2009 at 9:19 am
RBarryYoung (4/10/2009)
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
April 10, 2009 at 9:16 am
Please post the details of those errors. Just listing the numbers is not sufficient.
Actually, if you can find the SQL error log and post the entire of it (removing server...
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
April 10, 2009 at 9:11 am
Lookup the ROLLUP keyword in Books Online. (you'll probably find examples under the section "GROUP BY (Transact-SQL)")
One other point, looking at your procedure. There's no point in an ORDER BY...
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
April 10, 2009 at 8:44 am
Viewing 15 posts - 39,811 through 39,825 (of 49,552 total)