title: OBJECT_ID() fails to get object id in SQL Server 2014
body: <p><a href="https://i.stack.imgur.com/Sd1nY.png" rel="nofollow noreferrer">print2</a><img src="https://i.stack.imgur.com/aZlGH.png" alt="print"></p>
  
  <p>I've tried every possible way to get the ID of the object through OBJECT_ID() but it seems like i can only find the object searching it manually in 'sys.objects'. In SQL 2008 it works just fine, same code. I'm using SQL Server 2017 in the picture.</p>
  
  <p>Does anyone know if this is a problem with SQL Server 2014? Am I missing something?</p>