Viewing 15 posts - 7,111 through 7,125 (of 8,731 total)
isuckatsql (1/24/2014)
WOW, what an improvement !From 3.2 seconds to 0.3 seconds 🙂
Many Thanks!
Which path did you take?
January 24, 2014 at 11:18 am
Taking the function call out of your query would help.
ALTER Procedure [dbo].[GetIPdetails]
@IP VarChar(15)
AS
BEGIN
-- SET NOCOUNT ON added to prevent extra result sets from
...
January 24, 2014 at 11:03 am
DaveDB (1/24/2014)
January 24, 2014 at 8:58 am
ChrisM@Work (1/24/2014)
phineas629 (1/24/2014)
... I am required to use the cursor...Perfectly reasonable so long as this is homework.
It shouldn't be homework as I recognize this from a previous thread http://www.sqlservercentral.com/Forums/Topic1532233-338-1.aspx
You...
January 24, 2014 at 8:55 am
Here's an example using CROSS TABS. It's shorter than the Pivot option, but you need to understand what the code is doing.
DECLARE @sql NVARCHAR(MAX)
SELECT @sql =STUFF((SELECT ',SUM( CASE WHEN p.ProductID...
January 24, 2014 at 8:52 am
I would suggest that you take a look at dynamic cross tabs. Seems easier to work, especially when several columns and aggregates are involved.
http://www.sqlservercentral.com/articles/Crosstab/65048/
Here are 2 examples based on...
January 24, 2014 at 8:40 am
I would suggest that you take a look at dynamic cross tabs. Seems easier to work, especially when several columns and aggregates are involved.
January 24, 2014 at 8:20 am
That's because when SQL Server is "reading" the code, it won't find a reference to Table_B alias until it gets to Table_B.
January 23, 2014 at 2:46 pm
Check the following article: http://www.sqlservercentral.com/articles/comma+separated+list/71700/
It explains how to solve your problem.
If you have any specific questions, feel free to ask.
January 23, 2014 at 2:12 pm
I'm not sure how would you automatize your process as you haven't given a source for your calculations.
I can get to your expected results but I'm not sure that would...
January 23, 2014 at 11:56 am
Here's an option. I added comments trying to explain what it's doing. If you have any questions, feel free to ask.
SELECT --This formula adds the difference of months between base_date...
January 23, 2014 at 11:35 am
hi,
As you may notice, this forum is basically for SQL Server users and most of us would come with a solution using T-SQL instead of PL/SQL. would that be fine...
January 23, 2014 at 11:13 am
Will the year always come at the end of the string? Or would something like "Microsoft Office 2003 Professional Edition" is possible?
The reason is because the solution can be simplified...
January 23, 2014 at 9:32 am
Thanks for the article Jeff. It's always good to have a nice explained reference.
January 23, 2014 at 8:39 am
It's hard to think of a solution without some sample data and expected results. everything is possible, you just need to provide more information. Check the article on my signature...
January 23, 2014 at 8:06 am
Viewing 15 posts - 7,111 through 7,125 (of 8,731 total)