General information
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Sql statement to retrieve data from two tables
Environment versions
Network:
Windows 2000 Server
hi experts,
i have two files EmpMaster and Details
i want make a query based on the value of EmpMaster-> empsts field
if it is >0 select value from Empmastre, else i want to select data from detail file.
,ie
'Select empcode,empname,iif(empsts >0,empmaster.Remark,(i want to select remark from Details
files base on EmpMaster.empcode = Details.empcode))'
plse help me how to do it in sql server.
Regards
Abdulla
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only