Forum Replies Created

Viewing 15 posts - 3,301 through 3,315 (of 10,144 total)

  • RE: t-sql 2008 exlain select

    Jeff Moden (5/30/2014)


    Heh... not to worry. I started out by testing the other solutions and then went back to the original solution. I kept looking at it and...

  • RE: Are the posted questions getting worse?

    wolfkillj (5/30/2014)


    SQLRNNR (5/30/2014)


    wolfkillj (5/30/2014)


    jcrawf02 (5/30/2014)


    jasona.work (5/30/2014)


    The impression I've gotten is that they already have a contract with NASA to ferry crew, it's just been waiting for the man-rated capsule to...

  • RE: t-sql 2008 exlain select

    Do they really need to understand how it works in order to use it? I think it’s sufficient to know what it’s used for – “Pivot one or more columns...

  • RE: t-sql 2008 exlain select

    sgmunson (5/30/2014)


    ChrisM,

    If the original poster needed an explanation of a fairly simple query, somehow, it just doesn't seem likely that they're going to consider FOR XML PATH as something easier...

  • RE: t-sql 2008 exlain select

    wendy elizabeth (5/29/2014)


    ...Can you explain to me the sql listed above?

    If you want to make your code significantly faster, more compact, and more readable, try this:

    SELECT

    t.*,

    x.[tMask_out]

    FROM [test].[dbo].[test1] t

    CROSS APPLY...

  • RE: t-sql 2008 exlain select

    wendy elizabeth (5/29/2014)


    ...Can you explain to me the sql listed above?

    A different coding method may help Steve's description:

    SELECT tmask,

    b1 = CASE WHEN rem2 >= 1 THEN 1 ELSE 0...

  • RE: Please help this slow and cumbersome query

    eyric101 (5/29/2014)


    It takes more then 30 seconds to run

    DECLARE @intTmpTblCnt INT,

    @strTmpSql VARCHAR(max),

    ...

  • RE: using select Max with insert

    ronan.healy (5/29/2014)


    where would i put it in the first slect

    SET @MAXVALUE =

    (

    SELECT MAX(sectionnumber)+1,

    FROM dbo.BNYWorkingSecTable

    )

    How about a little bargaining here - you spend a little time and effort describing your...

  • RE: LTRIM and RTRIM not working

    GBeezy (5/29/2014)


    I am not getting an error...

    Before the function call I using the ASCII(RIGHT(t.OffensiveColumn,1)) to see what the ASCII character is, then calling the function, and returning the results to...

  • RE: LTRIM and RTRIM not working

    GBeezy (5/29/2014)


    And it doesnt work, unless I am calling/using it wrong, I am passing my code in as the following:

    SELECT dbo.RemoveNonASCII(t.OffensiveColumn) AS RemovedASCII

    FROM table t

    Do you get an error or...

  • RE: using select Max with insert

    ronan.healy (5/29/2014)


    ya well once the new number is created its then stored in a file and re read into table so its always there.

    it works well for the one account...

  • RE: Problem with Varbinary

    SQL Server has no explicit conversion from VARBINARY to FLOAT, but you can roll your own. Refer to this thread.

    This inline table-valued function is based on the UDF described in...

  • RE: COALESCE to replace multiple CASE statements

    Alvin Ramard (5/28/2014)


    Luis Cazares (5/27/2014)


    Alvin,

    The code makes clear that there's a concatenation based on multiple values on a single column.

    CASE WHEN A.[COL_1] LIKE '%cricket%' THEN 'ck' + ',' ELSE...

  • RE: Joining two tables and dealing with null values

    Check BOL (the SQL Server help system) for the ISNULL() function, and have a look at the related functions COALESCE() and NULLIF() too.

    Note that your output columns can only be...

  • RE: reg sql query

    shiva N (5/28/2014)


    SELECT DISTINCT a.itemcode

    ,b.itemname

    ,SUM(qty) AS Total_Qty

    ,SUM(Price) AS Total_Price

    FROM oppharsales2 AS a

    LEFT JOIN masteritem AS b ON a.itemcode = b.itemcode

    INNER JOIN oppharsales1 c ON a.billno = c.billno

    GROUP BY a.itemcode

    ,b.itemname

    Can you...

Viewing 15 posts - 3,301 through 3,315 (of 10,144 total)