a newbie's question: how to mark columns in 2 databases with same values  
Author Message
cunyalen





PostPosted: Visual FoxPro General, a newbie's question: how to mark columns in 2 databases with same values Top

Guys,

I'm a newbie of foxpro and I'm bad in English.

I'm using Visual Foxpro6.0. Now I have two databases A and B with three same fields: id, lac, cell. I want to mark the the columns in these 2 databases with the same values of id, lac, cell. What's the command to do that Thanks a lot.

 

Alen



Visual FoxPro1  
 
 
Dave M.





PostPosted: Visual FoxPro General, a newbie's question: how to mark columns in 2 databases with same values Top

what do you mean by "mark the the columns"

Dave


 
 
cunyalen





PostPosted: Visual FoxPro General, a newbie's question: how to mark columns in 2 databases with same values Top

I want to mark them, then I could extract these columns to create a new file. Basically to mark them will make it easier for me find them next time to make a file.
 
 
Dave M.





PostPosted: Visual FoxPro General, a newbie's question: how to mark columns in 2 databases with same values Top

Add a Field to the second table called "flag".

UPDATE table1 SET MARK='Y' WHERE id+lac+cell IN (SELECT id+lac+cell FROM table2)

I think this is what you are looking for…

But I don’t see how this makes it easier for “Next time”. Why not Just Select what you need when you need it

Dave M.