Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 70-433

Author  Topic 

chinnanu143
Starting Member

13 Posts

Posted - 2010-12-19 : 05:33:16
hi this is practice question in 70-433
pgm i wrote is

use TestDB;
go
use TestDB;
go
create schema Test;
go
create table Customers3( CustomerID int IDENTITY(1000,1)NOT NULL,Name nvarchar(70) NULL
,CreatedDateTime datetime2 NULL
,CreditLimit DECIMAL(12,5) NULL);

CREATE TYPE NAME from NVARCHAR(70);
CREATE TYPE CURRENCYVALUE from DECIMAL(14,5);

alter table Customers3
alter column Name Test.NAME not NULL;

sp_help Test.NAME

but when i try to later table it's giving error

Msg 2715, Level 16, State 6, Line 1
Column, parameter, or variable #4: Cannot find data type Test.NAME.


page 98 in mcts self paced book exam (70-433)

thank you

Thanks
Prats
XX

harshal_in
Aged Yak Warrior

633 Posts

Posted - 2010-12-19 : 07:28:16
The type is not created in the schema test, hence the error. Create the type in Test schema:

CREATE TYPE Test.NAME from NVARCHAR(70);
Go to Top of Page

chinnanu143
Starting Member

13 Posts

Posted - 2010-12-19 : 09:07:57
actually i created schema Test first and then i created type NAME under , schema Test...
does it won't consider in that way..

i mean the way i created is that wrong...well if it's giving error that might be wrong...but it's example in book ..that's why little bit confused..

thanks

Thanks
Prats
XX
Go to Top of Page

chinnanu143
Starting Member

13 Posts

Posted - 2010-12-19 : 13:50:25
yeah got the problem..actually i didn't created table under schema..

what ever u said is correct thank you

Thanks
Prats
XX
Go to Top of Page
   

- Advertisement -