Forum Replies Created

Viewing 15 posts - 481 through 495 (of 844 total)

  • RE: Trying to speed up this 'GetWorkingDays' function.

    It's Friday so maybe I'm not thinking about this correctly.  But you are just trying to count the number of workdays between two dates, Correct?  Excluding the holidays you listed...

    -------------------------------------------------------------
    we travel not to escape life but for life not to escape us
    Don't fear failure, fear regret.

  • RE: How to get columns which has null's

    This code will get you close.  Maybe you or someone else can start with this to figure out how to be able to set it up to handle multiple tables. ...

    -------------------------------------------------------------
    we travel not to escape life but for life not to escape us
    Don't fear failure, fear regret.

  • RE: How to get columns which has null's

    vsamantha35 - Wednesday, October 18, 2017 12:14 PM

    Thanks below86 for the correction. Can we make this dynamic script ? Should be able...

    -------------------------------------------------------------
    we travel not to escape life but for life not to escape us
    Don't fear failure, fear regret.

  • RE: How to get columns which has null's

    I modified your data and tried to use ChrisM's code.  I added a value to C2 in #T3, Chris's code still says C2 is NULL on all 3 tables.  I...

    -------------------------------------------------------------
    we travel not to escape life but for life not to escape us
    Don't fear failure, fear regret.

  • RE: How to get columns which has null's

    Since your 3 tables have the same layout couldn't you union them together into one table then check that one table's columns for NULL?

    If you are working with...

    -------------------------------------------------------------
    we travel not to escape life but for life not to escape us
    Don't fear failure, fear regret.

  • RE: Query Help

    Your statement:
    Nested case stmt
    (case when gn.glacctid = 25 then t.amex end ) +
    (case when gn.acctid = 26 then t.vmc end) +
    case when gn.acctid = 22 the...

    -------------------------------------------------------------
    we travel not to escape life but for life not to escape us
    Don't fear failure, fear regret.

  • RE: Automate Table Field Names In Query

    What about using what I like to call a 'stacked' table to put this in?  You use the unpivot, in combination with a prior post on getting the column names. ...

    -------------------------------------------------------------
    we travel not to escape life but for life not to escape us
    Don't fear failure, fear regret.

  • RE: Naming Conventions - Table and Column Names

    IMHO, never ever use spaces.  Use underscores to make it more readable to the users.  I prefer underscores to camel, but I usually follow what the 'standard' is for the...

    -------------------------------------------------------------
    we travel not to escape life but for life not to escape us
    Don't fear failure, fear regret.

  • RE: Who's Responsible?

    I would not pay for anything, if the company wants me to try something then they can pay for it.  If I was asked to pay for a mistake I...

    -------------------------------------------------------------
    we travel not to escape life but for life not to escape us
    Don't fear failure, fear regret.

  • RE: How can I improve performance of this query further?

    IMHO I would try removing the SUM and group by from the 'meat' SQL, since you are summing the data in the other SQL.  I'm not saying it will help...

    -------------------------------------------------------------
    we travel not to escape life but for life not to escape us
    Don't fear failure, fear regret.

  • RE: List of all dtsx files used in [Integration Services Catalog] - I need help with the SELECT statement

    Here is what I've used to search for fields within SSIS packages(dtsx files) stored in the MSDB database.


    --Connect to database:  msdb
    SELECT [name] AS SSISPackageName,

    -------------------------------------------------------------
    we travel not to escape life but for life not to escape us
    Don't fear failure, fear regret.

  • RE: Link account to multiple email adresses

    I guess I wanted this because of the reason I needed it last year.  I used to have my work email address associated with my account. Password was being saved...

    -------------------------------------------------------------
    we travel not to escape life but for life not to escape us
    Don't fear failure, fear regret.

  • RE: SUBSTRING and CHARINDEX query.... please help.

    If you want to do it with Substring and CHARINDEX here you go.
    <SQL>
    DECLARE @testVARCHAR(500);
    SET @test-2 = 'http://stable-test.test.net/api/files/fs.testcollection/TP-0000000.pdf/download/';

    SELECT SUBSTRING(@test,
    CHARINDEX('/', @test-2, CHARINDEX('/', @test-2, CHARINDEX('/', @test-2,...

    -------------------------------------------------------------
    we travel not to escape life but for life not to escape us
    Don't fear failure, fear regret.

  • RE: Byte Me: Killer Conference

    will 58232 - Wednesday, June 21, 2017 12:25 PM

    The brand new go to technology in the NoSQL arena is TrumpDB.

    The  same query...

    -------------------------------------------------------------
    we travel not to escape life but for life not to escape us
    Don't fear failure, fear regret.

  • RE: How to get these queries into a view?

    I think this would work.

    SELECT SUBQ.issue_number, SUBQ.type_code, SUBQ.alt_type_code,
    SUM(SUBQ.data_value_1) AS data_value_1_sum,
    SUM(SUBQ.data_value_2) AS data_value_2_sum
    FROM (SELECT issue_number, line_number, type_code,
    CASEWHEN alt_type_code IN ('NONE', '')
    THEN '00'...

    -------------------------------------------------------------
    we travel not to escape life but for life not to escape us
    Don't fear failure, fear regret.

Viewing 15 posts - 481 through 495 (of 844 total)