laxpro2001 laxpro2001 - 2 years ago 66
SQL Question

How can I look up column names in a SQL Server with an odd schema?

I'm trying to select column names in our database and I'm unsure how. I tried some solutions I found on Stack Social but I haven't been able to make them work.

Is it even possible given the schema? I feel like it should be but my limited understanding in how to change the FROM clause is preventing me from doing this on my own. Below is a picture to help elaborate on the difficulty I'm having.
Picture of schema and attempts to return table and column names

EDIT: The problem is unique in that the overall layout of our database seems largely different from the norm. There seems to be nested databases and I wasn't sure how to use a specific DB.

The Use function worked well for this but its not intuitive from other answers. At least the picture can help someone in the future if they have a similar problem.

Answer Source
Use RatManreport

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download