Link to home
Get AccessLog in
Avatar of rgbcof
rgbcof

asked on

sql, select from one table if value in another table with conditions

I would like to select dns_name and building from dns_table if dns_name is in the server_name of the server_table plus some condition (where buiding is "east", and where active_type is "passive")

dns_table:
dns_name  building  
========  ========
serverA     west
serverB     east


server_table:
server_name  ip_address   active_type    
==========  ==========  =========
serverB          10.10.10.1      active
serverC          10.10.10.2      passive
ASKER CERTIFIED SOLUTION
Avatar of Jim Horn
Jim Horn
Flag of United States of America image

Link to home
membership
This content is only available to members.
To access this content, you must be a member of Experts Exchange.
Get Access
SOLUTION
Link to home
membership
This content is only available to members.
To access this content, you must be a member of Experts Exchange.
Get Access
SOLUTION
Link to home
membership
This content is only available to members.
To access this content, you must be a member of Experts Exchange.
Get Access