Nick Baker wrote:
> Can someone tell me what is wrong with the following code? I am just 
> starting to use SQL,

plenty of things. by all means do as mike suggests and install a copy of 
the BoL. its the best sql server resource there is.

in any case, maybe something like this:

CREATE TABLE Scheduler (
        schedID int NOT NULL default 0,
        RPCall varchar(6) NULL,
        TimeMark datetime NOT NULL default '1900-01-01 00:00:00.000',
)

CREATE INDEX schedulerIDX
    ON Scheduler (schedID)


i think "id" is a reserved word in sql server. default datetime "NULL" 
is  jan-1-1900 (your original value would probably get cast to this 
anyway). sql server has several kinds of integer datatypes:

tinyint 1 byte, 0-255
smallint 2 bytes, -32,768 to 32,767
int 4 bytes, -2,147,483,648 to 2,147,483,647
bigint 8 bytes, -9223372036854775808 to 9223372036854775807

sql server naming syntax goes databasename.dataowner.tablename (or 
object name).


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Logware (www.logware.us): a new and convenient web-based time tracking 
application. Start tracking and documenting hours spent on a project or with a 
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:192164
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to