Hello everyone I'm having issues converting this statement into an inner join statement.
The statement I wrote works fine but isn't up to date with standards where they prefer inner joins rather than the method i'm doing it.
Here is the orginal code that works:
Code:select * FROM ncim.entity, ncpgui.collectionViewEntity, ncpgui.collectionView, ncpgui.networkView WHERE ncim.entity.entityName = ncpgui.collectionViewEntity.entityName AND ncpgui.collectionViewEntity.viewId = ncpgui.collectionView.viewId AND ncpgui.networkView.viewId = ncpgui.collectionView.viewId;
Here's my attempt to convert it with inner joins but i'm confused on what goes where....
Code:SELECT * ncim.entity, ncpgui.collectionViewEntity, ncpgui.collectionView, ncpgui.networkView from ? INNER JOIN ? ON ncim.entity.entityName = ncpgui.collectionViewEntity.entityName INNER JOIN ? ON ncpgui.collectionViewEntity.viewId = ncpgui.collectionView.viewId INNER JOIN ? ON ncpgui.networkView.viewId = ncpgui.collectionView.viewId;
I understand it when its used with just 1 table and with 1 key....
but I have 2 databases, using tables from each database...
like database: ncpgui and ncim.
Any help would be great!
Thanks!




Reply With Quote