Information générale
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
>>so if A is ur addlink table. How can you say delete A from Add link.
>>
>>Also im trying to translate your code into mine so...we are using to tables. not too sure why because we trying to mark for deletion duplicates from one table
>>
>>>A is an alias for AddLink table in my example. BTW, this code is taken from SQL Server, in VFP it's better to not use letters from A to J as table aliases in the select statement.
>>>
>>>>your first line.Is it delete A from addlink. So I take A to be a field but then u have A.address which makes it a table?is it supposed to b delete * from?
>
>Delete myTable from myTable inner join Dups on myTable.DupKey = Dups.DupKey and myTable.PK > Dups.MinKey
I tried
delete myTable from myTable inner join dup on mytable.fname=dup.fname
solely for testing it seems to be getting me somewhere. All the duplicated records where marked (which isnt exactly right) an also some that were not duplicated but i think that will be sorted out when i do a proper query. also why did we have to do an inner join using the dup table again?
Off Topic: when I mark stuff is there a way (apart from set deleted on) to unmark them?or do i do another query
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement