467,134 Members | 982 Online
Bytes | Developer Community
Ask Question

Home New Posts Topics Members FAQ

Post your question to a community of 467,134 developers. It's quick & easy.

Need help with error on JOIN statement

I get the following error when running the query below:

Tables or functions 'AST_CMDB_Associations' and 'AST_CMDB_Associations' have the same exposed names. Use correlation names to distinguish them.

I have looked up information regarding correlation names but it just doesn't make sense to me. It's obvious I don't really know what I am doing. Can anyone help? Thanks in advance.

UPDATE AST_ComputerSystem
SET AST_ComputerSystem.Supported = '1'
from AST_CMDB_Associations, AST_ComputerSystem, AST_AssetWarranty
INNER JOIN AST_ComputerSystem ON AST_ComputerSystem.Reconciliation_Identity = AST_CMDB_Assocations.Request_ID01
INNER JOIN AST_CMDB_Associations ON AST_AssetWarranty.instanceId =
AST_CMDB_Associations.Request_ID02
WHERE((AST_AssetWarranty.Expiration_Date >Currentdate))
Sep 24 '08 #1
  • viewed: 1184
Share:
3 Replies
code green
Expert 1GB
Must admit not familiar with this one.
But at a guess it is likely because you have JOINed to the same table.
Nothing wrong with that but you need to alias them both,
then refer to the alias in the table.fieldname prefix
Expand|Select|Wrap|Line Numbers
  1. from AST_CMDB_Associations aca, AST_ComputerSystem, AST_AssetWarranty
  2. INNER JOIN AST_ComputerSystem ON AST_ComputerSystem.Reconciliation_Identity = aca.Request_ID01
  3. INNER JOIN AST_CMDB_Associations acma ON AST_AssetWarranty.instanceId = 
  4.  
Or something along those lines
Sep 24 '08 #2
iburyak
Expert 512MB
Try this:

Expand|Select|Wrap|Line Numbers
  1. UPDATE AST_ComputerSystem 
  2. SET AST_ComputerSystem.Supported = '1' 
  3. from AST_AssetWarranty
  4. INNER JOIN AST_CMDB_Associations ON AST_AssetWarranty.instanceId = AST_CMDB_Associations.Request_ID02 
  5. INNER JOIN AST_ComputerSystem ON AST_ComputerSystem.Reconciliation_Identity = AST_CMDB_Assocations.Request_ID01
  6. WHERE(AST_AssetWarranty.Expiration_Date > Currentdate)
Good Luck.
Sep 24 '08 #3
That did it! Thanks so much for the help.


Try this:

Expand|Select|Wrap|Line Numbers
  1. UPDATE AST_ComputerSystem 
  2. SET AST_ComputerSystem.Supported = '1' 
  3. from AST_AssetWarranty
  4. INNER JOIN AST_CMDB_Associations ON AST_AssetWarranty.instanceId = AST_CMDB_Associations.Request_ID02 
  5. INNER JOIN AST_ComputerSystem ON AST_ComputerSystem.Reconciliation_Identity = AST_CMDB_Assocations.Request_ID01
  6. WHERE(AST_AssetWarranty.Expiration_Date > Currentdate)
Good Luck.
Sep 24 '08 #4

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

7 posts views Thread by Dave | last post: by
20 posts views Thread by andy.rich@earthlink.net | last post: by
4 posts views Thread by algroth@gmx.de | last post: by
reply views Thread by ward@ | last post: by
9 posts views Thread by pic078 via AccessMonster.com | last post: by
5 posts views Thread by Sascha.Moellering@gmail.com | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.