Forum Replies Created

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

  • RE: Update Error

    I added PK to Table A and B. The update worked on A and the insert worked on B - thank you for your help.

  • RE: Update Error

    I added indexes to the tables same problem. I don't understand because none of my other tables have PK, just a lot of indexes built from not null columns.

  • RE: Update Error

    I am using MS SQL Server Mgt Studio. I r-click on the table and select Open Table. I have a date field which I try and modify (I have tried...

  • RE: Update a date field to a specific day and time

    These worked great - thank you!

  • RE: SQL is slow

    Here's one that is taking a while:

    UPDATE #temp_trips

    set tcomment_type = (SELECT RT_TRIP_COMMENTS.comment_type

    FROM RT_TRIP_COMMENTS

    where #temp_trips.car_init = RT_TRIP_COMMENTS.car_init

    and #temp_trips.car_no = RT_TRIP_COMMENTS.car_no

    and #temp_trips.ship_date_time = RT_TRIP_COMMENTS.ship_date_time

    and (RT_TRIP_COMMENTS.comment_type <> 'EX' or RT_TRIP_COMMENTS.comment_type is null)

    and...

  • RE: SQL is slow

    For example, here is one of the longer updates - is there a better way to do this?

    UPDATE #temp_table

    set clm_loc_city = (select loc_city

    from LOCATION_TABLE

    where #temp_table.car_init = LOCATION_TABLE.car_init

    and #temp_table.car_no = LOCATION_TABLE.car_no),

    clm_loc_state...

  • RE: SQL is slow

    Craig Farrell (9/30/2010)


    Create a copy of the procedure and do timestamp wrappers around each of the updates. Find out where the pain in time is. Then start pulling...

  • RE: SQL is slow

    OK - that's a good start - thank you.

  • RE: Updating dates

    That worked great - thank you very much.

  • RE: Easy SQL

    That worked great. Thank you for the help.

  • RE: Easy SQL

    SELECT RTOV_USERS.user_id,

    RTOV_USERS.fname,

    RTOV_USERS.lname

    ...

  • RE: Selects Within Selects

    Thank you for this example - I will give it a try.

    Abs-225476 (5/28/2010)


    HI, I think the reason your query is slow is due to the calculated fields within the main...

  • RE: Selects Within Selects

    It is not the UPPER that is causing the problem, it is the select count(*). When I remove the select count(*), the query is very fast. Adding the count(*) bogs...

  • RE: Insert with a Select and an Exists

    I used the except. It works great - I have never used it before. Thank you.

  • RE: Insert with a Select and an Exists

    Sorry, should have added that there can be multiple roles (db_role). I want all of jo's roles, just not the one that already exist in the MAINT_REQ table.

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