Forum Replies Created

Viewing 15 posts - 151 through 165 (of 402 total)

  • RE: Hierarchical Query to Return All Children

    Both, thank you for the replies very helpful

    I'm interested (just out of curiosity) if there are any other ways to achieve the same result without using a recursive query if...

    ==========================================================================================================================
    A computer lets you make more mistakes faster than any invention in human history - with the possible exceptions of handguns and tequila. Mitch Ratcliffe

  • RE: Complex query

    Why did you make the customer id an integer?

    Errm because it makes MUCH more sense than a CHAR(10) Mr C!!! :crazy:

    ==========================================================================================================================
    A computer lets you make more mistakes faster than any invention in human history - with the possible exceptions of handguns and tequila. Mitch Ratcliffe

  • RE: The Beer Cooler Thread

    Can you ship some to the UK for us please? Reading them reviews after a quick Google, sounds right up my street.

    Yep - I would be up for some...

    ==========================================================================================================================
    A computer lets you make more mistakes faster than any invention in human history - with the possible exceptions of handguns and tequila. Mitch Ratcliffe

  • RE: Help with Query - group by error

    Sorry just got back from a meeting - Looking much better now 🙂

    ==========================================================================================================================
    A computer lets you make more mistakes faster than any invention in human history - with the possible exceptions of handguns and tequila. Mitch Ratcliffe

  • RE: Divide by zero error encountered.

    Since two of the main methods have already been suggested I thought I'd introduce a third into the mix for completeness:

    SET ARITHABORT OFF

    SET ANSI_WARNINGS OFF

    SELECT ISNULL([Numerator] / [Denominator], 0)

    ==========================================================================================================================
    A computer lets you make more mistakes faster than any invention in human history - with the possible exceptions of handguns and tequila. Mitch Ratcliffe

  • RE: Help with Query - group by error

    karen.blake (7/13/2012)


    Thanks Andy, will give it a try.

    When you say overcomplicated...what do you mean? Always looking to improve , this query is quite old now (I had to dig it...

    ==========================================================================================================================
    A computer lets you make more mistakes faster than any invention in human history - with the possible exceptions of handguns and tequila. Mitch Ratcliffe

  • RE: Help with Query - group by error

    Give that a try

    Just as a side looks like this query is over complicated a bit..

    But if your happy 🙂

    SELECT suppgroup, CAST(AvgMins/60 AS VARCHAR(10)) + ':' + RIGHT('00' + CAST(AvgMins%60...

    ==========================================================================================================================
    A computer lets you make more mistakes faster than any invention in human history - with the possible exceptions of handguns and tequila. Mitch Ratcliffe

  • RE: Help with Query - group by error

    No worries 🙂

    ==========================================================================================================================
    A computer lets you make more mistakes faster than any invention in human history - with the possible exceptions of handguns and tequila. Mitch Ratcliffe

  • RE: Help with Query - group by error

    Hi

    Your GROUP BY was outside your sub-query

    SELECT CAST(AvgMins/60 AS VARCHAR(10)) + ':' + RIGHT('00' + CAST(AvgMins%60 AS VARCHAR(10)), 2)

    FROM

    (SELECT SUM(fix_time/60)/COUNT (*) AS AvgMins, suppgroup

    FROM

    calltable

    WHERE

    suppgroup IN ('WEBS', 'Tech','SQL')

    AND...

    ==========================================================================================================================
    A computer lets you make more mistakes faster than any invention in human history - with the possible exceptions of handguns and tequila. Mitch Ratcliffe

  • RE: The Beer Cooler Thread

    I have the alocohol for the weekend lined up, 2 bottles of Innis & Gunn's, 2 bottles of Moorhouse brewery's Pendle Witches Brew and 2 bottles of Hoegarden Rose.

    Sounds like...

    ==========================================================================================================================
    A computer lets you make more mistakes faster than any invention in human history - with the possible exceptions of handguns and tequila. Mitch Ratcliffe

  • RE: Complex query

    Hi

    There are certainly other ways of doing this but due to time constraints here is one way if I have understood correctly:

    DECLARE @MYTABLE1 AS TABLE

    (

    CustomerId INT

    ,TransactionId INT

    ,TransDate DATETIME

    ,PointsEarned INT

    )

    DECLARE...

    ==========================================================================================================================
    A computer lets you make more mistakes faster than any invention in human history - with the possible exceptions of handguns and tequila. Mitch Ratcliffe

  • RE: Query Help

    Hi I may be misunderstanding but shouldn't your main query be:

    SELECT *

    FROM

    Sales

    WHERE

    R_Type IN (@R_Type)

    AND T_Type IN (@T_Type)

    Andy

    ==========================================================================================================================
    A computer lets you make more mistakes faster than any invention in human history - with the possible exceptions of handguns and tequila. Mitch Ratcliffe

  • RE: Warning when I ad an Oracle OLE DB Connection

    I had that warning the other day but didn't get round to investigating..

    Thanks for posting the solution 🙂

    Andy

    ==========================================================================================================================
    A computer lets you make more mistakes faster than any invention in human history - with the possible exceptions of handguns and tequila. Mitch Ratcliffe

  • RE: SQL Query Help......

    Or UNPIVOT

    CREATE TABLE #Temp1

    (EmpName varchar(50),

    PAccess varchar(2),

    HAccess varchar(2),

    CAccess varchar(2))

    INSERT INTO #Temp1 values ('John D','0','1','1')

    INSERT INTO #Temp1 values ('Chris H','0','0','1')

    INSERT INTO #Temp1 values ('Mary G','1','0','0')

    INSERT INTO #Temp1 values ('Tom H','1','1','0')

    INSERT INTO #Temp1...

    ==========================================================================================================================
    A computer lets you make more mistakes faster than any invention in human history - with the possible exceptions of handguns and tequila. Mitch Ratcliffe

  • RE: Primary Key update

    Hi

    This error means that you have a foreign key referencing your table.

    To perform this update you will have to remove the constraint Fk_Inventory_BookLocation from the table

    I would be very careful...

    ==========================================================================================================================
    A computer lets you make more mistakes faster than any invention in human history - with the possible exceptions of handguns and tequila. Mitch Ratcliffe

Viewing 15 posts - 151 through 165 (of 402 total)