Page 1 of 1

Problem with SQL Statement

Posted: Fri Dec 10, 2010 7:51 am
by krsm1980
Hi guys,

I have one problem,

Table A (contains 100 records), just one identifier
Table B (contains 500 records), just two identifiers

What i want is, there must be a SQL statement....which offer me

It must take first record from TABLE A, and check that into Table B...if exists then display that records there. and the show must continue till 100 records (till Tables moves to end)

Plz help me finding such statement i can execute as SQL statement.

many thanks in advance.

Re: Problem with SQL Statement

Posted: Fri Dec 10, 2010 7:53 am
by VladSun
What have you tried so far? Post your queries.

Re: Problem with SQL Statement

Posted: Fri Dec 10, 2010 11:26 am
by krsm1980
I havent tried anything yet....

i just to want to get one statement, with which i can perform above mentioned task.

It must take one record from TAB A, and move into TAB B, and search for it till end. then next and search for it....and LOOP continues...

at last it must tell me which are the records; not available in TAB B

Re: Problem with SQL Statement

Posted: Fri Dec 10, 2010 12:18 pm
by VladSun
OK, write something, try it and return for help... Here in this forum, we help people to get solutions, we don't provide them ...

Re: Problem with SQL Statement

Posted: Sun Dec 12, 2010 1:21 pm
by Darhazer
VladSun, you can give starting direction. Frankly, I didn't expect such posts from you :)

krsm1980, this seems like simple inner join - show all posts from table b that match to identifier in table a :)
Try it.
And if it's not exactly what you are looking for, provide a samle input (which means samle rows in database) and output, to illustrate your needs.

Re: Problem with SQL Statement

Posted: Mon Dec 13, 2010 6:03 am
by VladSun
You are right. Probably a bad mood ...