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
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Joining two unrelated tables

Author  Topic 

kaustubh
Starting Member

4 Posts

Posted - 2005-06-13 : 10:39:36
Hey!

I have a view which returns me a column (lets say colA) with values like 0.85, 1.95, 1.09 etc.

Then i have a table which contains a RangeId's for colA values, with ranges like..

RangeID colA_UpperLimit colA_LowerLimit

01 0.50 1.50
02 1.51 2.01
03 2.02 3.52

How do i get the colA values with the corresponding RangeId's in one view?
There is no relation between the two tables.

I have already tried the following:

SELECT T.RangeID, V.ColA
FROM viewColA V
LEFT JOIN tableRange T ON V.ColA BETWEEN T.colA_UpperLimit AND T.colA_LowerLimit

I get a violation error.

Looking forward to a reply.

Thanks everyone!
Kaustubh

There is no unanswered reply!

X002548
Not Just a Number

15586 Posts

Posted - 2005-06-13 : 10:59:04
Must've been an accident...but please don't intra-post

Brett

8-)

Hint: Want your questions answered fast? Follow the direction in this link
http://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspx
Go to Top of Page
   

- Advertisement -