Site Sponsored By: SQLDSC - SQL Server Desired State Configuration
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.
I have 3 tables with the following field structure:Survey_folder(T3): FolderID, DescLevel_0, PrefixSubfolderSurvey_Subfolder(T1): SubfolderID, DescLevel_1Survey_WebName(T2): Abbr, WebNameI am having this query:
SELECT T1.Level1ID, T1.DescLevel_1, T2.WebName, T3.PrefixSubFolder, T2.WebName FROM Survey_SubFolder T1, Survey_WebName T2, Survey_Folder T3WHERE ((T1.DescLevel_1 = T2.Abbr) OR (T3.PrefixSubFolder = T2.Abbr))AND T1.FolderID = T3.FolderIDAND T1.FolderID =1...for which I get the following results:1 General CES Survey 2002 CES 02 CES Survey 20021 General General CES 02 General2 Tables CES Survey 2002 CES 02 CES Survey 20022 Tables Tables CES 02 TablesThe results I desire to have is:1 General General CES 02 CES Survey 20022 Tables Tables CES 02 CES Survey 2002
...but I cannot think of a way to get that query.Any help will be appreciated.Thank you.PKS