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.
| Author |
Topic |
|
kiekar
Starting Member
7 Posts |
Posted - 2008-09-05 : 15:33:30
|
Hello,I am receiving an error each time I try to save the query. I'm usingSQL 2005 express through VS 2008.The multi-part identifier "ChecklistItemCategories.ChecklistItemCategoryID" could not be bound.The mulit-part identifie "ChecklistComponents.ChecklistItemCategoryID" cound not be bound.SELECT ChecklistDetailID, IARRegistrationChecklistID, ChecklistComponentID, CheckedComponent, QCCategory, ISARP, QCObservation, IPM_AH, Action, VerifiedBy, (SELECT ChecklistComponentID FROM ChecklistComponents WHERE ChecklistDetails.ChecklistComponentID = ChecklistComponents.ChecklistComponentID ) AS Component, (SELECT ChecklistItemCategoryID FROM ChecklistItemCategories WHERE ChecklistItemCatgories.ChecklistItemCategoryID = ChecklistComponents.ChecklistItemCategoryID) AS CategoryDescriptionFROM ChecklistDetails http://www.enter-net.com/~kkieslin/Select.jpgYour help would be much appreciated.ThanksKarl |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2008-09-05 : 15:52:16
|
| [code]SELECT cd.ChecklistDetailID, cd.IARRegistrationChecklistID, cd.ChecklistComponentID, cd.CheckedComponent, cd.QCCategory, cd.ISARP, cd.QCObservation, cd.IPM_AH, cd.[Action], cd.VerifiedBy, cc.ChecklistComponentID AS Component, cic.ChecklistItemCategoryID AS CategoryDescriptionFROM ChecklistDetails cdINNER JOIN ChecklistComponents cc ON cd.ChecklistComponentID = cc.ChecklistComponentIDINNER JOIN ChecklistItemCategories cic ON cc.ChecklistItemCategoryID = cic.ChecklistItemCategoryID[/code]Tara KizerMicrosoft MVP for Windows Server System - SQL Serverhttp://weblogs.sqlteam.com/tarad/Subscribe to my blog |
 |
|
|
kiekar
Starting Member
7 Posts |
Posted - 2008-09-05 : 18:25:46
|
Hello,Thank you for your help. I have one other question. I modified your suggestion to add a WHERE clause.SELECT cd.ChecklistDetailID, cd.IARRegistrationChecklistID, cd.ChecklistComponentID, cd.CheckedComponent, cd.QCCategory, cd.ISARP, cd.QCObservation, cd.IPM_AH, cd.[Action], cd.VerifiedBy, cc.ChecklistComponentID AS Component, cic.ChecklistItemCategoryID AS CategoryDescriptionFROM ChecklistDetails cdINNER JOIN ChecklistComponents cc ON cd.ChecklistComponentID = cc.ChecklistComponentIDINNER JOIN ChecklistItemCategories cic ON cc.ChecklistItemCategoryID = cic.ChecklistItemCategoryIDWHERE cd.ChecklistDetailID = @ChecklistDetailID When I bind the stored procedure to a detailsview control, the cc.ChecklistComponentID AS Component and cic.ChecklistItemCategoryID AS CategoryDescription are displayed as id intergers. What would I need to modify in the query to display the actual string for the id intergers, e.g ChecklistItemCategoryID 1 = TitlePage and ChecklistComponentID 1 = AuditeeNameThanks |
 |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
|
|
|
|
|
|