User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the MS SQL section within the Web Development category of DaniWeb, a massive community of 402,695 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,465 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our MS SQL advertiser: Programming Forums

Extract columns from two independent table in SQL Server 2005?

Join Date: Apr 2008
Posts: 4
Reputation: aardvax01 is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
aardvax01 aardvax01 is offline Offline
Newbie Poster

Re: Extract columns from two independent table in SQL Server 2005?

  #5  
Apr 14th, 2008
Hi Bhavna

I think that you can do it yourself
There is something called Non -Equi Joins Which needs the where clause which you want
I think you can use Logical Operators to accomplish what you want

There is one Example of Employee and Salary Tables ( a famous one)

Hope this will help you

Ok lemme give an Example -- Suppose there are two tables with name as Emp and Salary



  1. SELECT E.Last_Name, E.Sal, S.Category
  2. FROM Emp E, Salary S
  3. WHERE E.Sal BETWEEN S.Highest AND S.Lowest


And this example is taking oracle in consideration ..
there might be some other way of using joins in SQL Server
I will have a look and will edit this post once more
Last edited by peter_budo : Apr 17th, 2008 at 1:53 pm. Reason: Keep It Organized - please use [code] tags
Reply With Quote  
All times are GMT -4. The time now is 5:34 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC