Forum Replies Created

Viewing 15 posts - 46 through 60 (of 463 total)

  • RE: grouping my result set based on the firstname column with all other columns included

    Chris Morris-439714 (1/27/2010)

    Guess the OP didn't like the awkward questions there, Nabha - like which aggregate function to use for date. Since the same questions have arisen in this thread,...

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

  • RE: grouping my result set based on the firstname column with all other columns included

    Not sure if I am missing something here but isnt it the same query that was posted earlier here

    I guess discussion was already started there!

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

  • RE: Little help with insert statement

    Not sure if it would behave differently in linked server context!

    DROP TABLE #S1

    DROP TABLE #S2

    CREATE TABLE #S1(ID int, VERSION int)

    CREATE TABLE #S2(ID int, VERSION int)

    INSERT INTO #S1 VALUES(1, 1)

    INSERT INTO...

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

  • RE: SQL Jobs help

    dean 62842 (1/26/2010)


    I want to write a scheduled job for my database to run every night.

    Essentially I need the job to match todays date in the database and then add...

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

  • RE: -isnull

    May be the sum is giving a negetive value and they wanted to show absolute(positive value). Have a look at this,

    SELECT -isnull(1, 0)

    SELECT -isnull(-1, 0)

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

  • RE: Convert VARCHAR into DATETIME

    Not so elegant but this is what I could think of.. there could be an elegant way of doing it.

    SELECT CONVERT(datetime, STUFF(REPLACE(<DateColumn>, '.', '/'), LEN(<DateColumn>)

    - CHARINDEX('/',...

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

  • RE: duplicates with a changing range

    Will this do?

    SELECT DISTINCT * FROM RANGES R1

    WHERE EXISTS (SELECT 1

    FROM RANGES R2

    WHERE R1.ID = R2.ID

    AND R1.Code = R2.CODE

    AND ABS(R1.DOS -...

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

  • RE: Urgent development question

    RPSql (1/25/2010)


    I didn't submitted the correct data as I don't want to send company data out...Next time I will make sure to put question in right format...sorry this time...Plz let...

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

  • RE: Convert VARCHAR into DATETIME

    Are you sure the dates are only in these two formats?

    '25/01/2010'

    '25.01.2010'

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

  • RE: SQL Query - problems with Lookup table

    Lorna-331036 (1/25/2010)


    I also tried adding the Drivers table twice when creating the View but that didn’t work either. I can redesign the tables if you think that would be...

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

  • RE: is sql ? is oracle? is sybase? possible to concatenate?

    Gianluca Sartori (1/25/2010)


    Maybe I'm having a bad monday morning, but I don't see what the question has to do with the subject of the thread.

    nothing actually 😛 (I guess so)...

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

  • RE: Convert VARCHAR into DATETIME

    Select convert(datetime, '25.01.2010', 104)

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

  • RE: is sql ? is oracle? is sybase? possible to concatenate?

    i think expected result is wrong!(isadmin would appear in the result but not iscont)

    will this do?

    select eno, CASE WHEN SUM(CASE WHEN isEmp = 1 THEN 1 ELSE 0...

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

  • RE: Need help to built SQL statement

    miss.delinda (1/23/2010)


    tq very much to both of you

    UR welcome ..:-)

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

  • RE: Need help to built SQL statement

    The "bad" thing about it: since CTEs made it so easy to use subqueries I think I tend to not spending enough time on trying to find an easier solution...

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

Viewing 15 posts - 46 through 60 (of 463 total)