Forum Replies Created

Viewing 10 posts - 1 through 11 (of 11 total)

  • RE: UNION IF query problem

    I appreciate everyone's answers and I am going to play with them to see if I can get it to work. In the meantime, the requirements for what I...

  • RE: UNION IF query problem

    Thanks for the reply but that isn't how my query is structured.

    My query is structured like this:

    IF {condition}

    Select...

    Else

    Select...

    UNION ALL

    IF {condition}

    Select...

    Else

    Select...

    Thanks!

  • RE: Need help with Group By query

    Thanks everyone,

    I figured it out.

    Based on everyone's ideas, I realized that if I just did my group by on the Version and FISCALYear columns and left my constant value in...

  • RE: Need help with Group By query

    Hi Guys,

    Thanks for you help so far. I tried the recommended method of putting 'Operating Expenses' in Group By and it gave an error saying that group by expressions...

  • RE: Incorrect Syntax in a USE statement

    Thanks for all your replies. I can't directly state the db name. This is a script going out to customers and the database could be any name. ...

  • RE: Incorrect Syntax in a USE statement

    I have a script that goes into an application's database, calculates some data and then puts the data into a simpler target database to make external reporting much easier.

    I didn't...

  • RE: Incorrect Syntax in a USE statement

    not sure what you mean. Did you mean to include some code?

    Thanks!

    Paul

  • RE: Help with date difference query

    Hi All,

    Thanks for the great suggestions and I am going to try this morning.

    The main purpose of my query is to find tickets where it took my team longer than...

  • RE: Side by side installations of Sql Server 2000 & 2005

    I have MSDE 2000 SP3A and SQL Server 2005 Developer Edition running on my machine with no problems. MSDE 2000 is a default instance, SQL 2005 is a...

  • RE: Sum and Convert issue, query not working

    If I run the following:

    SELECT CONTACT1.COMPANY, SUM(convert(datetime,CONTHIST.DURATION))

    FROM CONTACT1 INNER JOIN CONTHIST ON CONTACT1.ACCOUNTNO = CONTHIST.ACCOUNTNO

    WHERE (CONTHIST.RESULTCODE LIKE 'CT%') AND (CONTHIST.ONDATE CONVERT(DATETIME, '2003-8-01 00:00:00', 102))

    GROUP BY...

Viewing 10 posts - 1 through 11 (of 11 total)