sql error 208

I can't figure out why I'm getting this error... I can't even find that column anywhere in this code...

Sql Error: 208  Invalid object name 'keyWorkOrderTimeInArea'.

ALTER PROCEDURE [dbo].[p_EnterSimpleOrder]
      @keyArea int,
      @keyCompany int,
      @skuWorkOrder nvarchar(50)
as

set nocount on

Begin Try

      Declare @keyWorkOrder int

      Select @keyWorkOrder = keyWorkOrder
      From WorkOrder
      Where keyCompany = @keyCompany
      and        lower(skuWorkOrder) = lower(@skuWorkOrder)
      

      If @@rowcount = 0
            Begin
                  return 1
            End

      Select keyWorkOrder
      From WorkOrderTimeInArea
      Where keyArea      = @keyArea
      and   keyWorkOrder = @keyWorkOrder
      and   othBeginTime is not null
      and   othEndTime is null

      If @@rowcount > 0
            Begin
                  return 2
            End

      Insert Into WorkOrderTimeInArea(keyArea,keyWorkOrder,othBeginTime)
            Values(@keyArea,@keyWorkOrder,getdate())                  

      return 0

End Try

Begin Catch      
      print error_message()
      return error_number()
End Catch
LVL 1
picsnetAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
BrandonGalderisiConnect With a Mentor Commented:
It is probably in a trigger somewhere.


Run this to find out
select * from information_schema.routines
where routine_definition like '%keyWorkOrderTimeInArea%'

Open in new window

0
 
picsnetAuthor Commented:
geezus spanking monkeys... i just started using triggers really, and i didn't even think about that
0
All Courses

From novice to tech pro — start learning today.