Viewing 15 posts - 46 through 60 (of 102 total)
I added PK to Table A and B. The update worked on A and the insert worked on B - thank you for your help.
November 22, 2010 at 2:49 pm
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.
November 22, 2010 at 2:27 pm
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...
November 22, 2010 at 2:00 pm
These worked great - thank you!
November 3, 2010 at 10:35 am
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...
September 30, 2010 at 1:51 pm
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...
September 30, 2010 at 11:52 am
Craig Farrell (9/30/2010)
September 30, 2010 at 11:47 am
SELECT RTOV_USERS.user_id,
RTOV_USERS.fname,
RTOV_USERS.lname
...
June 18, 2010 at 8:45 am
Thank you for this example - I will give it a try.
Abs-225476 (5/28/2010)
May 28, 2010 at 7:56 am
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...
May 27, 2010 at 8:57 am
I used the except. It works great - I have never used it before. Thank you.
April 20, 2010 at 10:15 am
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.
April 20, 2010 at 9:14 am
Viewing 15 posts - 46 through 60 (of 102 total)