|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Help!- simple code advice
I'm definitely a newb, so bear with.
in an sql database i have 2 tables, A and B. each is loaded with a phone number. i would like to take A, and compare it to B. If A is anywhere on B, do nothing. If A is nowhere on B, export it to a new table, we'll call C another way would be to have them compare and if A is on B, delete the record. If A is not on B, leave it alone, and now A will be the new table with clean data. Any help? keep in mind i'm a moron, so you'll have to walk me through all the steps. Thanks Mike |
|
#2
|
||||
|
||||
|
do you mean IN?
If A is IN B? Something like this will get you a list of phone numbers from Table A, that aren't in TableB Code:
SELECT DISTINCT Phone
FROM A
WHERE Phone NOT IN
(
SELECT DISTINCT Phone
FROM B
)
|
![]() |
| Viewing: ASP Free Forums > Database > Microsoft SQL Server > Help!- simple code advice |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|