Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » ElevateDB Technical Support » Support Forums » ElevateDB SQL » View Thread |
Messages 1 to 3 of 3 total |
Are OUTER joins working? |
Thu, Apr 26 2007 9:17 AM | Permanent Link |
Roy Lambert NLH Associates Team Elevate | I'm still trying to get my info from the information database and I'm begining to wonder if OUTER joins aren't working.
select name,type,collation from information.tablecolumns TC WHERE tablename = 'MandN' gives 25 rows select name,type,collation,XC.IndexName from information.tablecolumns TC right outer join information.IndexColumns XC ON XC.ColumnName = TC.Name WHERE TC.tablename = 'MandN' AND XC.TableName = 'MandN' only gives 22 rows I've tried left outer join, right outer join, join, left join, join, offering it a cup of coffee and in the immortal words of Catweasel "nothing works" My understanding of sql isn't good so will someone please put me out of my misery. Roy Lambert |
Fri, Apr 27 2007 8:02 AM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Roy,
<< only gives 22 rows >> It's because of the WHERE clause - it's filtering out any NULL values in the TableName columns. Try this instead: select name,type,collation,XC.IndexName from information.tablecolumns TC left outer join information.IndexColumns XC ON XC.ColumnName = TC.Name AND XC.TableName = 'MandN' WHERE TC.tablename = 'MandN' -- Tim Young Elevate Software www.elevatesoft.com |
Tue, May 1 2007 3:56 AM | Permanent Link |
Roy Lambert NLH Associates Team Elevate | Tim
Thanks Roy Lambert |
This web page was last updated on Tuesday, May 7, 2024 at 02:40 AM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |