need storedproc or query to check multiple values from two or more tables

Posted by Parthibansk under Sql Server on 11/7/2012 | Points: 10 | Views : 766 | Status : [Member] | Replies : 5
i need a stored proc or query to check username and companyname from two tables...

designed a form in which i have to check username from from table1 and companyname from table2..




Responses

Posted by: Naraayanan on: 11/7/2012 [Member] Starter | Points: 25

Up
0
Down
Hi,
Please upload your Table1 field name(s) and Table2 field name(s) .

Regards,
Lakshmi Naraayanan.S
http://dotnettechrocks.blogspot.in/
http://abaprocker.blogspot.com/

Parthibansk, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Parthibansk on: 11/7/2012 [Member] Starter | Points: 25

Up
0
Down
TABLE1: TABLE2

USERNAME COMPANYNAME
COMPANYNAME ADDRESS
PASSWORD CONTACT
ADMINISTRATOR LICENSE

Parthibansk, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Parthibansk on: 11/7/2012 [Member] Starter | Points: 25

Up
0
Down
TABLE1:

USERNAME
COMPANYNAME
PASSWORD
ADMINISTRATOR

TABLE2:

COMPANYNAME
ADDRESS
CONTACT
LICENSE


Parthibansk, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Madhu.B.Rokkam on: 11/7/2012 [Member] [MVP] Bronze | Points: 25

Up
0
Down
When you have company name in both tables what is the need to check that from table2 when that can be done from table 1 itself. Let us know if you have any specific requirement for this ??

Thanks and Regards
Madhu

Parthibansk, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Naraayanan on: 11/7/2012 [Member] Starter | Points: 25

Up
0
Down
Hi,
i think, you want to username and Companyname .
This is the Query for your Requirement.
Select T1.Username,T2.CompanyName  from table1 T1,Table2 T2 where T2.Companyname=T1.Companyname



Regards,
Lakshmi Naraayanan.S
http://dotnettechrocks.blogspot.in/
http://abaprocker.blogspot.com/

Parthibansk, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response