Forum Replies Created

Viewing 15 posts - 3,181 through 3,195 (of 4,085 total)

  • RE: How to update/delete rows from different tables (tables have relationship)?

    marksquall (5/3/2012)


    Actually that is what I read already in other post that you cannot update/delete all tables with one single query, each table has it's own dedicated [font="Courier New"]UPDATE[/font] query...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: insert 100 rows without using loop or union etc.,

    I agree with you that CROSS JOIN being explicit is a superior syntax, for readability mainly. I don't use commas that way for that exact reason. But your...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: RS with two date columns from a single date column

    Jeff Moden has a great article on this very subject. Cross Tabs and Pivots, Part 1 – Converting Rows to Columns[/url]

    Drew

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: insert 100 rows without using loop or union etc.,

    It clearly says,

    Joins that use the deprecated syntax fall into two categories:

    Inner Join

    ...

    Outer Join

    or were you referring to not finding CROSS JOIN?

    It doesn't specifically state anything about CROSS JOINS. ...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: insert 100 rows without using loop or union etc.,

    Cadavre (5/2/2012)


    FROM CTE x, CTE y;

    drew.allen (5/2/2012)


    This join syntax has been deprecated. You shouldn't be using it in new development. Use CROSS JOIN instead.

    GSquared (5/2/2012)


    Per what?

    The Outer Join...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: insert 100 rows without using loop or union etc.,

    Cadavre (5/2/2012)


    NLV (5/2/2012)


    Hi,

    I want to insert 100 rows like (1,2,3,4,..100) without using loops into a table using CTE. can you please help.

    WITH CTE(n) AS(SELECT 1

    ...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: How to update a table

    Please don't start multiple threads on the same topic. It fragments the replies.

    Please post in the original thread: http://www.sqlservercentral.com/Forums/Topic1293567-338-1.aspx.

    Drew

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: How to make a UPDATE

    I think that this is just a language problem. When Sean said to replace = with IN, he only meant the one in the WHERE clause, not all of...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: Delete duplication with where clause condition

    You want to be careful here. Life isn't nearly as simple as your model implies. For example, someone could get married, divorced, and then re-married. Their current...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: Adding Computed Column

    Sean Lange (4/26/2012)


    bpowers (4/26/2012)


    Not yet, but I am working on it. It didn't like the P.USED.

    Not sure what you mean by "It didn't like". 😛

    I should be the same as...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: CR to SSRS Expression Help

    It's actually very easy. It's simply concatenating two conditional expressions together. The SSRS equivalent would be something like the following

    =IIf(InStr(VIEW_Creditors.DISCREPENCY_CODE.value, Parameters!Contingent_Code.value) > 0, Parameters!Contingent_Code.value, "") & IIf(InStr(VIEW_Creditors.DISCREPENCY_CODE.value, Parameters!Unliquidated_Code.value)...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: Occurrence count

    The problem is that you're trying to do it all with one function, but you need separate functions for each week.

    SELECT Resp_ID, Brand

    ,COUNT(DISTINCT CASE WHEN [Week] = 2 THEN Q5...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: Dynamic sorting; ASC VS DESC

    ColdCoffee (4/24/2012)


    You would better off be writing it in IF...ELSE block. THat would produce a decent plan always.

    But if u insist in using single query to do that, then u...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: Filtering rows from one table.

    Here is how I would approach this.

    WITH CTE AS (

    SELECT DateValue, [Value], ROW_NUMBER() OVER( PARTITION BY DateValue, [Value] ORDER BY (SELECT 1) ) AS rn

    FROM #tableOne

    EXCEPT

    SELECT DateValue, [Value], ROW_NUMBER() OVER(...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: Occurrence count

    I agree with Lynn here. If you can't represent your problem with 50 or fewer records, then your problem is probably too complex to solve in a forum post.

    Also,...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

Viewing 15 posts - 3,181 through 3,195 (of 4,085 total)