Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
View with LEFT JOIN will not update.
Message
De
22/10/2002 15:31:37
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
View with LEFT JOIN will not update.
Divers
Thread ID:
00714040
Message ID:
00714040
Vues:
56
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
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform