SQL creates un-editable records... (1 Viewer)

CHAOSinACT

Registered User.
Local time
Tomorrow, 01:50
Joined
Mar 18, 2009
Messages
235
Ok, I'll start by admitting my SQL-fu is weak, and I tend to just edit what I get from the query designer, it seems to work out *most* of the time...


I have a bunch of MYOB table data, I need to compare tables and remove old records from one based on criteria from the other. Here's the rub: the connecting fields are in foreign tables as are the criteria! so we have journal records connected to journal sets in 2 files, with journal records being primary table...(hmm, maybe just this once it shouldn't be. I'll try that next...) and the criteria in foreign tables too.....anyway, is there a way to right this that will keep records editable?


Code:
SELECT hyd_CheckJobTransactions.JournalRecordID, hyd_CheckJobTransactions.TransactionNumber, hyd_CheckJobTransactions.Memo, dgroup_CheckJobTrans.Memo
FROM hyd_CheckJobTransactions INNER JOIN dgroup_CheckJobTrans ON hyd_CheckJobTransactions.TransactionNumber = dgroup_CheckJobTrans.TransactionNumber
WHERE (((dgroup_CheckJobTrans.Memo)="Pre-conversion purchase"));
 

CHAOSinACT

Registered User.
Local time
Tomorrow, 01:50
Joined
Mar 18, 2009
Messages
235
This screen shot might save some time explaining the situations too!
 

Attachments

  • BadQuery.jpg
    BadQuery.jpg
    96.6 KB · Views: 66

CHAOSinACT

Registered User.
Local time
Tomorrow, 01:50
Joined
Mar 18, 2009
Messages
235
Now I'm really confused :/

The tables are imported from MYOB I tend to never delete them so never noticed this berfore... no relationships are saved yet even this simple beast cannot delete a record, both are plain tables no queries! Check out this screenshot of 2 plain joined tables, I know I have deleted with this scenario in the past on other tables :*(
 

Attachments

  • bad query simple.PNG
    bad query simple.PNG
    44.3 KB · Views: 71

Users who are viewing this thread

Top Bottom