Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 SELECT STATEMENT?

Author  Topic 

paramu
Posting Yak Master

151 Posts

Posted - 2009-04-08 : 11:25:14
I want to use the following query ..How to do it with SQL Server2005?

select emp_master.ep_id,emp_master.f_nam,emp_nations.emp_nationality from emp_master,emp_nations where
emp_nations.emp_country=emp_master.emp_country

Ideas are Welcome



Paramu @ PARANTHAMAN

DonAtWork
Master Smack Fu Yak Hacker

2167 Posts

Posted - 2009-04-08 : 12:30:50
might i suggest following the ultra basic links in my signature?

[Signature]For fast help, follow this link:
http://weblogs.sqlteam.com/brettk/archive/2005/05/25.aspx
Learn SQL or How to sell Used Cars
For ultra basic questions, follow these links.
http://www.sql-tutorial.net/
http://www.firstsql.com/tutor.htm
http://www.w3schools.com/sql/default.asp
Go to Top of Page

paramu
Posting Yak Master

151 Posts

Posted - 2009-04-09 : 02:32:41
Thanks For The Links. Worth To Look.!!!
Nice!

I found the answer there. It may be useful to some are like me.

select emp_master.emp_id,emp_master.emp_name,emp_nations.emp_nationality from (emp_master inner join emp_nations on emp_nations.emp_country=emp_master.emp_country)


Paramu @ PARANTHAMAN
Go to Top of Page

DonAtWork
Master Smack Fu Yak Hacker

2167 Posts

Posted - 2009-04-09 : 07:20:10
Glad the links were of help!

[Signature]For fast help, follow this link:
http://weblogs.sqlteam.com/brettk/archive/2005/05/25.aspx
Learn SQL or How to sell Used Cars
For ultra basic questions, follow these links.
http://www.sql-tutorial.net/
http://www.firstsql.com/tutor.htm
http://www.w3schools.com/sql/default.asp
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2009-04-10 : 06:30:01
quote:
Originally posted by paramu

Thanks For The Links. Worth To Look.!!!
Nice!

I found the answer there. It may be useful to some are like me.

select emp_master.emp_id,emp_master.emp_name,emp_nations.emp_nationality from (emp_master inner join emp_nations on emp_nations.emp_country=emp_master.emp_country)


Paramu @ PARANTHAMAN


why the braces around table names?
Go to Top of Page

tosscrosby
Aged Yak Warrior

676 Posts

Posted - 2009-04-10 : 12:23:16
And aliases (emp_master can now be referenced simply as m in my example) are are real life-savers for those of us that fat-finger our way through the keyboard. Just my 2 cents......

select m.emp_id, m.emp_name, n.emp_nationality from emp_master m inner join emp_nations n on n.emp_country=m.emp_country


Terry

-- Procrastinate now!
Go to Top of Page
   

- Advertisement -