Forum Replies Created

Viewing 15 posts - 6,121 through 6,135 (of 8,731 total)

  • RE: T-SQL: Cumulative SUM

    The following article explains a way of doing this. Read it carefully and ask any questions that you have.

    http://www.sqlservercentral.com/articles/T-SQL/68467/

    For better answers, read the article linked in my signature.

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: Convert Rows into Columns

    sgross 10581 (7/17/2014)


    Is it possible to make this dynamic to discover the needed columns without Dynamic SQL?

    No, you need to use dynamic sql to have a dynamic number of columns.

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: Convert Rows into Columns

    Robert.Sterbal (7/17/2014)


    Looks like a great technique, although more than half the sites I support are SQL Server 2K

    I'll have to figure out how to do this in excel (with the...

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: Convert Rows into Columns

    I once had a similar requirement and the best option was to generate the columns in the reporting tool. That was on VFP and I'm not sure if it's possible...

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: Are the posted questions getting worse?

    Sean Lange (7/16/2014)


    Evil Kraig F (7/16/2014)


    Sean Lange (7/16/2014)


    Lynn Pettis (7/16/2014)


    patrickmcginnis59 10839 (7/16/2014)


    Jack Corbett (7/16/2014)


    Eirikur Eiriksson (7/16/2014)


    No implied either, my respect on handling the situation! So far, JC is...

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: daily report

    Another option is to use bcp to create the csv file or SSIS for any of the file options and possibly sending it via email.

    SSRS seems overkill for this task,...

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: Suggestions on how to improve this View that is using correlated subqueries

    T-SQL beginnger (7/16/2014)


    Luis, your solution is also working fine. Just had few typos in which I've fixed and its giving the right results.

    Thanks

    It's good to know that my blind-coding abilities...

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: Suggestions on how to improve this View that is using correlated subqueries

    I made a few changes to give you an idea. They might be wrong, but hopefully you can modify them accordingly.

    WITH PStatus AS(

    SELECT t.acct_no

    ...

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: sql server 2008 not supporting sql server 2000

    I'm not sure on why you included the "create" word. It shouldn't be part of the table hint, that might be the error and should occur as well on 2000.

    You...

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: Are the posted questions getting worse?

    Stefan Krzywicki (7/16/2014)


    Luis Cazares (7/16/2014)


    Jack Corbett (7/16/2014)


    Stefan Krzywicki (7/16/2014)


    I posted a question here (http://www.sqlservercentral.com/Forums/Topic1593226-391-1.aspx) on Memory Grants and Varchar(max) and I'd love to hear any opinions the people...

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: Are the posted questions getting worse?

    Jack Corbett (7/16/2014)


    Stefan Krzywicki (7/16/2014)


    I posted a question here (http://www.sqlservercentral.com/Forums/Topic1593226-391-1.aspx) on Memory Grants and Varchar(max) and I'd love to hear any opinions the people in this thread might...

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: Cross Tab, UNION or Different solution for this problem?

    vecerda (7/16/2014)


    I get this error:

    Msg 4104, Level 16, State 1, Line 20

    The multi-part identifier "b.recID" could not be bound.

    not sure what I am doing wrong as the alias is clearly...

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: Cross Tab, UNION or Different solution for this problem?

    ChrisM@Work (7/16/2014)


    The ISDATE is for NULL checking...

    You're right, I didn't see the DDL before I posted.

    However, this puzzles me:

    [Store_Opens_Baseline] [nvarchar](255) NULL,

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: Cross Tab, UNION or Different solution for this problem?

    This is an idea on what you could do. You might want to create a computed column to remove the case from the join clause.

    DECLARE @FileId int

    SET @FileId=345;

    WITH Brands AS(

    ...

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: Use a Like in a Replace Cast sentence?

    Additional to that, you should really change your text columns into varchar(max) or even a normal varchar. The text datatype has been deprecated and will be removed in a future...

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2

Viewing 15 posts - 6,121 through 6,135 (of 8,731 total)