Forum Replies Created

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

  • RE: SQL - case statement

    ScottPletcher (8/1/2014)


    If the table may or may not exist, you'll have to make references to that table only in dynamic SQL. Otherwise, if the code runs and the table...

  • RE: SSIS XML import

    Just throwing in my 2 cents, my preferred way is to use SSIS to import the XML into a staging table and shred it with XQuery into the destination tables....

  • RE: Migration from SQL Server 2012 to Oracle 11g

    Out of curiosity, why 11g, that's quite an old horse? BTW, don't know of any automatic tools for the job, normally is scripting rebuilding, rewriting and transferring kind of a...

  • 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...

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