Forum Replies Created

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

  • RE: Splitt values from one column in two rows

    sgmunson (12/14/2016)


    drew.allen (12/14/2016)


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

    Drew

    Yes, but that assumes that the values "StartDate" and "EndDate" are...

  • 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

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

  • RE: Maintaining your SQL scripts once 'deployed'

    Definitely use a VCS. We're using TortoiseSVN.

    Drew

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

  • 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

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

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

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

  • 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

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

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

    ...

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

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

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

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