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)
 Query Again

Author  Topic 

kwikwisi
Constraint Violating Yak Guru

283 Posts

Posted - 2008-08-01 : 05:25:06
query as i shown in my previous post,may be it's wrong at all.
Actually i want data from rtbl,but i also want name from Co.
So i relate these 2tables with CID.
for eg>>Co(id=1,name=aa and id=2,name=bb),rtbl(id=1)
i want only aaa.

I'm waiting ur reply.Thanks.

elancaster
A very urgent SQL Yakette

1208 Posts

Posted - 2008-08-01 : 05:35:16
perhaps some better sample data would help here...? table structures, data in each table, required output etc...

Em
Go to Top of Page

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2008-08-01 : 10:17:05
Holy cow!
Elancaster got an unique alias



E 12°55'05.25"
N 56°04'39.16"
Go to Top of Page

elancaster
A very urgent SQL Yakette

1208 Posts

Posted - 2008-08-01 : 10:24:44
cool huh

Em
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-08-02 : 05:44:48
may be this

SELECT r.*,c.name
FROM rtbl r
INNER JOIN Co c
ON c.id=r.id
Go to Top of Page
   

- Advertisement -