uncleroydee
Technical User
I need to combine the data from two joined tables in a view. Some of the columns have the same name and I would like to merge the data from those two columns into one column in the view keeping that name.
Following is some paraphrasing of the page from BOL that contains the syntax for creating a view. Can anyone clarify the "n is a placeholder" statement for me? That seems to be the syntax I need to use.
CREATE VIEW (T-SQL)
.
.
.
Syntax
CREATE VIEW view_name [(column [,...n])]
[WITH ENCRYPTION]
AS
select_statement
[WITH CHECK OPTION]
Arguments
view_name
Is the name of the view. View names must follow the rules for identifiers. Specifying the view owner name is optional.
column
Is the name to be used for a column in a view. Naming a column in CREATE VIEW is necessary only when a column is derived from an arithmetic expression, a function, or a constant, when two or more columns may otherwise have the same name (usually because of a join), or when a column in a view is given a name different from that of the column from which it is derived. Column names can also be assigned in the SELECT statement.
If column is not specified, the view columns acquire the same names as the columns in the SELECT statement.
.
.
.
n
Is a placeholder indicating that multiple columns can be specified.
Thanks,
Roy
Following is some paraphrasing of the page from BOL that contains the syntax for creating a view. Can anyone clarify the "n is a placeholder" statement for me? That seems to be the syntax I need to use.
CREATE VIEW (T-SQL)
.
.
.
Syntax
CREATE VIEW view_name [(column [,...n])]
[WITH ENCRYPTION]
AS
select_statement
[WITH CHECK OPTION]
Arguments
view_name
Is the name of the view. View names must follow the rules for identifiers. Specifying the view owner name is optional.
column
Is the name to be used for a column in a view. Naming a column in CREATE VIEW is necessary only when a column is derived from an arithmetic expression, a function, or a constant, when two or more columns may otherwise have the same name (usually because of a join), or when a column in a view is given a name different from that of the column from which it is derived. Column names can also be assigned in the SELECT statement.
If column is not specified, the view columns acquire the same names as the columns in the SELECT statement.
.
.
.
n
Is a placeholder indicating that multiple columns can be specified.
Thanks,
Roy