Advertisement

06.12.2008 at 09:52AM PDT, ID: 23480224
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

9.9

convertion of oracle sql script to sql server script

Asked by dex11 in SQL Server 2005, Oracle 10.x, SQL Server 2008

Tags: ,

Hello Experts,

I have created oracle database with the following sql script(attached) .What changes do you suggest to have the same exact database in ms sql server 2005 .I never used sql server before and i know we cannot have a sequence in sql server.please help.

Thank you.Start Free Trial
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
61:
62:
63:
64:
65:
66:
67:
68:
69:
70:
71:
72:
73:
74:
75:
76:
77:
78:
79:
80:
81:
82:
83:
84:
85:
86:
87:
88:
89:
90:
91:
92:
93:
94:
95:
96:
97:
98:
99:
100:
101:
102:
103:
104:
105:
106:
107:
108:
109:
110:
111:
112:
113:
114:
115:
116:
117:
118:
119:
120:
121:
122:
123:
124:
125:
126:
127:
128:
129:
130:
131:
132:
133:
134:
135:
136:
137:
138:
139:
140:
141:
142:
143:
144:
145:
146:
147:
148:
149:
150:
151:
152:
153:
154:
155:
156:
157:
158:
159:
160:
161:
162:
163:
164:
165:
166:
167:
168:
169:
170:
171:
172:
173:
174:
175:
176:
177:
178:
179:
180:
181:
182:
183:
184:
185:
186:
187:
188:
189:
190:
191:
192:
193:
194:
195:
196:
197:
198:
199:
200:
201:
202:
203:
204:
205:
206:
207:
208:
209:
210:
211:
212:
213:
214:
215:
216:
217:
218:
219:
220:
221:
222:
223:
224:
225:
226:
227:
228:
229:
230:
231:
232:
233:
234:
235:
236:
237:
238:
239:
240:
241:
242:
create table TECHNOLOGIES
(
	TECH_ID         integer primary key,
	TECH_DESCR      varchar(20) not null,
        STATUS          VARCHAR(1)  default 'A',
        LAST_UPDATED_BY VARCHAR(12) not null,
        LAST_UPDATED_DATE DATE not null
);
   
 
create table USER_DTLS(
	USER_ID		   integer primary key,
	USER_REPORT_TO_ID  integer ,
	LOGON_ID	   varchar(12) not null,
	PASSWORD  	   varchar(15) not null,
	USER_FIRST_NAME	   varchar(30) not null,
        USER_MIDDLE_NAME   varchar(30),
	USER_LAST_NAME     varchar(30) not null,
        PHONE_NO           varchar(18) not null,
        ALT_PHONE_NO       varchar(18),
        EMAIL_ID           varchar(35) not null,
        USER_LEVEL 	   NUMBER(2) not null,
	STATUS          VARCHAR(1)  default 'A',
        LAST_UPDATED_BY integer ,
        LAST_UPDATED_DATE DATE not null        
);
 
 
create table IMGRTN_STATUS
(
        IMGRTN_STATUS_ID        integer primary key,
	IMGRTN_STATUS_DESCR     varchar(20) not null,
        STATUS          VARCHAR(1)  default 'A',
        LAST_UPDATED_BY VARCHAR(12) not null,
        LAST_UPDATED_DATE DATE not null
);
 
 
create table RESRC_STATUS
(
	RESRC_STATUS_ID        integer primary key,
	RESRC_STATUS_DESCR     varchar(20) not null,
        STATUS          VARCHAR(1)  default 'A',
        LAST_UPDATED_BY VARCHAR(12) not null,
        LAST_UPDATED_DATE DATE not null
);
 
create table RESRC_COMP_DTLS(
	RESRC_COMP_ID       integer primary key,
	RESRC_COMP_NAME     varchar(30) not null,
	RESRC_COMP_TAXID    varchar(20),
	RESRC_COMP_ADDR1    varchar(40),
	RESRC_COMP_ADDR2    varchar(40),
	RESRC_COMP_PHONE1   varchar(18),
	RESRC_COMP_PHONE2   varchar(18),
	RESRC_COMP_FAX      varchar(12),       
        STATUS              varchar(1)  default 'A',
 	LAST_UPDATED_BY     varchar(12) not null,
        LAST_UPDATED_DATE   date not null
);
 
 
create table RESRC_COMP_CONTACTS
(
	RESRC_COMP_CONTACT_ID      integer unique,
	RESRC_COMP_ID              integer references RESRC_COMP_DTLS(RESRC_COMP_ID),
	RESRC_COMP_CONTACT_NAME    varchar(20) not null,
	RESRC_COMP_CONTACT_ADDR1   varchar(40),
	RESRC_COMP_CONTACT_ADDR2   varchar(40),
	RESRC_COMP_CONTACT_PHONE1  varchar(18) not null,
	RESRC_COMP_CONTACT_PHONE2  varchar(18),
	RESRC_COMP_CONTACT_FAX1    varchar(12),
        STATUS                     varchar(1)  default 'A',
 	LAST_UPDATED_BY VARCHAR(12) not null,
        LAST_UPDATED_DATE DATE not null,
        primary key(RESRC_COMP_CONTACT_ID,RESRC_COMP_ID)
);
 
create table  VENDOR_DTLS
(
	VENDOR_ID         integer primary key,
	VENDOR_NAME       varchar(20) not null,
	VENDOR_ADDR1      varchar(40),
	VENDOR_ADDR2      varchar(40),
	VENDOR_PHONE1     varchar(18),
	VENDOR_PHONE2     varchar(18),
	VENDOR_FAX        varchar(12),
        STATUS            varchar(1)  default 'A',
 	LAST_UPDATED_BY   VARCHAR(12) not null,
        LAST_UPDATED_DATE DATE not null
);
 
 
 
create table    VENDOR_CONTACTS
(
	VENDOR_CONTACT_ID    integer unique,
	VENDOR_ID            integer references VENDOR_DTLS(VENDOR_ID),
	VENDOR_CONTACT_NAME        varchar(20) not null,
	VENDOR_CONTACT_ADDR1      varchar(40),
	VENDOR_CONTACT_ADDR2      varchar(40),
	VENDOR_CONTACT_PHONE1     varchar(18) not null,
	VENDOR_CONTACT_PHONE2     varchar(18),
	VENDOR_CONTACT_FAX        varchar(12),
        STATUS                    varchar(1)  default 'A',
 	LAST_UPDATED_BY           VARCHAR(12) not null,
        LAST_UPDATED_DATE         DATE not null,
	primary key(VENDOR_CONTACT_ID,VENDOR_ID)
);
 
create table CLIENT_DTLS(
	CLIENT_ID		integer primary key,
	CLIENT_NAME		varchar(20) not null,
        STATUS                    varchar(1)  default 'A',
 	LAST_UPDATED_BY VARCHAR(12) not null,
        LAST_UPDATED_DATE DATE not null
);
 
create table CLIENT_LOC_DTLS(
	CLIENT_LOC_ID		integer unique,
	CLIENT_ID		integer references CLIENT_DTLS(CLIENT_ID),
        CLIENT_LOC_NAME     	varchar(20) not null,
	CLIENT_CONTACT_NAME     varchar(20),
	CLIENT_ADDR1		varchar(40),
	CLIENT_ADDR2		varchar(40),
        CLIENT_PHONE            varchar(18),
	CLIENT_FAX              varchar(12),
 	STATUS                    varchar(1)  default 'A',
 	LAST_UPDATED_BY VARCHAR(12) not null,
        LAST_UPDATED_DATE DATE not null,
        primary key(CLIENT_LOC_ID,CLIENT_ID)
);
 
 
create table RESRC_DTLS(
	RESRC_ID     integer  primary key,
	FIRST_NAME   varchar(30) not null,
	MIDDLE_NAME  varchar(30),
        LAST_NAME    varchar(30) not null,
	EMAIL_ID     varchar(35) not null,
        PHONE_NO     varchar(18) not null,
        ALT_PHONE_NO varchar(18), 
	FAX_NO       varchar(12),
	ADDR_LINE1   varchar(40),
	ADDR_LINE2   varchar(40),
 	CITY         varchar(20),
        STATE        varchar(20),
        COUNTRY      varchar(15),
        ZIP_CODE     varchar(6),
        RESRC_COMP_ID integer references  RESRC_COMP_DTLS(RESRC_COMP_ID) not null,
	RESRC_COMP_CONTACT_ID integer references RESRC_COMP_CONTACTS(RESRC_COMP_CONTACT_ID),
	TECH_ID       integer references TECHNOLOGIES(TECH_ID) not null,
	IMGRTN_STATUS_ID         integer references IMGRTN_STATUS(IMGRTN_STATUS_ID) not null,
	RESRC_STATUS_ID      integer references RESRC_STATUS(RESRC_STATUS_ID) not null,
	PRIMARY_SKILL_DESCR   varchar(100),
        RESRC_START_DATE date,
        RESRC_END_DATE date,
        EMERGENCY_CONTACT varchar(50),
	LAST_UPDATED_BY VARCHAR(12) not null,
        LAST_UPDATED_DATE DATE not null
);
 
 
create table  REQ_DTLS
(
	REQ_ID integer primary key,
        VENDOR_ID      integer references VENDOR_DTLS(VENDOR_ID),
        VENDOR_CONTACT_ID  integer references VENDOR_CONTACTS(VENDOR_CONTACT_ID),
	CLIENT_ID      integer references CLIENT_DTLS(CLIENT_ID),
	CLIENT_LOC_ID  integer references CLIENT_LOC_DTLS(CLIENT_LOC_ID),
	TECH_ID        integer references TECHNOLOGIES(TECH_ID),
	PRIMARY_SKILLS varchar(200),
	REQ_DESCR      varchar(1000),
	BILL_RATE      integer,
	NO_OF_POSITIONS integer not null,
	REQ_SUBMITTED_BY integer references USER_DTLS(USER_ID) not null, 
        REQ_OWNER integer  references USER_DTLS(USER_ID) not null,
	CREATE_DATE   Date not null,
        LAST_UPDATED_BY VARCHAR(12),
        LAST_UPDATED_DATE DATE not null
);
 
 
create table REQ_RESRC_DTLS(
	REQ_RESRC_DTLS_ID	integer unique,
	REQ_ID			integer references REQ_DTLS(REQ_ID),
        REQ_ASSIGN_TO		integer  references USER_DTLS(USER_ID) not null,
	RESRC_ID  	        integer references RESRC_DTLS(RESRC_ID),
	LAST_UPDATED_BY VARCHAR(12),
        LAST_UPDATED_DATE DATE not null,
        PRIMARY KEY(REQ_RESRC_DTLS_ID,REQ_ID)
);
 
 
create table REQ_NOTES(
        REQ_NOTE_ID             integer,
	REQ_RESRC_DTLS_ID	integer references REQ_RESRC_DTLS(REQ_RESRC_DTLS_ID),
	REQ_ID			integer references REQ_DTLS(REQ_ID),
	NOTE			varchar(200) not null,
	UPDATED_BY		VARCHAR(12) not null,
	UPDATED_DATE		Date not null,
        primary key( REQ_NOTE_ID,REQ_RESRC_DTLS_ID,REQ_ID)
);
 
create table RESUMES(
	RESRC_ID          integer references RESRC_DTLS(RESRC_ID),
	RESUME_ID         integer,
	TECH_ID	          integer references TECHNOLOGIES(TECH_ID),
        RESUME_FILE_NAME  varchar(50) not null,
        MIME_TYPE         varchar(20) not null,
        RESUME            blob not null,
        primary key(RESRC_ID,RESUME_ID,TECH_ID)	 
);
 
 
create sequence RESUME_ID_SEQ;
create sequence REQ_NOTE_ID_SEQ;
create sequence REQ_RESRC_DTLS_ID_SEQ;
create sequence REQ_ID_SEQ;
create sequence RESRC_ID_SEQ;
create sequence CLIENT_LOC_ID_SEQ;
create sequence CLIENT_ID_SEQ;
create sequence VENDOR_CONTACT_ID_SEQ;
create sequence VENDOR_ID_SEQ;
create sequence RESRC_COMP_CONTACT_ID_SEQ;
create sequence RESRC_COMP_ID_SEQ;
create sequence USER_ID_SEQ;
 
create table REQ_RESRC_STATUS
(
       REQ_STATUS_ID        integer primary key,
       REQ_STATUS_DESCR     varchar(20) not null,
       STATUS          VARCHAR(1)  default 'A',
       LAST_UPDATED_BY VARCHAR(12) not null,
       LAST_UPDATED_DATE DATE not null
);
 
 
ALTER TABLE REQ_RESRC_DTLS ADD REQ_STATUS_ID  INTEGER REFERENCES
 REQ_RESRC_STATUS(REQ_STATUS_ID);
 
alter table REQ_DTLS add POSITION varchar(25) not null;
[+][-]06.12.2008 at 09:55AM PDT, ID: 21771423

View this solution now by starting your 14-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: SQL Server 2005, Oracle 10.x, SQL Server 2008
Tags: microsoft, sql server 2005
Sign Up Now!
Solution Provided By: angelIII
Participating Experts: 1
Solution Grade: A
 
 
 
Loading Advertisement...
20081112-EE-VQP-43 / EE_QW_2_20070628