Forum Replies Created

Viewing 15 posts - 16 through 30 (of 463 total)

  • RE: How to build the correct Matrix.

    you are welcome.

    ---------------------------------------------------------------------------------

  • RE: How to build the correct Matrix.

    Would this help?

    SELECT Employee_Number, Program,

    CHAR(COALESCE([104],0)) AS [IMM 104],

    CHAR(COALESCE([109],0)) AS [IMM 109],

    ...

    ---------------------------------------------------------------------------------

  • RE: Query out tables and sps

    Are you looking for something like this?

    SELECTOBJ.type_desc, OBJ.name, SM.DEfinition

    FROMsys.sql_modules SM

    JOINsys.objects OBJ

    ON OBJ.[object_id] = SM.[object_id]

    ---------------------------------------------------------------------------------

  • RE: Update Query

    Scott,

    (Edit: ohh just saw that you came back with a reply)

    My suggestion is not to use this query below. Its just to show you that you need to write...

    ---------------------------------------------------------------------------------

  • RE: Limitation of RETURN + TABLE VALUED Function

    Best thing for you to do is to just go one step ahead and test it to see if it works!

    As per BOL,

    No Transact-SQL statements in a table-valued function...

    ---------------------------------------------------------------------------------

  • RE: How to find the 3rd Max in a column?

    chandrasekaran.ganapathy (3/22/2010)


    can we handle tie value also in row_number?

    I dont think so.

    ---------------------------------------------------------------------------------

  • RE: How to find the 3rd Max in a column?

    You're welcome, but apart from what I mentioned (as Kingston is also asking) do you have any reason why you do not want to use row_number ?

    ---------------------------------------------------------------------------------

  • RE: How to find the 3rd Max in a column?

    Yes, thanks. Dense_rank is a better way since there could be a tie and dense_rank handles it well.

    untested (corrected) code (since you have not provided data to test)

    Select *...

    ---------------------------------------------------------------------------------

  • RE: Insert comma seperated values into multiple columns in a single table.

    Did not really look at that SP as your requirement and what it does looks entirely different. I am guessing you need a function to split it and create a...

    ---------------------------------------------------------------------------------

  • RE: How to find the 3rd Max in a column?

    Hint: Windowing function Row_number() and order by clause. Do your research and let us know. Thanks 🙂

    ---------------------------------------------------------------------------------

  • RE: DateTime input with time always at 00:00:00.0000

    Thats a nice one by Henrico too, here is a classic one..

    DECLARE @iDate DATETIME,

    @val INT

    SET @iDate = '12/31/2010 01:25:35'...

    ---------------------------------------------------------------------------------

  • RE: Join within and across tables

    It was bit hard to understand the requirement for me. May be thats one of the reasons why you did not get any response to this topic. Data provided should...

    ---------------------------------------------------------------------------------

  • RE: insert null in smalldatetime field

    I am not certain about ADO.NET but should not you set DBNULL.Value to your variable d?

    (Sorry if I am holding the other end of the stick)

    ---------------------------------------------------------------------------------

  • RE: DBMail - query results in body or subject line

    Go to section c in this and give it a try. Let us know if you are stuck somewhere. Thanks.

    http://msdn.microsoft.com/en-us/library/ms190307(SQL.90).aspx

    ---------------------------------------------------------------------------------

  • RE: query help required

    Jeff Moden (2/11/2010)


    To be sure, I always enjoy "Nabha posts" and your work get's noticed a lot whether you realize it or not. 🙂

    By

    --Jeff Moden

    Ohh!!! There cant be a...

    ---------------------------------------------------------------------------------

Viewing 15 posts - 16 through 30 (of 463 total)