legacysupp
New Member
Hi
I am new to Progress sql and I am having trouble trying to execute a query.
I have 3 tables
A (gtest) - id, newdate
B (contrelations) - con-reference, rel-record
C (contacts) - con-reference, con-created-date
I want to take each record in A and find the corresponding record in C (via B) if one exists and update C's data with the newdate from A
The query I have written is as follows:
update pub.contacts
set "con-created-date" = (select newdate from pub.gtest inner join pub.contrelations on pub.contrelations."rel-record"
= pub.gtest.id where pub.contrelations."con-reference" = pub.contacts."con-reference")
and the error is
=== SQL Exception 1 ===
SQLState=42000
ErrorCode=-20003
[JDBC Progress Driver]:Syntax error (7587)
Can anyone help please!
Adrienne
I am new to Progress sql and I am having trouble trying to execute a query.
I have 3 tables
A (gtest) - id, newdate
B (contrelations) - con-reference, rel-record
C (contacts) - con-reference, con-created-date
I want to take each record in A and find the corresponding record in C (via B) if one exists and update C's data with the newdate from A
The query I have written is as follows:
update pub.contacts
set "con-created-date" = (select newdate from pub.gtest inner join pub.contrelations on pub.contrelations."rel-record"
= pub.gtest.id where pub.contrelations."con-reference" = pub.contacts."con-reference")
and the error is
=== SQL Exception 1 ===
SQLState=42000
ErrorCode=-20003
[JDBC Progress Driver]:Syntax error (7587)
Can anyone help please!
Adrienne