O
Ohio5
See Subject:Combine Data~Still Need Help from 4/13/04'
I really need help on this
I really need help on this
-----Original Message-----
Run this query to update existing
UPDATE Final INNER JOIN [From] ON [Final].[ID] = [From].
[ID] SET Final.Journal = [Final].[Comment]+": " & [From].
[JournalDate] &"- "& [From].[Comment]
WHERE (((From.Comment) Is Not Null));
Run this query after you have run alberts update query to remove dups:
delete from [From] where [From].[ID] in (select distinct [Final].[ID] from
[Final])
You can then do an insert statement into final on the remainder and then
another delete from [From] to remove all the rest.
This assumes that while you are doing this, [from] isn't getting updated.
If it is, this won't work
Ohio5 said:See Subject:Combine Data~Still Need Help from 4/13/04'
I really need help on this
.
-----Original Message-----
You are the bomb that works, now I am working on the
append query. It should be an append query not a select
query correct?
to-----Original Message-----
Run this query to update existing
UPDATE Final INNER JOIN [From] ON [Final].[ID] = [From].
[ID] SET Final.Journal = [Final].[Comment]+": " & [From].
[JournalDate] &"- "& [From].[Comment]
WHERE (((From.Comment) Is Not Null));
Run this query after you have run alberts update query
remove dups:distinctdelete from [From] where [From].[ID] in (select
[Final].[ID] fromisn't[Final])
You can then do an insert statement into final on the remainder and then
another delete from [From] to remove all the rest.
This assumes that while you are doing this, [from]
getting updated..If it is, this won't work
.
OHIO5 said:Have an issue. All the IDs that existed I concatenated
the journals and then deleted them, but now in the from
table I have one id multiple times but it does not exist
in the Final table so I can not append because it
violates the primary key.
Still need help~-----Original Message-----
You are the bomb that works, now I am working on the
append query. It should be an append query not a select
query correct?
to-----Original Message-----
Run this query to update existing
UPDATE Final INNER JOIN [From] ON [Final].[ID] = [From].
[ID] SET Final.Journal = [Final].[Comment]+": " & [From].
[JournalDate] &"- "& [From].[Comment]
WHERE (((From.Comment) Is Not Null));
Run this query after you have run alberts update query
remove dups:distinctdelete from [From] where [From].[ID] in (select
[Final].[ID] fromisn't[Final])
You can then do an insert statement into final on the remainder and then
another delete from [From] to remove all the rest.
This assumes that while you are doing this, [from]
getting updated..If it is, this won't work
See Subject:Combine Data~Still Need Help from 4/13/04'
I really need help on this
.
-----Original Message-----
If you put the ID record without the journal & comment into the Final table
and then re-run the update query, the final table should be updated with
each comment from the From table
OHIO5 said:Have an issue. All the IDs that existed I concatenated
the journals and then deleted them, but now in the from
table I have one id multiple times but it does not exist
in the Final table so I can not append because it
violates the primary key.
Still need help~-----Original Message-----
You are the bomb that works, now I am working on the
append query. It should be an append query not a select
query correct?
-----Original Message-----
Run this query to update existing
UPDATE Final INNER JOIN [From] ON [Final].[ID] = [From].
[ID] SET Final.Journal = [Final].[Comment]+": " & [From].
[JournalDate] &"- "& [From].[Comment]
WHERE (((From.Comment) Is Not Null));
Run this query after you have run alberts update query to
remove dups:
delete from [From] where [From].[ID] in (select distinct
[Final].[ID] from
[Final])
You can then do an insert statement into final on the
remainder and then
another delete from [From] to remove all the rest.
This assumes that while you are doing this, [from] isn't
getting updated.
If it is, this won't work
See Subject:Combine Data~Still Need Help from 4/13/04'
I really need help on this
.
.
.
UPDATE Final RIGHT JOIN [From] ON Final.ID = From.ID SET
[From].ID = [Final]![ID];
The above is what I was trying to run and it says that my
records will update but when I open the table the records
were not added.
UPDATE Final RIGHT JOIN [From] ON Final.ID = From.ID SET
[From].ID = [Final]![ID];
The above is what I was trying to run and it says that my
records will update but when I open the table the records
were not added.
-----Original Message-----
If you put the ID record without the journal & comment into the Final table
and then re-run the update query, the final table should be updated with
each comment from the From table
OHIO5 said:Have an issue. All the IDs that existed I concatenated
the journals and then deleted them, but now in the from
table I have one id multiple times but it does not exist
in the Final table so I can not append because it
violates the primary key.
Still need help~
-----Original Message-----
You are the bomb that works, now I am working on the
append query. It should be an append query not a select
query correct?
-----Original Message-----
Run this query to update existing
UPDATE Final INNER JOIN [From] ON [Final].[ID] = [From].
[ID] SET Final.Journal = [Final].[Comment]+": " &
[From].
[JournalDate] &"- "& [From].[Comment]
WHERE (((From.Comment) Is Not Null));
Run this query after you have run alberts update query
to
remove dups:
delete from [From] where [From].[ID] in (select
distinct
[Final].[ID] from
[Final])
You can then do an insert statement into final on the
remainder and then
another delete from [From] to remove all the rest.
This assumes that while you are doing this, [from]
isn't
getting updated.
If it is, this won't work
message
See Subject:Combine Data~Still Need Help from 4/13/04'
I really need help on this
.
.
.
-----Original Message-----
UPDATE Final RIGHT JOIN [From]
ON Final.ID = [From].ID
SET [From].ID = [Final].[ID];
I'm not sure that you can do this. You are joining on the same field you are
attempting to update. Also, I would be consistent in referencing fields. Your
example code is not - sometimes brackets, sometimes . vs !
As I said in the first place, I'm not sure this will work because you use the
field you are trying to update in the join clause.
Right now, I don't have time to test that belief, but I thought I would at least
raise the issue.
.UPDATE Final RIGHT JOIN [From] ON Final.ID = From.ID SET
[From].ID = [Final]![ID];
The above is what I was trying to run and it says that my
records will update but when I open the table the records
were not added.
should-----Original Message-----
If you put the ID record without the journal & comment into the Final table
and then re-run the update query, the final table
be updated witheach comment from the From table
Have an issue. All the IDs that existed I concatenated
the journals and then deleted them, but now in the from
table I have one id multiple times but it does not exist
in the Final table so I can not append because it
violates the primary key.
Still need help~
-----Original Message-----
You are the bomb that works, now I am working on the
append query. It should be an append query not a select
query correct?
-----Original Message-----
Run this query to update existing
UPDATE Final INNER JOIN [From] ON [Final].[ID] = [From].
[ID] SET Final.Journal = [Final].[Comment]+": " &
[From].
[JournalDate] &"- "& [From].[Comment]
WHERE (((From.Comment) Is Not Null));
Run this query after you have run alberts update query
to
remove dups:
delete from [From] where [From].[ID] in (select
distinct
[Final].[ID] from
[Final])
You can then do an insert statement into final on the
remainder and then
another delete from [From] to remove all the rest.
This assumes that while you are doing this, [from]
isn't
getting updated.
If it is, this won't work
message
See Subject:Combine Data~Still Need Help from 4/13/04'
I really need help on this
.
.
.