Forum Replies Created

Viewing 15 posts - 4,231 through 4,245 (of 8,753 total)

  • RE: Are the posted questions getting worse?

    Alan.B (11/30/2015)


    Brandie Tarvin (11/30/2015)


    Luis Cazares (11/30/2015)


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

  • RE: Query processor could not produce a query plan because of the hints defined in this query.

    Luis Cazares (11/30/2015)


    Do you really need the hints? Do you understand the problems of NOLOCK? Why do you need to specify the index? Wouldn't the query processor use it? Why...

  • RE: Need help on sql query

    Quick suggestion, use MAX and GROUP BY to eliminate the blanks and compress the rows into one row.

    😎

    USE tempdb;

    GO

    SET NOCOUNT ON;

    ;WITH SAMPLE_DATA(ID,COLA,COLB,COLC) AS

    (

    SELECT * FROM

    ...

  • RE: Sum one column and subtract over second column

    Quick suggestion

    😎

    USE tempdb;

    GO

    SET NOCOUNT ON;

    DECLARE @test-2 TABLE

    (

    id int,

    knt INT,

    name VARCHAR(10),

    ...

  • RE: Are the posted questions getting worse?

    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 the notion that an...

  • RE: Are the posted questions getting worse?

    Phil Parkin (11/26/2015)


    TomThomson (11/25/2015)


    Steve Jones - SSC Editor (11/25/2015)


    Alvin Ramard (11/25/2015)


    Steve Jones - SSC Editor (11/25/2015)


    The spam problem is tough. Believe me, no matter what we do, people will find...

  • RE: Need help with a CASE statement

    rhaberkorn (11/24/2015)


    I'm trying to return the number of pieces from a table where the piece count can be NULL, 0, or any whole number 1-999.

    I need my query results to:

    -...

  • RE: The dotted table

    TomThomson (11/23/2015)


    Nice question.

    But your "not necessarily recommended" is a bit less emphatic than my expression would be if I encountered something like this in a code review. :rolleyes:

    +1

    😎

    Certainly drop the...

  • RE: SQL Unpivot

    Quick solution

    😎

    USE tempdb;

    GO

    SET NOCOUNT ON;

    DECLARE @SAMPLE TABLE (ID CHAR(4),Salary INT,Employee_Tax1 INT,Employee_Tax2 INT,Employer_Tax1 INT,Employer_Tax2 INT);

    INSERT INTO @SAMPLE(ID,Salary,Employee_Tax1,Employee_Tax2,Employer_Tax1,Employer_Tax2) VALUES ('A001',1000,120,95,125,105);

    SELECT

    X.ID

    ,X.Earn_Ded

    ,X.Employer_Tax

    FROM @SAMPLE S

    CROSS APPLY

    (

    ...

  • RE: Subtract column with variable

    Quick solution

    😎

    USE tempdb;

    GO

    SET NOCOUNT ON;

    IF OBJECT_ID(N'tempdb..#t') IS NOT NULL DROP TABLE #t;

    create table #t

    (

    id int,

    col1 decimal(18,2)

    )

    go

    insert into #t (id,col1)

    values...

  • RE: Are the posted questions getting worse?

    Ed Wagner (11/22/2015)


    I think the spam bomb went off again today.

    I guess you are not referring to TT's posts:-D

    😎

  • RE: Database Server Memory always showing 98%

    This whole thing doesn't make sense unless more information is provided, memory configurations and specs are relative to all the work the server has to perform, not exceptions like occasional...

  • RE: Execution plan when there are variables at the query is wrong

    ricardo_chicas (11/20/2015)


    Yeah, it is just sad that we define a clustered index, therefore ordered, with two variables that are of the same data type withing the scope of the query,...

  • RE: Execution plan when there are variables at the query is wrong

    First thing that comes to mind is parameter sniffing and local variables, suggest you read up on the subject, plenty of good articles around covering this.

    😎

  • RE: Database Server Memory always showing 98%

    rameelster (11/20/2015)


    but the database instance contain 2 databases each with size 240 GB and 714 GB respectively. Dont you think that 80 percent memory is very less.

    No I don't...

Viewing 15 posts - 4,231 through 4,245 (of 8,753 total)