Viewing 15 posts - 226 through 240 (of 595 total)
quote:
Hi Jay,Just being picky but why do have 'HAVING COUNT(*) > 0' in the query? Is it not superfluous as the query...
July 22, 2003 at 6:45 am
No need to delete the parameters like padmakumar suggested. It would just waste CPU effort. Simply create the command OUTSIDE of the Loop and execute for each record...
July 21, 2003 at 12:54 pm
Actually, sounds like you need an OLAP solution since the data is for reporting only and will be read-only after the initial load. Check out MS OLAP services or...
July 21, 2003 at 12:43 pm
These aren't properties of the table, but of the constraint in question that applies to column(s) in the table. Instead of rooting through the system tables trying to set...
July 21, 2003 at 12:30 pm
SELECT MONTH(DateField) , YEAR(DateField), COUNT(*)
FROM MyTable
GROUP BY MONTH(DateField) , YEAR(DateField)
HAVING COUNT(*) > 0
July 21, 2003 at 12:17 pm
SELECT a.* FROM TableA a
WHERE
EXISTS
(SELECT * FROM tableB b WHERE a.Column1 = b.column1 AND a.column2 = b.column2)
or
SELECT a.* FROM TableA a
...
July 18, 2003 at 2:25 pm
run the query in query analyzer and look at the execution plan generated. target the section of the query that has the highest percentage of work. If you...
July 18, 2003 at 11:22 am
Stored procedures are much more maintainable, require less network traffic to transmit commands, and allow permissions to be more finely controlled. Just make sure you put together some sort...
July 15, 2003 at 8:55 am
tarih BETWEEN DATEADD(hour, 1, DATEDIFF(day, 0, GETDATE()))
AND
DATEADD(hour, 16, DATEDIFF(day, 0, tarihb)))
July 15, 2003 at 8:47 am
Then you need more parentheses. I think this is what you are looking for:
WHERE
(
(dbo.mainb.tarih >= CONVERT(varchar, DATEADD([day], 0, GETDATE()), 112) + ' 16:00:00')
AND...
July 14, 2003 at 2:50 pm
no, your method of using CONVERT(VARCHAR...) is not incorrect, only inefficient. However your where condition:
WHERE (dbo.mainb.meosar = 1)
AND
(dbo.mainb.tarih >= CONVERT(datetime, CONVERT(varchar, DATEADD([day], 0,...
July 14, 2003 at 2:06 pm
1) ok, this:
OR
(dbo.mainb.tarih >= CONVERT(varchar, DATEADD([day], 0, GETDATE()), 112) + ' 16:00:00') AND (dbo.mainb.tarih <= CONVERT(varchar, DATEADD([day], 0, GETDATE()), 112) + ' 16:00:00')
doesn't make sense. ...
July 14, 2003 at 1:01 pm
Ann,
Have you tried looking at the Execution plan generated by this procedure. I would gues that the JOINs are the least of your worries if there is a proper...
July 14, 2003 at 12:43 pm
your original WHERE clause doesn't make sense for dbo.mainb.tarih...you are saying give me all records that have tarih greater than or equal to today at 1am and tarih is less...
July 14, 2003 at 12:27 pm
Look at the code I posted; it explains how to add (or subtract) hours from GETDATE()...using DATEADD(hour, n, GETDATE())
July 14, 2003 at 11:55 am
Viewing 15 posts - 226 through 240 (of 595 total)