Forum Replies Created

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

  • RE: HOW to Sum The Coloumn

    catchkkarthi (2/27/2011)


    ...how to find the difference between two times..ie logout and login...

    is there any way to find in minutes...

    Like so

    DATEDIFF(MINUTE, '2011-02-27 06:54:39.780', '2011-02-28 06:54:39.780')

  • RE: Kindly explain the case query.

    My bad, I missed the = vs <>

  • RE: HOW to Sum The Coloumn

    catchkkarthi (2/26/2011)


    Hi

    i have an error while selecting the data for a char

    i have a table with projectid -datetime,logintime-datetime,logouttime-datetime,workdate-varchar in dd/mm/yyyy format date.

    when i used to update the table after the...

  • RE: Remove duplicate values

    SQLkiwi (2/26/2011)


    diamondgm (2/26/2011)


    I was trying to indicate that the order by clause seems inconsequential.

    Yes but calling NEWID() is not for free, and neither is sorting by a uniqueidentifier.

    Thanks for answering...

  • RE: Remove duplicate values

    SQLkiwi (2/26/2011)


    diamondgm (2/26/2011)


    However, so far I have found the following method to be the simplest and cheapest for identifying and deleting duplicates:

    SELECT RANK() OVER (PARTITION BY empno ORDER BY NEWID())...

  • RE: Function

    SQLkiwi (2/26/2011)


    diamondgm (2/26/2011)


    Maybe this will stir up a hornet's nest...

    By playing devils advocate, could it not easily be argued that RDBMS is all about arrays? Sure we don't call them...

  • RE: Function

    LutzM (2/26/2011)


    Another part of your homework assignment?

    Since SQL doesn't have arrays, this section most probably is about a frontend dev.

    In case your tutor is teaching you that arrays are part...

  • RE: Remove duplicate values

    daveriya (2/25/2011)


    hi

    i have tried this query to remove duplicate values.

    but getting error like 'incorrect syntax near keyword where"

    select *

    2 from

    3 (select d.*

    4...

  • RE: Help with Stored Procedure

    I'm not aware of a name for the concept.

    An example will be: table has field named RowStatus of type bit default to null.

    While busy with the row, update RowStatus =...

  • RE: Help with Stored Procedure

    Steve,

    Not to be nasty, but I have no cooking clue what the SQL you posted is attempting to accomplish.

    Let me try and break your process down for you...

    1. Mark all...

  • RE: Table linking help

    Hi dcase,

    Without seeing the DDL with some sample data - I'm not sure what I'm posting will help you.

    If this concept doesn't solve your problem, please post DDL and some...

  • RE: Help with Stored Procedure

    We'd be able to help you a lot more if you posted the DDL and your code thus far.

    English can be a little ambiguous 😀

  • RE: Kindly explain the case query.

    It does indeed seem like bitwise operation; I believe & is the binary AND operation.

    Though it also seems that the logic is flawed as the same result would occur whether...

  • RE: Help with Stored Procedure

    Haha, yeah - I thought it would be scrutanized 😛

  • RE: Help with Stored Procedure

    Hi,

    IMO, the way you are thinking of using SQL for your logic is a little off.

    Consider 2 insert statements:

    INSERT INTO payments (col1, coln...)

    select col1, coln... from tmp_payments where personid in...

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