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

  • 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:

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

  • RE: Help with Query - group by error

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

  • 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)

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

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

  • RE: Help with Query - group by error

    No worries 🙂

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

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

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

  • 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

  • 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

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

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

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