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 need to have the results of select in another part of the same queryquery 1 -- select foldername, folderdate, filename from foldersquery2 -- select auditname from audits where foldername = foldername from 1how do i combine these two into one query?
harsh_athalye
Master Smack Fu Yak Hacker
5581 Posts
Posted - 2007-09-21 : 12:37:06
Simply join Folder table with Audits table on foldername column.
Select f.FolderName, f.FolderDate, f.FileName, a.AuditNameFrom Folders f join Audits a on f.FolderName = a.FolderName
Harsh AthalyeIndia."The IMPOSSIBLE is often UNTRIED"