Sunday, March 25, 2012
CREATE TABLE [database . [schema1 ] . | schema1. ] tableName
I try to create 2 schema as the syntax display's as below, but I get a error
as below. Do I have to change any parameters in SQL 2005?
And will I get any other problems in the future to use 2 schema?
Syntax
CREATE TABLE
[ database_name . [ schema_name ] . | schema_name . ] table_name
Create Schema.TableName (No Problem)
Create Schema1.schema2.TableName (Problem SQL see schema1 as the database)
Create Databasename,Schema1.schema2.TableName (Error below)
Msg 117, Level 15, State 1, Line 13
The object name 'DatabasName.Schema1. Schema2.TableName' contains more than
the maximum number of prefixes. The maximum is 2.
Msg 319, Level 15, State 1, Line 84
Incorrect syntax near the keyword 'with'. If this statement is a common
table expression or an xmlnamespaces clause, the previous statement must be
terminated with a semicolon.A table can belong to only a single schema. The pipe in the syntax is a
choice, not a concatonation. Things like below are valid ways to specify
a table name
CREATE TABLE database..name
schema is the default schema for the user
CREATE TABLE database.schema.name
database is the database in use
CREATE TABLE schema.name
CREATE TABLE name
database is the database in use and schema is the default schema for the use
r
Dan
> Hi,
> I try to create 2 schema as the syntax display's as below, but I get a
> error
> as below. Do I have to change any parameters in SQL 2005?
> And will I get any other problems in the future to use 2 schema?
> Syntax
> CREATE TABLE
> [ database_name . [ schema_name ] . | schema_name . ] table_name
> Create Schema.TableName (No Problem)
> Create Schema1.schema2.TableName (Problem SQL see schema1 as the
> database)
> Create Databasename,Schema1.schema2.TableName (Error below)
> Msg 117, Level 15, State 1, Line 13
> The object name 'DatabasName.Schema1. Schema2.TableName' contains more
> than
> the maximum number of prefixes. The maximum is 2.
> Msg 319, Level 15, State 1, Line 84
> Incorrect syntax near the keyword 'with'. If this statement is a
> common
> table expression or an xmlnamespaces clause, the previous statement
> must be
> terminated with a semicolon.|||Hi Dan,
I like to use 2 schema names as in the syntax.
Thank you,
Rune
"Dan Sullivan" wrote:
> A table can belong to only a single schema. The pipe in the syntax is a
> choice, not a concatonation. Things like below are valid ways to specify
> a table name
>
> CREATE TABLE database..name
> schema is the default schema for the user
>
> CREATE TABLE database.schema.name
>
> database is the database in use
> CREATE TABLE schema.name
>
> CREATE TABLE name
> database is the database in use and schema is the default schema for the u
ser
>
> Dan
>
>
>|||The syntax does not support two schema names. Look up "Documentation convent
ions"
in the BOL to see how this syntax is defined. If you want to use a "." in
a schema name then the name must be enclosed in [] or ""
CREATE SCHEMA [s1.s2]
CREATE TABLE [s1.s2].table_name
Dan
> Hi Dan,
> I like to use 2 schema names as in the syntax.
> Thank you,
> Rune
> "Dan Sullivan" wrote:
>|||> I like to use 2 schema names as in the syntax.
Yeesh. That is NOT what the syntax describes! | is or, not and! Meaning,
database.schema.table or schema.table. You cannot nest schemas. A schema
cannot own a schema. Period.
Monday, March 19, 2012
Create reports in ASP format?
We use an internal tool that can display ASP pages. I would like to use SQL Reporting Services to create reports in ASP format. The ASP page will access the database to get data. Is this possible possible with Reporting Services?
Ric
Hmmm... from what I understand, an ASP page is very similar to an ASPX page (created by Visual Studio). Possibly you could embed a report viewer in your ASP page. However, I'm not really sure that this is possible.
I'm not so sure that you want to create reports in ASP format -- that isn't possible. I think you are saying you want to display reports within an ASP page.
|||Active Server Pages and C# are completely different. Similar only because they are both programming languages. ASP was never meant to work with SQL Reporting Services. ASP works through ODBC and other interfaces and can connect to SQL databases and display the data onto web pages that have been setup using HTML tables using such things as the for loop etc..., but was never meant to work in this enviorment.Wednesday, March 7, 2012
Create local cube from remote AS server
Hello
I try the following:
I
1) connect to a remote server and browse its AS databases and cubes
2) display one cube in a OWC 10/11 pivottable (by setting .connectionstring and .datamember
3) try to create a local cube from this server database/cube using "CREATE GLOBAL CUBE...") giving a unc path as target
Steps 1 and 2 are successful (I use a named user in the format domain\username).
Step 3 gives an error: either a connection cannot be made to server ... or AS is not running on this computer
When I try this with my local AS, 1 to 3 works fine (assumed I use localhost and integrated security)
Questions:
1) Is there any rule for user accounts to be able to create local cubes?
2) I get an error (no. -1056899072) in the sql profiler when I try step 3, but do not know how to go any further. Is there any description for this error?
Regards
Klaus Wiesel
Try to make sure the path you specify in your command is valid path for remote Analysis Server.
Edward.
--
This posting is provided "AS IS" with no warranties, and confers no rights.