| Author |
Topic |
|
Chopsmum
Starting Member
38 Posts |
Posted - 2006-04-11 : 04:43:34
|
| Dear friends,I have alot of tables to create in sql server 2005. They are all ready to copy and paste. Is there a window where I can just script all in at once?Thankyou very muchChopsmum |
|
|
jen
Master Smack Fu Yak Hacker
4110 Posts |
Posted - 2006-04-11 : 04:45:42
|
| you can open a new query window to run the script--------------------keeping it simple... |
 |
|
|
Chopsmum
Starting Member
38 Posts |
Posted - 2006-04-11 : 04:49:04
|
| Thanks JenThis is the first tableCREATE TABLE tblSubjects( SubjectsID,INT NOT NULL, SubjectTitle,VARCHAR(100), SubjectCode,INT, SubjectDescription,VARCHAR(1000), SubjectsTypeIndexID,INT NOT NULL, ClassesID,INT NOT NULL, SubjectsTaughtID,INT NOT NULL, GradeLevelsID,INT NOT NULL, )This is the error messageThe definition for column 'SubjectsID' must include a data type.Its got integer dtWhats wrong?Chopsmum |
 |
|
|
chiragkhabaria
Master Smack Fu Yak Hacker
1907 Posts |
Posted - 2006-04-11 : 04:58:43
|
| After column name "," is not required.. CREATE TABLE tblSubjects(SubjectsID INT NOT NULL,SubjectTitle VARCHAR(100),SubjectCode INT,SubjectDescription VARCHAR(1000),SubjectsTypeIndexID INT NOT NULL,ClassesID INT NOT NULL,SubjectsTaughtID INT NOT NULL,GradeLevelsID INT NOT NULL,)If Debugging is the process of removing Bugs then i Guess programming should be process of Adding them. |
 |
|
|
Chopsmum
Starting Member
38 Posts |
Posted - 2006-04-11 : 05:03:04
|
| thankyou soooo muchkeep you postedChopsmum |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2006-04-11 : 05:13:59
|
| Also read Create table in sql server help file for more informationsMadhivananFailing to plan is Planning to fail |
 |
|
|
Chopsmum
Starting Member
38 Posts |
Posted - 2006-04-11 : 05:22:56
|
| Thankyou to everyone. I have just started the most exciting geekstage of my life to date......ha ha ha96 tables to look at now....Cm |
 |
|
|
jen
Master Smack Fu Yak Hacker
4110 Posts |
Posted - 2006-04-11 : 05:28:57
|
| have fun then...but you can actually script them out you know... right click the database, all tasks, generate sql script, then choose the objects and preview or save in a file--------------------keeping it simple... |
 |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2006-04-11 : 05:36:30
|
quote: Originally posted by Chopsmum Thankyou to everyone. I have just started the most exciting geekstage of my life to date......ha ha ha96 tables to look at now....Cm
quote: "I have alot of tables to create in sql server 2005. They are all ready to copy and paste"
Just curious, where did these scritps from 97 tables come from ? Is it generated from somewhere or some tool ? KH |
 |
|
|
Srinika
Master Smack Fu Yak Hacker
1378 Posts |
Posted - 2006-04-11 : 06:20:02
|
quote: Originally posted by khtan
quote: Originally posted by Chopsmum ......ha ha ha96 tables to look at now....
Just curious, where did these scritps from 97 tables ....
Just Curious 96 or 97 Tables ? Srinika |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2006-04-11 : 06:51:52
|
May be dtproperties is included MadhivananFailing to plan is Planning to fail |
 |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2006-04-11 : 07:17:00
|
quote: This is the first tableCREATE TABLE tblSubjects(
quote: 96 tables to look at now....
 KH |
 |
|
|
Chopsmum
Starting Member
38 Posts |
Posted - 2006-04-11 : 09:42:01
|
| Dear Friends,because there are so many tables to work with, I determined the relationships using Visio and also wrote the erd tables (with PK and FK1 etc) in excel. It took me ages - days infact to get the foreign keys in the right places. Well so far anyway. I then used string concatenation in excel to make my scripts as fast as possible. I know its cheating but lots more fun when you have to correct commas. I wasnt going to type all that stuff again, even in scripts, no way.Im on my first diagram window pulling the relationships together. Thankyou all for your help.One thing Ive noticed....it would be good if the tables lined up alphabetically and squeezed into pages say S-T together. When I auto-arrange they string out for 22 horizontal pages. OMG!!! |
 |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2006-04-11 : 19:51:59
|
maybe you should consider using a database design tool KH |
 |
|
|
|