SQL Statements

  • Thread starter Thread starter carole
  • Start date Start date
C

carole

I have 2 tables which are linked and i need to retract
different information from them both.

What i need to to is 'if yes [firstname] from [table 1]
and if no [represented by] from [table 2]. Unsure how to
do this as the tables are joined.

Much appreciated
 
I have 2 tables which are linked and i need to retract
different information from them both.

What i need to to is 'if yes [firstname] from [table 1]
and if no [represented by] from [table 2]. Unsure how to
do this as the tables are joined.

Much appreciated

You'll need to explain what you mean by " yes [firstname] ", and
probably also explain how the tables are linked.
 
carole said:
I have 2 tables which are linked and i need to retract
different information from them both.

What i need to to is 'if yes [firstname] from [table 1]
and if no [represented by] from [table 2]. Unsure how to
do this as the tables are joined.

Much appreciated

Making many assumptions:

SELECT IIF((M1.firstname = -1) AND (M2.[represented by] = 0), <true result>,
<false result>)
FROM MyTable1 AS M1
INNER JOIN
MyTable2 AS M2
ON M1.PrimaryKey = M2.PrimaryKey




My apologies if this is not helpful.


Sincerely,

Chris O.
 
Back
Top