Forum Replies Created

Viewing 15 posts - 3,706 through 3,720 (of 8,731 total)

  • RE: Using CROSS APPLY instead of sub queries.

    This should be equivalent, but I don't have data to test.

    SELECT A.SITEID

    ,AeSubCount

    ,SubCnt

    ,ROUND(( CAST(AeSubCount...

  • RE: Need help on sql query

    Trust me Luis that I understand the difference. 😉

    I know you do, but the OP or others might not. 😉

  • RE: Need help on sql query

    Sean Lange (11/30/2015)


    vineetbhargav (11/30/2015)


    Create table #tab(ID int , COLA char(5), COLB char(5) ,COLC char(5))

    INSERT INTO #tab(ID ,COLA, COLB, COLC)

    VALUES(1001,'1AAA' ,null, null), (1001 ,null,'2BBB', null),(1001,null,null, '3CCC')

    SELECT

    ...

  • RE: Help on understanding recursive cte

    It replaces character by character in the column Data using DataToReplace and ReplacedWithData. One each recursion it replaces one character and removes one character from the auxiliar columns. In the...

  • RE: how to convert recursive CTE's into normal sql queries

    It depends on what the recursive CTE is doing. Here's an example, but you need to test and be sure it's a better option. It's a while loop, but it's...

  • RE: Are the posted questions getting worse?

    Brandie Tarvin (11/30/2015)


    Eirikur Eiriksson (11/27/2015)


    Brandie Tarvin (11/27/2015)


    My SO just informed me that he's learned how to write a LEFT INNER JOIN in Oracle.

    And now my head is just spinning with...

  • RE: Help Needed in dynamic sql

    KGJ-Dev (11/30/2015)


    Hi Jeff,

    I would be using this against real table and not temp table. just to play with test data i gave temp variable and data on my sample....

  • RE: Happy Thanksgiving 2015

    Larnu (11/30/2015)


    FridayNightGiant (11/26/2015)


    Larnu (11/26/2015)


    Unless I'm doing something funny, when I run D, I actually get 27/11/2015 (when i run it for this year, sorry, I forgot to mention that). Just...

  • RE: Problems with CTE (recursive queries)

    eut.kop (11/26/2015)


    serg-52 (11/26/2015)


    Yes, you can currently have only 2 levels.

    CREATE table categoria(

    [id_categoria] [int] NOT NULL,

    [categoria] [nvarchar](50) NULL

    );

    INSERT INTO categoria

    VALUES

    (1, 'horror'),

    (2, 'fantascienza');

    CREATE table...

  • RE: trigger - old value new value

    Please stop making new threads for the same problem.

    Focus on a single thread to solve the issue completely and let people follow the advice you've been given.

  • RE: Trigger result from inserted / Deleted

    You could try using the OUTPUT clause in your code, instead of trying to use dynamic sql in your triggers.

  • RE: Are the posted questions getting worse?

    Lynn Pettis (11/25/2015)


    Help, I can't read and don't know how to attach a file... Sorry, some people are finding it easier to push my buttons today.

    He really is...

  • RE: Creation of a record for the loss of a customer

    The last condition can be simplified to

    where

    oa1.AccountID is not null or oa2.AccountID is not null

  • RE: rows not retrieved with my query

    And by the way, you might want to change your WHERE clause to something like this to make it SARGable:

    where RUN_TIME >= DATEADD( qq, DATEDIFF( qq, 0, GETDATE()), 0)

    ...

  • RE: Are the posted questions getting worse?

    Brandie Tarvin (11/25/2015)


    So I did a "small" thing (that took more time than effort) for an internal customer this morning.

    About 5 minutes ago received an email with "THANK YOU" in...

Viewing 15 posts - 3,706 through 3,720 (of 8,731 total)