Forum Replies Created

Viewing 15 posts - 2,581 through 2,595 (of 10,144 total)

  • RE: Query to find "games behind" in a sports table

    aaron.reese (11/14/2014)


    ...VARCHAR / NVARCHAR - who cares on a small adatabase that is only ever going to be used with Latin CP1 collation unless the number of records is going...

  • RE: Dynamic SQL Truncating at 4K

    measterbro (3/12/2015)


    Unfortunately I am not able to post data or DDL since it is proprietary. I just thought there might be a known problem with dynamic SQL and appending variables,...

  • RE: Why am a receiving a NULL value?

    chef423 (3/11/2015)


    Ticket Table Test Data

    SELECT '66517','0','Deu Bank','1386.00','203.74','0.00','1866.94','1866.94','277.20','NULL','NULL','205','2014-06-25 17:03:31.407','2014-06-25 22:21:12.120','1','NULL','NULL','NULL','205','0','0','205','NULL','154','1386.00','203.74','2679','1753-01-01 00:00:00.000','22','0','7','0','0','0.00','1','NULL','53292974-1149-4AEE-B8C9-1BE0990A989F','0x000000000177F502','2014-06-25 19:56:55.633','NULL','0','FullyPaid','0.00','0','NULL','NULL'

    Msg 213, Level 16, State 1, Line 2

    Column name or number of supplied values does not match table definition.

    You're not...

  • RE: Using DelimitedSplit8K

    TSQL Tryer (3/11/2015)


    Worked it out -

    select officer_code

    ,department

    ,eff_date

    ,CASE WHEN LEAD (eff_date-1, 1, 0) OVER (PARTITION BY officer_code ORDER BY eff_date) =...

  • RE: Why am a receiving a NULL value?

    chef423 (3/8/2015)


    ...

    Caveat:[/u] The WHERE clause cannot be used in writing this Query as it is used to determine the time span of the report by a line called WHERE %PARAMS%,...

  • RE: Are the posted questions getting worse?

    rodjkidd (3/10/2015)


    Eirikur Eiriksson (3/10/2015)


    rodjkidd (3/9/2015)


    Eirikur Eiriksson (3/9/2015)


    Grant Fritchey (3/9/2015)


    Great seeing everyone this week at SQLBits.

    And, I got to meet Gianluca and Eirikur for the very first time. Total pleasure gentlemen....

  • RE: Tally OH! An Improved SQL 8K “CSV Splitter” Function

    dwain.c (3/10/2015)


    I guess the real point of my post was not to offer competition to DelimitedSplit8K (or any of its variants).

    Rather to see if anybody has ever seen this "short-circuiting...

  • RE: Left joins and query plan compile times

    Grant Fritchey (3/9/2015)


    ChrisM@Work (3/9/2015)


    The optimiser has difficulty with more than seven or eight tables in the FROM list regardless of how they are joined. More than that and you are...

  • RE: Why am a receiving a NULL value?

    This ON clause will generate an error as it breaks at least two syntax rules:

    JOIN dbo.PeriodDefinition AS pd

    ON CAST(t.dt_close_time AS time) BETWEEN CAST(pd.dt_start AS time) CASE when i_period_definition_id =...

  • RE: Left joins and query plan compile times

    Bouke Bruinsma (3/8/2015)


    We have a view with many left joins. The original creators of this view might have been lazy or sloppy, I don't know. I have rewritten the query...

  • RE: Today's Random Word!

    SQLRNNR (3/4/2015)


    toot

    ding

  • RE: Today's Random Word!

    laurie-789651 (3/4/2015)


    BWFC (3/4/2015)


    Ed Wagner (3/4/2015)


    djj (3/4/2015)


    psingla (3/4/2015)


    Woot!

    Woot!

    Cheer

    Wine

    Vino

    You're bored, mate. Beer sometime?

  • RE: find record(s) that exceed budget value

    A table displaying the required results would be helpful.

    Try this:

    ;WITH RunningTotal AS (

    SELECT

    a.id, a.account, a.deposit, b.Budget,

    [Total] = SUM(a.deposit) OVER (PARTITION BY a.account ORDER BY a.id)

    FROM #TestData a

    INNER JOIN...

  • RE: Dynamic Return type in a function

    karthik82.vk (3/3/2015)


    Hi,

    I have created a function that will check whether the data is null or not. If its null then it will display that as No data else it will...

  • RE: Using DelimitedSplit8K

    There are NULLs in your data. Try this:

    SELECT 'SELECT '

    + ISNULL(QUOTENAME(user_name,''''),'NULL') + ','

    + ISNULL(QUOTENAME(date_of_change,''''),'NULL') + ','

    ...

Viewing 15 posts - 2,581 through 2,595 (of 10,144 total)