Ask Your Question
1

What is the problem with my SAS query when trying to access an external DBMS table with a column name that contains space?

asked 2022-05-03 11:00:00 +0000

plato gravatar image

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2022-04-15 18:00:00 +0000

david gravatar image

The problem with your SAS query is that SAS does not allow spaces in column names when accessing external DBMS tables. To access a column that contains space in an external DBMS table, you can use double quotes to enclose the column name. For example, if you have a table with a column named "First Name", you can access it in SAS with the following query:

SELECT "First Name" FROM external_table;

Alternatively, you can create a view in the external DBMS that renames the column without spaces, and then access the view in SAS.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss

Add Answer


Question Tools

Stats

Asked: 2022-05-03 11:00:00 +0000

Seen: 7 times

Last updated: Apr 15 '22