How to Query two tables?

Hello,

 I have no SQL or SWQL experience but I am looking for some guidance. 

I have been able to create the following Query

SELECT TOP 10 NodeID, Address, Application_Arch, BusinessOwner, BusinessUnit, City, Comments, Company, ContactName, CoreDependencies, Country, Custom_Serial_Poller, DateAdded, DeviceDescription, DHCPServer, DisabledBy, DiskSpaceAndPatchGroups, Email, Environment, Locations, PatchGroup, PrimaryRole, RelatedTicket, Remarks, SerialNumber, ServiceOwner, State, SystemApplication, SystemRole, SystemType, TeamResponsible
FROM Orion.NodesCustomProperties ncp ( NCP is the allias )

The additional data i need is below:

SELECT TOP 10 ManagedObjectID, UUID, HostID, ResourcePoolID, VMConfigFile, MemoryConfigured, MemoryShares, CPUShares, GuestState, IPAddress,GuestVmWareToolsStatus, GuestName, DateCreated
FROM Orion.VIM.VirtualMachines * ( i only need datecreated )

so this is how far i have gotten

SELECT TOP 10 NodeID, Address, Application_Arch, BusinessOwner, BusinessUnit, City, Comments, Company, ContactName, CoreDependencies, Country, Custom_Serial_Poller, DateAdded, DeviceDescription, DHCPServer, DisabledBy, DiskSpaceAndPatchGroups, Email, Environment, Locations, PatchGroup, PrimaryRole, RelatedTicket, Remarks, SerialNumber, ServiceOwner, State, SystemApplication, SystemRole, SystemType, TeamResponsible
FROM Orion.NodesCustomProperties ncp
JOIN Orion.VIM.VirtualMachines d on d.DateCreated = Datecreated

( Error ambiguous colombiguous colomn name NodeId between entities Orion.nodesCustomproperties and Orion.VIm.virtualmachines ) I will remove top 10 once i have the correct syntax

I need to pull the date from the table Orion.VIM.VirtualMachines ( Datecreated )

Parents Reply Children
No Data