Connecting Tech Pros Worldwide Help | Site Map

Update Query won't update my values

  #1  
Old August 9th, 2006, 08:35 PM
hharriel@gmail.com
Guest
 
Posts: n/a
Hi All,

I have created an update query related to high school course
information (name of course; credit hour; course description, etc.) I
am updating a master course information table. I am updating two fields
in the master table; course name and credit hour. When I run a test,
the course name updates fine. However, I have three different values
that can be in the credit hour files: .05, 1, and 2 (also there are
some records that don't have the credit hour information). The
majority of the credit hour field does not update. Some of the .05s
and the 1 values update, but very few (something like 20 out of 275
records). When running the test update, in the credit hour field, it
mostly puts zeros.

I have checked to make sure that the field criteria for the table I am
updating from and the table I am updating to (the master course table)
are the same; "number".

Any help you all could provide would help a whole lot,
Thanks,

  #2  
Old August 9th, 2006, 09:55 PM
Jeff L
Guest
 
Posts: n/a

re: Update Query won't update my values


It would probably help if you could post your query you are running.


hharriel@gmail.com wrote:
Quote:
Hi All,
>
I have created an update query related to high school course
information (name of course; credit hour; course description, etc.) I
am updating a master course information table. I am updating two fields
in the master table; course name and credit hour. When I run a test,
the course name updates fine. However, I have three different values
that can be in the credit hour files: .05, 1, and 2 (also there are
some records that don't have the credit hour information). The
majority of the credit hour field does not update. Some of the .05s
and the 1 values update, but very few (something like 20 out of 275
records). When running the test update, in the credit hour field, it
mostly puts zeros.
>
I have checked to make sure that the field criteria for the table I am
updating from and the table I am updating to (the master course table)
are the same; "number".
>
Any help you all could provide would help a whole lot,
Thanks,
  #3  
Old August 9th, 2006, 10:55 PM
hharriel@gmail.com
Guest
 
Posts: n/a

re: Update Query won't update my values


Here is the SQL:

UPDATE DISTINCTROW 97106courseIDs2 INNER JOIN dbo_R0004_COUR_COURSE ON
[97106courseIDs2].COUR_NAME = dbo_R0004_COUR_COURSE.COUR_NAME SET
dbo_R0004_COUR_COURSE.COUR_NAME = [97106courseID2].[cour_name],
dbo_R0004_COUR_COURSE.COUR_HRS_NUM = [97106courseID2].[cour_hrs_num]
WHERE (((dbo_R0004_COUR_COURSE.COUR_SCHL_ID)="97106"));

Thanks

Jeff L wrote:
Quote:
It would probably help if you could post your query you are running.
  #4  
Old August 10th, 2006, 04:25 AM
pietlinden@hotmail.com
Guest
 
Posts: n/a

re: Update Query won't update my values


remove the DISTINCTROW keyword... the rest looks fine.

Closed Thread


Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem with Insert/update query with null values ndeeley answers 8 May 12th, 2009 10:06 AM
IIf in query won't return false KiwiGenie answers 4 March 7th, 2007 12:25 AM
Using a datagrid to update values in sql server (best practice) Mok answers 1 November 19th, 2005 07:00 PM
Query to Replace Columns Stuart E. Wugalter answers 4 November 12th, 2005 03:39 PM