Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
View with LEFT JOIN will not update.
Message
From
22/10/2002 15:31:37
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
View with LEFT JOIN will not update.
Miscellaneous
Thread ID:
00714040
Message ID:
00714040
Views:
55
For some reason this view will not update. I need to change it from an INNER JOIN to a LEFT OUTER JOIN because it was dropping records if the description record was not available.

When Adding: The error is "No Update tables are specified. Use the Tables property of the cursor."

When Editing: Press save and nothing happens. (I will debug more but I think it is similar to the above problem.)


Everything is setup correctly to update the table (at least I think so.)

* Tables Property is properly assigned
* Will not work with just source
? CURSORGETPROP('Tables')
source,reftable

? CURSORGETPROP('UpdatableFieldList')
{all fields from source},description,id

? CURSORGETPROP('KeyFieldList')
{key fields from source},id

Buffering = 3
BatchUpdateCount = 1
SendUpdates = .T.
SourceType = 1
UpdateType = 1
WhereType = 3

* additional filtering does exist but is not part of the problem.
* e.g. filter for the date and location which is part of source.
SELECT a.*, IIF(ISNULL(b.description), 'UNKNOWN', b.description) description,
IIF(ISNULL(b.id), 0, b.id) id
FROM source a LEFT JOIN reftable b
ON a.source == b.refcode
AND BETWEEN(?gdCurrentDate, b.effective_date, b.discontinue_date)
ORDER BY a.orderfld
Gordon de Rouyan
DC&G Consulting
Edmonton, Alberta
Email: derouyag@shaw.ca
Next
Reply
Map
View

Click here to load this message in the networking platform