Viewing 15 posts - 301 through 315 (of 321 total)
SELECT catDesc as Category_Name,
tC.cat_ID as Category_ID,
ISNULL(SUM(Set_Count),0) as Set_Count,
ISNULL(SUM(Image_Count),0) as Image_Count,
MIN(Image_ID) as Image_ID,
ISNULL(SUM(New_Image_Count),0) as New_Image_Count,
ISNULL(SUM(New_Set_Count),0) as New_Set_Count
FROM tblCategories tC left join
(
select x.cat_ID AS Category_ID,Set_Count,Image_Count,Image_ID,New_Image_Count,New_Set_Count from
(SELECT
cat_ID,
1 AS...
April 8, 2005 at 8:34 am
The variation in time is that big because there is a BOOKMARK
if there are more rows that match criteria this will take longer...
April 8, 2005 at 8:26 am
From my understanding :
-first recordset specifies wich comlumn to show from the sec one ?(first recordset 1 row specifying the columns)
-secodn recordset contains the recordset with your result that YOU...
April 8, 2005 at 7:16 am
|--Compute Scalar(DEFINE[Expr1014]=isnull([Expr1009], 0), [Expr1015]=isnull([Expr1010], 0), [Expr1016]=isnull([Expr1012], 0), [Expr1017]=isnull([Expr1013], 0)))
|--Nested Loops(Left Outer Join, OUTER REFERENCES
April 7, 2005 at 10:01 am
Strange I checked the exec plan for both solutions
declare @skin_ID int
set @Skin_ID=1
declare @d_t datetime
set @d_t=getdate()
select a.Category_name, a.Set_count, a.Category_id, a.Image_count, a.Image_id, b.New_Image_Count, b.New_Set_Count
from ( SELECT tblC.catDesc AS Category_Name, COUNT(DISTINCT tblI.set_ID) AS...
April 7, 2005 at 9:36 am
PW you are 100% right ...
functions used like that are putting too much overhead even if the table had a few rows... the plan was way too bad :...
April 5, 2005 at 2:00 pm
To wirte 1 query I'll use rfrancisco's code
SELECT TOP 100 percent RIC AS RIC1,'' as SVCode, count(*)
FROM YourTable
WHERE Compliant = 1
GROUP BY RIC
UNION ALL
SELECT top 100 percent '' as...
April 5, 2005 at 9:18 am
SELECT
cat_ID,
catDesc,
[dbo].[CountAllSetByCatID](cat_id) AS Set_Count,
[dbo].[CountAllImgByCatID](cat_id) as Image_Count,
[dbo].[GetMinImgIDbyCatID](cat_ID) AS Image_ID,
[dbo].[GetSUMDispStatByCatIDDT](cat_ID,@d_t) AS New_Image_Count,
[dbo].[CountAllSetByCatID_DT](cat_id,@d_t) AS New_Set_Count
FROM tblCategories
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[CountAllImgByCatID]') and xtype in (N'FN', N'IF', N'TF'))
drop function [dbo].[CountAllImgByCatID]
GO
if exists...
April 5, 2005 at 8:57 am
Try to instruct the AV about your second SQL's port
March 24, 2005 at 7:03 am
Another option is to build a view on your table with one of the fields interest = balance * interestrate
March 15, 2005 at 7:26 am
GO
IF EXISTS (SELECT * FROM INFORMATION_SCHEMA.VIEWS
WHERE TABLE_NAME = 'DestinationSpain')
DROP VIEW DestinationSpain
GO
CREATE VIEW DestinationSpain
AS
SELECT OrderID, ShipCountry AS DestinationSpain
FROM Orders
WHERE ShipCountry = 'Spain'
WITH CHECK OPTION
GO
SELECT *FROM DestinationSpain
GO
IF EXISTS (SELECT * FROM INFORMATION_SCHEMA.VIEWS
WHERE...
March 14, 2005 at 7:07 am
Even too much memory can slow down!
see: Identifying Bottlenecks
March 1, 2005 at 3:02 pm
Try to change FLOAT with a DECIMAL that meets your requirements. (see FLOAT type)
Put this table in a separate file from the rest of the table (on a separate disk...
March 1, 2005 at 2:19 pm
I had the same problem using mapped drives and for some reason wasn't working even if the SQL service was started with a proper account.
Solution: use network path for file...
February 25, 2005 at 10:19 am
Viewing 15 posts - 301 through 315 (of 321 total)