Forum Replies Created

Viewing 15 posts - 7,951 through 7,965 (of 8,760 total)

  • RE: Need to find Saturday # between two dates

    Here is a quick solution using a CALENDAR CTE

    😎

    USE tempdb;

    GO

    ;WITH SampleData (PERSON,[HOURS],[RATE],[CODEID],[DOW],[DATE]) AS

    (

    SELECT 1234,7.00,40.00,01,'Thursday','05/01/2014'

    UNION ALL SELECT 1234,8.0,40.0,01,'Friday','05/02/2014'

    UNION ALL...

  • RE: Processing of XML with OPENROWSET gives out of memory exception

    N_Muller (6/20/2014)


    I have an XML file about 25MB. When I read it with openrowset it gives me 'System.OutOfMemoryException'. The machine I'm running has 16GB of RAM and memory is...

  • RE: no. of columns in excel may vary

    ykonline (6/20/2014)


    Hi,

    I want to insert data periodically from an excel file into a table using a SSIS. But each time the no. of columns in excel may vary.

    Suppose, the...

  • RE: Running total error

    Take a look at this article, How to Return Running Product Totals.

    I think the method I used earlier has already been posted on this thread, it is the same as...

  • RE: Running total error

    Bear with me here but is this the result you are after?

    😎

    MyLongDesiredRunningTotalSequenceWK NOACCOMPUSD_AMOUNTSOA_TYPE

    100.00191620112003100.00Agent

    300.002101620412003200.00Freight

    450.003111620712003150.00Agent

    700.005121620812003250.00Costs

    1100.006131622412003400.00Cost

    1600.007141629512003500.00Freight

    2140.008151629512003540.00Cost

  • RE: Running total error

    pwalter83 (6/20/2014)


    Hi,

    I am trying to calculate running total in sql as its not giving me the desired result on SSRS (on the fly calculation).

    I tried using the following code but...

  • RE: A View that is Odd

    AndrewSQLDBA (6/19/2014)


    Hello Everyone

    I hope that you are having a very nice day. To some, it is already friday, the weekend is closer for you.

    I am selecting data from a View...

  • RE: round

    antonela (6/20/2014)


    Is there a funcion in sql server 2005 to obtain this result?

    For a number =0,55 I want to have 1

    For a number =0,45 I want to have 0

    For...

  • RE: Help to do this query!!

    jaimepc199 (6/19/2014)


    I forget something, is there any way to use windows functions on this example?

    thanks 😀

    As the set has only one divisor (codcategory) and there is no requirement to preserve...

  • RE: Counting the characters in a string before a space

    Jeff Moden (6/19/2014)


    My problem is that I really don't understand what you're trying to do. This start out with "counting characters in a string before a space" and I...

  • RE: SQL Server Database Developer Role Dying?

    OCTom (6/19/2014)


    GilaMonster (6/19/2014)


    david.tyler (6/18/2014)


    My current employer is trying to convince our DB group SQL Server is a dying technology and open source is the way to go.

    So what's his motivation...

  • RE: returning only portion of string

    Yet two more ways

    😎

    USE tempdb;

    GO

    DECLARE @TSTR TABLE

    (

    TSTR_ID INT IDENTITY(1,1) PRIMARY KEY CLUSTERED NOT NULL

    ,TSTR_VALUE VARCHAR(50) NOT NULL

    );

    INSERT INTO...

  • RE: returning only portion of string

    Another of many

    😎

    DECLARE @STR_A VARCHAR(50) = '1.9999-Q1'

    ;WITH STR_POS AS

    (

    SELECT

    CHARINDEX(CHAR(46),@STR_A) AS P1

    ...

  • RE: Schedule table with open/closed slots

    Is it something along these lines that you are after?

    😎

    SELECT

    TBO.schedule_time

    ,'OPEN' AS open_closed

    FROM

    (

    SELECT

    ...

  • RE: I need a pivot of this data

    Many ways of doing this, here are two quick examples. BTW, thanks for the nice DDL/sample.

    😎

    Slightly long winded pre 2012.

    ;WITH LIC_TYPE AS

    (

    SELECT

    TL.ID

    ,ROW_NUMBER...

Viewing 15 posts - 7,951 through 7,965 (of 8,760 total)