Forum Replies Created

Viewing 15 posts - 331 through 345 (of 921 total)

  • RE: pulling off unique data by hierarchical selection

    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...



    --Jonathan

  • RE: need help

    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...



    --Jonathan

  • RE: How to get Time from Getdate()

    SELECT RIGHT(STUFF(CONVERT(char(26),GETDATE(),9),21,4,' '),10)

    --Jonathan



    --Jonathan

  • RE: Group By........

    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...



    --Jonathan

  • RE: Date conversion Conundrum

    quote:


    Thank you Jonathan, but this resulted in an out of range datetime value. Any ideas why that would come up?



    --Jonathan

  • RE: Date conversion Conundrum

    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...



    --Jonathan

  • RE: Date conversion Conundrum

    REPLACE(CONVERT(char(8),@Business_Date-1,1),'/','')

    --Jonathan



    --Jonathan

  • RE: Statistics on multiple columns

    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

    http://www.insidesql.de

    http://www.familienzirkus.de



    --Jonathan

  • RE: Statistics on multiple columns

    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...



    --Jonathan

  • RE: Init cap

    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



    --Jonathan

  • RE: error 17883

    quote:


    I ran the sp on my test server, it shows 37 options. What's the purpose to run this?

    Robert




    --Jonathan

  • RE: error 17883

    Could you post the result from running this?

    
    
    EXEC sp_configure 'show advanced options', '1'
    reconfigure
    EXEC sp_configure

    --Jonathan



    --Jonathan

  • RE: EXCEL to SQL ADODB.Command (Newbie)

    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...



    --Jonathan

  • RE: trapping large loops

    quote:


    I was wondering if there is a way to put a breakpoint/trigger in my sql 2k database that will stop loops...



    --Jonathan

  • Viewing 15 posts - 331 through 345 (of 921 total)