Forum Replies Created

Viewing 15 posts - 7,636 through 7,650 (of 8,753 total)

  • RE: SQL - case statement

    You can use a query in the case statement, simplifies thing

    😎

    SELECT

    CASE

    WHEN EXISTS (SELECT * FROM DB_1.sys.tables WHERE name = 'TBL_TRIP') THEN (SELECT TOP 1 name...

  • RE: End User Blocking of ETL

    danielfountain (8/1/2014)


    Hey all,

    I am shortly embarking on a project to redesign an ETL process.

    Currently issues can be cause by end users running reports (SSRS, EXCEL) while a table is updating....

  • RE: Update is Slow in SQL server 2014

    Impossible to say without more information. Could you post the table structure, the update code, execution plans etc., the more the merrier.

    😎

  • RE: CASE question

    Since the case statement is doing incremental steps, it can be simplified using integer division, see the example.

    😎

    USE tempdb;

    GO

    SET NOCOUNT ON;

    DECLARE @SET_SIZE INT = 40000;

    /* Test data 1 to @SET_SIZE...

  • RE: handle resultset in SP

    You can count the rows before and after or use @@ROWCOUNT

    😎

    USE tempdb;

    GO

    DECLARE @PRECOUNT INT = 0;

    DECLARE @RET_VAL INT =0;

    DECLARE @TABLEX TABLE (IVAL INT NOT NULL);

    SELECT @PRECOUNT = COUNT(*) FROM @TABLEX

    INSERT...

  • RE: series of transactions

    GilaMonster (7/31/2014)


    salomon.frid (7/31/2014)


    I am aware of that one, just some people in my shop have told me that is not the preferred way of doing this ...

    So according to your...

  • RE: norweigen date time problem.

    lee.hopkins (7/31/2014)


    I have an vb6 (dont snicker) application that is used all over the world.

    some users refuse to leave the regional setting to english and i am haveing an issue.

    a...

  • RE: Today's Humor..

    Michael Valentine Jones (7/31/2014)


    As a general rule, vendors have very little knowledge of DBA best practices, so they just toss out some misinterpreted stuff that some junior developer found on...

  • RE: Are the posted questions getting worse?

    Steve Jones - SSC Editor (7/31/2014)


    SQLRNNR (7/31/2014)


    Because you just had two pina coladas?

    That's completely misworded. It's "because you had just two pina coladas."

    ....in each transaction....:rolleyes:

    😎

  • RE: Adding unique int key using max

    tshad (7/31/2014)


    I am trying to add multiple records to my table (insert/select).

    INSERT INTO Users

    ( User_id ,

    ...

  • RE: Assigning a "Group ID" based on consecutive Values

    Straight forward running total and lag

    😎

    ;WITH BASE AS

    (

    SELECT [R], [D]

    FROM (

    VALUES

    (1,'A')

    ,(2,'B')

    ,(3,'B')

    ,(4,'A')

    ,(5,'B')

    ,(6,'B')

    ,(7,'A')

    ,(8,'A')

    ,(9,'A')) AS X([R],[D]))

    ,PRIME_GROUP AS

    (

    SELECT

    B.R

    ...

  • RE: CLR vs. c# Console App

    Snargables (7/31/2014)


    I need to write a process to get file size in kb and record count in a file. I was planning on writing a c# console app that takes...

  • RE: Are the posted questions getting worse?

    Jeff Moden (7/31/2014)


    swasheck (7/31/2014)


    To qualify my statement, I have no personal context for anything involving Jeff Moden and I'd welcome him. I've only perused SSC forums in the past and...

  • RE: Are the posted questions getting worse?

    SQLRNNR (7/31/2014)


    Eirikur Eiriksson (7/31/2014)


    SQLRNNR (7/31/2014)


    William J. Fellows (7/31/2014)


    To qualify my statement, Steve stares at my legs a lot. 😛

    Well, you have good looking legs.

    :exclamation:Unwanted details:sick:

    Task achieved!!

    Jason, you are a real...

  • RE: Today's Humor..

    GilaMonster (7/31/2014)


    Alvin Ramard (7/30/2014)


    WAIT!!!! What kind of database MUST be repaired regularly???? :w00t:

    MS Access ones.

    That actually is correct advice, for an MS Access database (as in Access tables)...

Viewing 15 posts - 7,636 through 7,650 (of 8,753 total)