Forum Replies Created

Viewing 15 posts - 346 through 360 (of 898 total)

  • RE: Column reference

    Yes. A FOREIGN KEY constraint has to be linked to either a PRIMARY KEY constraint or a UNIQUE constraint in another table.

    If the column(s) are not part of PRIMARY/UNIQUE constraint,...

  • RE: update still difficult??

    prathibha_aviator (3/14/2013)


    Yes it did... Thanks Again Lynn 🙂

    Great that you were able to solve the problem temporarily by disabling the trigger.

    If you want to avoid such issues in future, you...

  • RE: how to split the days between two month

    I would have been easier for people to help you had you provided the DDL, sample data and expected results in ready to use format

    But as you are a probably...

  • RE: update still difficult??

    Update employees set ID= (select EXTENDEDID from employees where ID <> EXTENDEDID) where ID <> EXTENDEDID

    The query above is probably giving the error you mentioned. This is because the subquery...

  • RE: update still difficult??

    --This will fail as the sub query will probably return more than one rows

    Update employees set ID= (select EXTENDEDID from employees where ID<> EXTENDEDID) where ID<> EXTENDEDID

    --Below queries should not...

  • RE: Temp table join example

    TJT (3/13/2013)


    Select Model

    FROM CARS INNER JOIN #tempTable on

    CARS.Model = #tempTable.Model

    This query will give you an error about Model being an ambiguous column in the SELECT list

    Hence, It is always a...

  • RE: Bulk Insert & Temporary Table

    It would be easier for us to help you if you provide some DDL along with sample data and the expected results

    This would also help us to give you a...

  • RE: INNER JOIN

    mtassin (3/12/2013)


    I want to give my point back...

    :w00t:

    Normally people ask for points, I think its first time somebody wants to give the points back.

  • RE: Single Update Query - Required

    This seems quite simple like homework stuff

    Can you let us know what you have tried?

    If you are stuck somewhere, we are happy to help you.

  • RE: DateDiff function help

    dhananjay.nagarkar (3/12/2013)


    Thanks so much for the help to get me understand this since I come from Java world...

    Also needed some help to know which is a best book to learn...

  • RE: INNER JOIN

    cppprogrammer (3/12/2013)


    Yes statistically low probability but rows *can* be returned if SYSDATETIME() and GETDATE() at a particular time are equal. The "correct" answer is not correct.

    +1. It might return a...

  • RE: import data with identity columns...

    rut_new (3/9/2013)


    Really going crazy here!

    I have table1 and table2 [for e.g. purpse]. They are of exact design:

    id [autoincrement, primary key, int]

    name [varchar(10))

    creatorid [int] --code of the office which inserted the...

  • RE: IN Vs INNER JOIN

    purushottam2 (3/7/2013)


    May i know the cause?

    The cause is present in the link provided by Chris earlier in the thread and also provided below

    http://sqlinthewild.co.za/index.php/2010/01/12/in-vs-inner-join/

  • RE: Getting minimum of top n rows without using subquery

    winmansoft (3/4/2013)


    No,it is not mandatory to use the TOP and ORDER BY but they are required.. i can ditch order by by modifying query as "select min[a.date] from (select top...

  • RE: Getting minimum of top n rows without using subquery

    winmansoft (3/3/2013)


    I have to get min date from top 100 rows which satisfies date condition..

    That is exactly what all the solutions suggested by Chris in Post #1424431 return.

    If you feel...

Viewing 15 posts - 346 through 360 (of 898 total)