Forum Replies Created

Viewing 15 posts - 2,101 through 2,115 (of 4,085 total)

  • RE: Splitt values from one column in two rows

    It looks like a simple pivot/crosstab. Cross Tabs and Pivots, Part 1 – Converting Rows to Columns[/url]

    Drew

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: SUm up XML field data based on conditions

    Your XML is incomplete.

    I think you have the wrong scope for your CASE/SUM statement. You have your SUM inside your CASE when you probably want your CASE inside your...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: Maintaining your SQL scripts once 'deployed'

    Definitely use a VCS. We're using TortoiseSVN.

    Drew

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: Bitwise & NULL

    Jack Corbett (12/13/2016)


    Hey, long-time no hear from.

    Any chance you could normalize the structure so the Yes/No columns are in a separate or separate table(s). Maybe...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: Are the posted questions getting worse?

    Does any else think that this response borders on being unethical? http://www.sqlservercentral.com/Forums/FindPost1842475.aspx It sounds like she wants to use this approach just to avoid due diligence.

    Drew

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: Bitwise & NULL

    Part of the reason that bits were introduced was because of the complexity of using bitfields and bitwise computations. You're already seeing some of the issues, in that you...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: Confusion Over OR and And Operators

    SQLUSERMAN (12/10/2016)


    Suppose I want to find customers in the customers table who are not in the US or the UK.

    To me the query for the above requirements would be as...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: Last 2 years and YTD

    paulo.margarido (12/12/2016)


    Or ... replace

    MMartin1 (11/30/2016)


    declare @fromDate date, @toDate date ;

    select @fromDate=

    dateadd(m,0,cast(Cast(year(getdate())-2 as char(4)) as date))

    select @toDate = cast(getdate() as date) ;

    Select @fromDate , @todate

    by

    declare @fromDate date,...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: BATCHWISE Update

    You're not excluding the records that you've already processed, so you're processing them over and over again. Try adding the line

    WHERE a.load_id <> q.load_id

    Drew

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: Schema

    padmakumark26 (12/8/2016)


    We are combining two db into one .Now both have default schema as dbo.

    In the New combined DB we will have two user(Hms,EAM) and two schema (HMS,EAM) and...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: Groups and Islands problem

    Peter Brinkhaus (12/8/2016)


    You have to test it yourself if it performs better, but here's simplified alternative:

    SELECT

    Q.memid,

    Q.EffectiveDate,

    Q.termdate,

    ...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: Merge Output statement [Combine Deleted.* with Inserted.*]

    You're seeing the before (deleted.*) and after (inserted.*) picture. You can't do that with a single set of columns. What are you trying to do where this is...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: Date format for mm/dd/yyyy h:mm:ss AM/PM ?

    jbalbo (12/7/2016)


    Hi

    Having a problem trying to figure out formatting a datettime as "mm/dd/yyyy h:mm:ss AM/PM"

    Any help would be great!!

    Thanks

    datetime fields do not have a format, because they need to be...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: Unexpected Behavior With TOP clause in a DELETE

    CELKO (12/6/2016)


    Unfortunately you have a TOP () operator. This proprietary and totally nonrelational operation requires a sort, hence the order by clause.

    Actually, that's not true. The ORDER BY clause...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: Query optimization

    CELKO (12/6/2016)


    Now you're just making up stuff to support your claims.

    No, I get called in every now and then by product developers a lot of different SQL companies to...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

Viewing 15 posts - 2,101 through 2,115 (of 4,085 total)