Viewing 15 posts - 331 through 345 (of 921 total)
You really need to redesign your schema. This is a many-to-many relationship between members and categories. You should have a MemberID (int identity?) for each member and one...
December 18, 2003 at 6:11 am
use northwind
go
DECLARE @custid nchar(5)
SET @custid = N'SAVEA'
SELECT SUM(CASE CustomerId WHEN @custid THEN 1 ELSE 0 END) OrdersByCust,
COUNT(*) TotalOrders,
CONVERT(char(7), OrderDate,120) YrMonth
FROM Orders
GROUP BY CONVERT(char(7),OrderDate,120)
ORDER...
December 18, 2003 at 5:36 am
SELECT RIGHT(STUFF(CONVERT(char(26),GETDATE(),9),21,4,' '),10)
--Jonathan
December 17, 2003 at 1:39 pm
There are some SQL Server bugs that will return incorrect results with aggregations, but most of these bugs have been corrected in subsequent service packs. None of the bugs...
December 17, 2003 at 7:13 am
quote:
Thank you Jonathan, but this resulted in an out of range datetime value. Any ideas why that would come up?
December 16, 2003 at 3:32 pm
DECLARE @Store_ID varchar(10), @Business_Date datetime
SET @Store_ID = ''
SET @Business_Date='06/29/2002'
IF @Store_ID <> ''
SELECT Store_ID, Bank_Code, DBR_Date, Total
FROM CSDEPOSIT
WHERE Store_ID = @Store_ID AND DBR_DATE...
December 16, 2003 at 2:12 pm
REPLACE(CONVERT(char(8),@Business_Date-1,1),'/','')
--Jonathan
December 16, 2003 at 11:51 am
quote:
Jonathan,the paper is about SQL7. I thought the query optimizer hase greatly improved between these versions. Is it still valid for SQL2k?
Frank
December 16, 2003 at 7:51 am
quote:
Thanks Jonathan,I read the paper (Automating Statistics Management for Query Optimizers ftp://ftp.research.microsoft.com/users/AutoAdmin/stats.pdf). Very **very** complex!
If I understand well, there's no simple rule...
December 15, 2003 at 3:43 pm
quote:
It's been a while since I done that conversion, therefore I'm not 100% sure, but I think something like this would work
December 15, 2003 at 2:04 pm
quote:
I ran the sp on my test server, it shows 37 options. What's the purpose to run this?Robert
December 12, 2003 at 3:26 pm
Could you post the result from running this?
EXEC sp_configure 'show advanced options', '1'
reconfigure
EXEC sp_configure
--Jonathan
December 12, 2003 at 11:30 am
You're mixing together two different security models. If you want to use SQL Server security, then don't use "Integrated Security=SSPI." If you want to use Windows security, then...
December 12, 2003 at 10:21 am
quote:
I was wondering if there is a way to put a breakpoint/trigger in my sql 2k database that will stop loops...
December 12, 2003 at 7:50 am
Viewing 15 posts - 331 through 345 (of 921 total)