Quantcast
Channel: Transact-SQL forum
Viewing all articles
Browse latest Browse all 23857

Select Query ?

$
0
0

Hello

I have two tables.

tablename: tableA

coulumname: id, studentname

records: 1,  nameA

             2, name B

tablename: tableB

columname: educationid, studentid, education

records:       1,      1        ,   educationA

                   2,      1        , educationB

                   1,       2       , educationA

Filterparameter is educationid. When it is 1, result should be like below

studentname

name A

name B

There is 1 and 2 in tableB as studentid.

When filterparameter are 1 and 2, result should be like below

student

name A

name B

Because there are records(edicationid) as 1 and 2 as parameter.

when parameter is 2, result should be like below

nameA

studentid is 1 at tableB.

Can you type Select Query for this?

Thanks.


Viewing all articles
Browse latest Browse all 23857

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>