Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where to find object in SQL Server and determine if it's a view or table?

I am having a problem that I think is easy to resolve but cant put my finger on it.

I did not create this database or jobs so troubleshooting my way through it.

I have a SQL Server job that is failing, it has multiple steps.

One of the steps is

select * into [Pastel_OrderStock] from [Pastel_SOProducts]

This fails with error:

Error converting data type varchar to float.

Now if I try and go:

select * from [Pastel_SOProducts]

it gives same error.

My issue is that I can't see a table or view Pastel_SOProducts in any of my database tables or views but it obviously exists given the error.

How can I find out where this is and more importantly view the table structure or view syntax?

Thanks in advance

like image 751
Smudger Avatar asked Nov 02 '25 13:11

Smudger


1 Answers

It will be in sys.objects. The type and type_desc will show what object type is.

like image 71
Remus Rusanu Avatar answered Nov 05 '25 14:11

Remus Rusanu