Forum Replies Created

Viewing 15 posts - 106 through 120 (of 375 total)

  • RE: How to use an OUTPUT parameter and check if a record exists

    kryknot is wrong.

    SQL will always return RETURN value. You have no control over it. The only thing you can do is to change the default value of 0 to...

    ---------------------------------------------
    [font="Verdana"]Nothing is impossible.
    It is just a matter of time and money.[/font]

  • RE: TSQL help needed

    I think Nirmal might need something like this

    declare @skills table (Resource_Id int, Skill_Id varchar(20))

    insert into @skills

    select 101, 'sqlserver' union all

    select 101, 'vb.net' union all

    select 101, 'oracle' union all

    select 102,...

    ---------------------------------------------
    [font="Verdana"]Nothing is impossible.
    It is just a matter of time and money.[/font]

  • RE: Encrypting SQL Code

    I wish the encryption worked. The current implementation is a joke and as such is useless. I think there are many cases when one would like or must encrypt the...

    ---------------------------------------------
    [font="Verdana"]Nothing is impossible.
    It is just a matter of time and money.[/font]

  • RE: Multiple Language Database Design - Additional Columns vs. Additional Tables...

    Gift Peddie (4/7/2009)


    I have just looked at that application the US government will not even issue trade mark for crap people like me can create in our sleep with most...

    ---------------------------------------------
    [font="Verdana"]Nothing is impossible.
    It is just a matter of time and money.[/font]

  • RE: Getting a sub-select query to work with 2 MAX(column)

    Chris,

    I thought you were heading to a pub...:-P

    ---------------------------------------------
    [font="Verdana"]Nothing is impossible.
    It is just a matter of time and money.[/font]

  • RE: Getting a sub-select query to work with 2 MAX(column)

    Drop the last grouping

    Change from

    GROUP BY Col_1, Col_2, Col_5

    to this

    GROUP BY Col_1, Col_2

    Does it work now?

    ---------------------------------------------
    [font="Verdana"]Nothing is impossible.
    It is just a matter of time and money.[/font]

  • RE: Getting a sub-select query to work with 2 MAX(column)

    maybe my typo messed it up.

    The line

    GROUP BY Col_1, Col_2, Col_3

    should be

    GROUP BY Col_1, Col_2, Col_5

    5 instead of 3

    If it is not this then I think I am...

    ---------------------------------------------
    [font="Verdana"]Nothing is impossible.
    It is just a matter of time and money.[/font]

  • RE: Getting a sub-select query to work with 2 MAX(column)

    Chris Morris (4/6/2009)


    Jack Corbett (4/6/2009)


    Chris Morris (4/6/2009)


    Jack Corbett (4/6/2009)


    One problem with your first query is that it includes the columns you want the MAX for in the GROUP BY so...

    ---------------------------------------------
    [font="Verdana"]Nothing is impossible.
    It is just a matter of time and money.[/font]

  • RE: Getting a sub-select query to work with 2 MAX(column)

    Is this what you need? (It is hard to figure out what do you really need)

    SELECT Col_1, Col_2, Col_3, Col_4, Col_5

    FROM Table

    INNER JOIN (

    SELECT

    MAX(Col_3) AS max_col_3,

    MAX(Col_4) AS...

    ---------------------------------------------
    [font="Verdana"]Nothing is impossible.
    It is just a matter of time and money.[/font]

  • RE: passing multiple parameters to a stored proc

    No problem.

    Been there, got burnt... 😉

    The biggest surprise was that this is ANSI_NULLs independent. Regardless how you have this option set. ON or OFF the NULLs are not equal. I...

    ---------------------------------------------
    [font="Verdana"]Nothing is impossible.
    It is just a matter of time and money.[/font]

  • RE: Fix date format in a query.. Split/Array?

    CONVERT alone will not help you.

    You need to do a little string manipulation.

    If your date field is a string

    DECLARE @Date VARCHAR(10)

    SET @Date = '2009-31-12' --YYYY-DD-MM

    SELECT @Date =...

    ---------------------------------------------
    [font="Verdana"]Nothing is impossible.
    It is just a matter of time and money.[/font]

  • RE: passing multiple parameters to a stored proc

    Florian Reischl (4/2/2009)


    David,

    What about this:

    SELECT *

    FROM mytab

    WHERE col1 = ISNULL(@col1, col1)

    AND col2 = ISNULL(@col2, col2)

    ...

    ---------------------------------------------
    [font="Verdana"]Nothing is impossible.
    It is just a matter of time and money.[/font]

  • RE: initial length byte in variable string types

    That might be an old habit of people who worked with earlier versions of SQL Server. The 255 was the maximum supported by the server.

    ---------------------------------------------
    [font="Verdana"]Nothing is impossible.
    It is just a matter of time and money.[/font]

  • RE: Search anything anywhere

    No problem, great script.

    I could not resist the temptation and was trying to play an April's Fool joke on you. 😀

    Thanks.

    ---------------------------------------------
    [font="Verdana"]Nothing is impossible.
    It is just a matter of time and money.[/font]

  • RE: Select count(*) from....

    Grant Fritchey (4/1/2009)


    Gail Shaw showed how it will pick an index with the least number of pages to satisfy the count in the quickest way.

    Can you provide a link?...

    ---------------------------------------------
    [font="Verdana"]Nothing is impossible.
    It is just a matter of time and money.[/font]

Viewing 15 posts - 106 through 120 (of 375 total)