Forum Replies Created

Viewing 15 posts - 3,616 through 3,630 (of 5,504 total)

  • RE: If One COLUMN = 'N' SET ALL TO '0'

    I would use the "quirky update" (or 3-part-update):

    DECLARE @tbl TABLE

    (

    Region CHAR(10),Col1 CHAR(1), Col2 CHAR(1),Col3 CHAR(1)

    )

    INSERT INTO @tbl

    SELECT 'SOUTH','N','N','Y' UNION ALL

    SELECT 'SOUTH','Y','N','N'

    DECLARE @n CHAR(1)

    SET @n='0'

    UPDATE @tbl

    SET

    @n=col3=CASE WHEN @n='0' AND col3='N'...

  • RE: Are the posted questions getting worse?

    CirquedeSQLeil (4/30/2010)


    Odd question just occurred to me.

    Has anybody here ever tried setting their sa account password to contain emoticons? Or any sql logon password for that matter.

    sa password =...

  • RE: Are the posted questions getting worse?

    CirquedeSQLeil (4/29/2010)


    ...

    You guys have more patience than I. That series would have torqued me off pretty good.

    I guess you might get a chance on another thread you're participating...

  • RE: Are the posted questions getting worse?

    Lynn Pettis (4/29/2010)


    By the way, did you see the latest post?

    Yes, I've seen it but decided not to answer since I assumed that "bye" actually implied he's leaving 😀

    So far...

  • RE: Pivot with Sub Pivot Problem

    Please have a look at the CrossTab article as well as the DynamicCrossTab article referenced in my signature.

    This will most definitely help you to solve this issue.

  • RE: Are the posted questions getting worse?

    CirquedeSQLeil (4/29/2010)


    It has lost its tutu.

    ... but it can sing now!

  • RE: Are the posted questions getting worse?

    Lynn:

    See, the hippo is doing just fine!

  • RE: Are the posted questions getting worse?

    @Lynn: May I take a break at the TITD? I'd even walk the hippo, if needed...

    I need to take a break and relax before I cannot resit anymore to post...

  • RE: OPENXML TSQL INSERT

    Digs (4/29/2010)


    ...Please fix your code errors. ...

    Pardon me??

    In your initial post you defined a table [dbo].[DIM_OHLC_Xml] without the columns you want to insert into based on the query you...

  • RE: Consider yourself a SQL Server Guru? - Solve this!

    Like I said before, I'm not considering myself as a guru, but here's how I would do it:

    CREATE TABLE #tbl

    (

    RowINT,

    IDINT,

    DatecreatedDATETIME,

    EventINT,

    Value INT

    )

    INSERT INTO #tbl

    SELECT 1,1,'2010-04-01 06:16:16.623',0, NULL UNION ALL

    SELECT 2,1,'2010-04-01 12:25:18.940',0,...

  • RE: Consider yourself a SQL Server Guru? - Solve this!

    I'm by far no SQL Server Guru, but that issue seems to be solvable.

    The question is: What have YOU tried so far?

    Also, if you want some of the heavy hitters...

  • RE: Calculate Querry Result

    What would the formula look like? Not having sample values, but a more general description.

    Like (SUM(all values)+(values with < condition >) * < other values with different condition >)/MAX(value)*100

  • RE: Filtering data using float column

    Still not sure what the problem is... your example works just fine:

    DECLARE @tbl TABLE

    (

    DATE DATETIME,

    amount DECIMAL(10,2),

    interest FLOAT

    )

    INSERT INTO @tbl

    SELECT '2009-04-10 00:00:00.000', 450.00, 00.23 UNION ALL

    SELECT '2009-04-10 00:00:00.000', 451.00, -1.20 UNION...

  • RE: Help on counting working days between two variable dates

    tommill (4/29/2010)


    Thanks for this. It works! Thanks very much.

    Tom

    Glad I could help! 😀

    But do you know HOW it works, not only THAT it works?

    It's important to understand the code, not...

  • RE: Cast Float to Char with Natural Rounding

    It's actually not a rounding issue. It's a form of presenting the result. This should be done at the frontend side, not within SQL Server.

Viewing 15 posts - 3,616 through 3,630 (of 5,504 total)