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

laxpro2001

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.

SQLChao
Use RatManreport
GO

SELECT *
FROM INFORMATION_SCHEMA.COLUMNS
WHERE COLUMN_NAME LIKE '%CD%'

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Java

How can I get column names from a table in SQL Server?

From Dev

Can i compute the "Look up names" property in Names-Field

From Dev

How can I retrieve a list of SQL Server LocalDb names?

From Dev

How can I get count of column a into the column b in SQL Server?

From Dev

How can I back up a stored procedure in SQL Server?

From Dev

How do I get schema / column names from parquet file?

From Dev

How can I look up the local computer name in swift?

From Dev

How can I look up a username by id in linux?

From Dev

How can I look up the 2 axis values by inputting a number?

From Dev

How can I look up the local computer name in swift?

From Dev

How can I set the value of a SQL Server column to True / False?

From Dev

How can I change data type of a column in SQL Server?

From Dev

How can I get the count depending on the column value in SQL Server

From Dev

How can I write a query in SQL Server on XML column

From Dev

How can I transpose SQL Server rows to multiple column?

From Dev

How can I get the schema or row names of a table in soci?

From Dev

How can we separate arabic names from a column in SQL Server 2012?

From Dev

SQL Server diagram filters look up tables

From Dev

In SQL Server, how do I retrieve data values from table column names identified in a sub-query?

From Dev

How can I delete a user from sql server 2012 who owns a schema

From Dev

How can I compare 2 sql server databases schema and get the update script

From Dev

How can I search through a SQL Server database schema to find StoredProcs with a specified set of args?

From Dev

pypyodbc Can't refer to column names using SQL Server Localdb

From Dev

How can I create a SQL table variable using records in another table as column names

From Dev

How can I query a value in SQL Server TEXT column that contains XML (not xml column type)

From Dev

How can I query a value in SQL Server TEXT column that contains XML (not xml column type)

From Dev

How can I insert from a TEXT column to an XML column in SQL Server 2014

From Dev

How can I tidy up this SQL query?

From Dev

SQL Server - How can I retrieve an ascending count-up of each value in a table, per row?

Related Related

  1. 1

    How can I get column names from a table in SQL Server?

  2. 2

    Can i compute the "Look up names" property in Names-Field

  3. 3

    How can I retrieve a list of SQL Server LocalDb names?

  4. 4

    How can I get count of column a into the column b in SQL Server?

  5. 5

    How can I back up a stored procedure in SQL Server?

  6. 6

    How do I get schema / column names from parquet file?

  7. 7

    How can I look up the local computer name in swift?

  8. 8

    How can I look up a username by id in linux?

  9. 9

    How can I look up the 2 axis values by inputting a number?

  10. 10

    How can I look up the local computer name in swift?

  11. 11

    How can I set the value of a SQL Server column to True / False?

  12. 12

    How can I change data type of a column in SQL Server?

  13. 13

    How can I get the count depending on the column value in SQL Server

  14. 14

    How can I write a query in SQL Server on XML column

  15. 15

    How can I transpose SQL Server rows to multiple column?

  16. 16

    How can I get the schema or row names of a table in soci?

  17. 17

    How can we separate arabic names from a column in SQL Server 2012?

  18. 18

    SQL Server diagram filters look up tables

  19. 19

    In SQL Server, how do I retrieve data values from table column names identified in a sub-query?

  20. 20

    How can I delete a user from sql server 2012 who owns a schema

  21. 21

    How can I compare 2 sql server databases schema and get the update script

  22. 22

    How can I search through a SQL Server database schema to find StoredProcs with a specified set of args?

  23. 23

    pypyodbc Can't refer to column names using SQL Server Localdb

  24. 24

    How can I create a SQL table variable using records in another table as column names

  25. 25

    How can I query a value in SQL Server TEXT column that contains XML (not xml column type)

  26. 26

    How can I query a value in SQL Server TEXT column that contains XML (not xml column type)

  27. 27

    How can I insert from a TEXT column to an XML column in SQL Server 2014

  28. 28

    How can I tidy up this SQL query?

  29. 29

    SQL Server - How can I retrieve an ascending count-up of each value in a table, per row?

HotTag

Archive