Forum Replies Created

Viewing 15 posts - 1 through 15 (of 462 total)

  • RE: SQL query help please

    I guess Paul is asking where is the problem?

  • RE: Help with Stored Procedure

    I guess your SP needs a bit more work than that, would this help?

    --Create the procedure

    set ANSI_NULLS ON

    set QUOTED_IDENTIFIER ON

    GO

    CREATE PROCEDURE [dbo].[sp_GetMessageCount]

    -- Add the parameters for the stored...

  • RE: Converting a date

    Jeff Moden (4/19/2010)


    Nabha (4/18/2010)


    Yes, sorry, completely off the track. I dint know about timestamp clearly. And it looks like its down to 'seconds' that you are suggesting. Thanks Jeff.

    No problem....

  • RE: Converting a date

    Kris-155042 (4/18/2010)


    The data type is bigint and does go down to the seconds. I've run that script and I now get no results.

    Sorry to be such a pain but...

  • RE: Converting a date

    Jeff Moden (4/18/2010)


    Nabha (4/15/2010)


    Ummmm... I know it's just a guess, Nabha, but the TIMESTAMP data type has absolutely nothing to do with dates or times in SQL Server. The...

  • RE: Converting a date

    I am not completely sure 'bout using timestamp in my solution as my understanding of 'timestamp' on SS2K5 looks wrong. But you have also not mentioned 'how' you are storing...

  • RE: Converting a date

    I am guessing,

    wo.COMPLETEDTIME >= Convert(bigint, convert(timestamp, getdate()))

    and ofcourse

    wo.COMPLETEDTIME < Convert(bigint, convert(timestamp, getdate() + 1))

  • RE: find the duplicate records

    Have a read for a comprehensive one! 🙂

    http://qa.sqlservercentral.com/Forums/Topic899000-338-1.aspx

  • RE: Help on strings

    DECLARE @String VARCHAR(8000)

    SET @String = '======Heading========== some phrase

    ===============bottom line==============';

    SELECT LTRIM(RTRIM(Replace(Replace(replace

    ...

  • RE: Get Date only from getdate() function

    Paul White NZ (4/1/2010)


    If there are points available for being obscure...

    SELECT {fn CURRENT_DATE()};

    :w00t: huh? :hehe: (ODBC yeah?)

  • RE: Arithmetic overflow error converting varchar to data type numeric

    Precisely as Graham says, its while building the d-SQL that you are having problems.

  • RE: Arithmetic overflow error converting varchar to data type numeric

    Can we see the schema of this table please?

    ACCRUAL_SRP.dbo.MEI_AUTOMATION_GOAL

  • RE: Row transpose

    Jus (3/25/2010)


    Thats really cool..thanks a lot Nabha..

    thanks and u r welcome.

    ColdCoffee


    Good code Nabha.. winner...

    Thanks mate.:-)

  • RE: Row transpose

    The Dixie Flatline (3/25/2010)


    Nabha, that looks like a winner to me.

    Thank you 🙂

  • RE: Row transpose

    How about this?

    ;With CTE as

    (Select *, Row_number() OVER (partition by id order by value) as row_no

    FROM #rowtrans)

    Select ID,

    max(CASe when Row_no = 1 THEN value ELSE ''...

Viewing 15 posts - 1 through 15 (of 462 total)