EasyCFM.COM ColdFusion Forums / MS SQL Server Related Issues / problem in self join

   Reply to Discussion | New Discussion << previous || next >> 
Posted By Discussion Topic: problem in self join

book mark this topic Printer-friendly Version  send this discussion to a friend  new posts last

santhoshi.g11
04-01-2008 @ 5:39 AM
Reply
Edit
Profile
Send P.M.
My Gravatar!
Powered by Gravatar
New Member
Posts: 3
Joined: Apr 2008

How to use multiple(when one table acting as 3 or more tables) self join in a single table.

This message was edited by santhoshi.g11 on 4-2-08 @ 12:37 AM

louissto56
04-01-2008 @ 6:18 AM
Reply
Edit
Profile
Send P.M.
My Gravatar!
Powered by Gravatar
Moderator
Posts: 1149
Joined: Jan 2007

SELECT *
FROM table1 t1 INNER JOIN table1 t2 ON t2.parentID = t1.ID

Just alias them differently. Notice how I named them t1 and t2

Louis

-----------------------------
www.MyBizList.com.au - QLD Business Directory and rent-a-site

santhoshi.g11
04-02-2008 @ 12:40 AM
Reply
Edit
Profile
Send P.M.
My Gravatar!
Powered by Gravatar
New Member
Posts: 3
Joined: Apr 2008

Thank u for ur reply.I want it for more than 2 tables i.e..,one table acting as 3 or more tables with self integrity join condition.

This message was edited by santhoshi.g11 on 4-2-08 @ 12:43 AM


Website Designed and Developed by Pablo Varando.