-1
use AdventureWorks2017
Go 
--select FirstName,DueDate  ,
--Product.Name,ProductInventory.ProductID,LastName
--from  Person.Person , enter code here
--Production.Product,
--Production.ProductInventory,
--Purchasing.PurchaseOrderDetail
--where person.BusinessEntityID = Production.Product.ProductID and  > > > > > 
person.BusinessEntityID=PurchaseOrderID 
--and Person.LastName like  'a%awa' and( ProductInventory.ProductID between 882 and 992);
**strong text**
select NationalIDNumber,Person.FirstName,JobTitle
from HumanResources.Employee ,Person.Person inner join
     Person.Person 
     using (Person.Person.PK_Person_BusinessEntityID)
where JobTitle like 'Eng%';

Error message:

Msg 321, Level 15, State 1, Line 14 "Person" is not a recognized table hints option.

Dale K
  • 25,246
  • 15
  • 42
  • 71
  • possible duplicate of https://stackoverflow.com/questions/32479936/sql-join-using-using-column-name-is-not-a-recognized-table-hints-option – Ian Kenney Jun 05 '21 at 23:24
  • `using (Person.Person.PK_Person_BusinessEntityID)` ... is that meant to be an index hint? Or a join condition? Because currently it's neither. – AlwaysLearning Jun 06 '21 at 00:57

1 Answers1

1

you can't using() as join parameter in sql server, you have to use on also you are joiing to person table twice ,and never use explicit join:

select NationalIDNumber,Person.FirstName,JobTitle
from HumanResources.Employee e
inner join Person.Person p 
 on p.PK_Person_BusinessEntityID =  e.PK_Person_BusinessEntityID
where JobTitle like 'Eng%';
eshirvana
  • 23,227
  • 3
  • 22
  • 38