Forum Replies Created

Viewing 15 posts - 3,211 through 3,225 (of 4,087 total)

  • RE: a very COMPLEX aggregation query

    I'm getting different results from Dwain for one of the records. He has WA_Traffic in a Proposed Status for <30 days, but I'm getting 30-60 days.

    Here is how I...

  • RE: a very COMPLEX aggregation query

    polkadot (4/19/2012)


    drew. will you please elaborate the 'certain circumstances'?

    I shall venture to disagree with that statement under certain circumstances.

    That was a quote of Dwain.C. He mentions some of...

  • RE: a very COMPLEX aggregation query

    dwain.c (4/19/2012)


    Drew, you said:

    After that, you should ship it off to your reporting tool to do rest. You are going to have to pivot the results to get your counts...

  • RE: Tech Recruiters That Don't Understand the Tech

    GilaMonster (4/18/2012)


    That was just an example. Sub any 2008-specific feature.

    I realize it was just an example, but if there were a 2008-specific feature that was required for the job,...

  • RE: a very COMPLEX aggregation query

    It looks like the first line is a grand total for Civil.

    Part of the problem is that you're using T-SQL as a reporting tool and it's not. You'd be...

  • RE: Tech Recruiters That Don't Understand the Tech

    GilaMonster (4/18/2012)


    drew.allen (4/18/2012)


    How do you get the recruiter to understand that the differences between SQL 2005 and SQL 2008 are inconsequential?

    How do you know they're inconsequential for the particular job?...

  • RE: Columns based on Date Range

    dwain.c (4/18/2012)


    However, this only works when the period is specifically 8 days long. If you need that period to vary, you're only recourse is to use dynamic SQL and...

  • RE: if------then ----else in select statement

    It would help if you formatted your code using the IFCode Shortcuts &#28;code="sql"&#29; so that we could more easily read your code.

    select empname ,(

    select case when empno is null...

  • RE: Do not grant permission to create or modify the database objects

    You'd probably get more responses if you posted in the correct forum. There is a forum specifically for SQL Server 2008 Administration.

    Drew

  • RE: T-SQL help

    I should issue a caveat on that code. It is NOT necessarily equivalent to the original query. They will produce the same results if the data includes each...

  • RE: T-SQL help

    As a note of comparison, ColdCoffee's approach requires four scans of the table and requires a total of 32 logical reads, whereas my queries only require one logical read per...

  • RE: T-SQL help

    Here's an improved version of my original query. It only scans the table once instead of twice.

    SELECT u.SourceA, u.SourceB, t.Counts

    FROM #Temp1 AS t

    CROSS APPLY(

    SELECT SourceA, SourceB

    UNION

    SELECT SourceB, SourceA

    ) AS...

  • RE: How to return a date in Australian date format?

    mtassin (4/16/2012)


    Ummm?

    SET DATEFORMAT DMY;

    SELECT CONVERT(VARCHAR,GETDATE(),103)

    That format has a leading zero on both the day and the month (05/04/2012). The expected results given drops the leading zero on the day,...

  • RE: T-SQL help

    You're looking for a UNION, although you're duplicating a lot of your data by doing so. I'm not sure why you would want to do this.

    SELECT SourceA, SourceB, Counts

    FROM...

  • RE: How to return a date in Australian date format?

    Mike01 (4/16/2012)


    To avoid confusion for testing, use a day greater than 12.

    Well, I think the point is that the format drops the leading zero on days, but not months, so...

Viewing 15 posts - 3,211 through 3,225 (of 4,087 total)