Jump to content

How do i put time in a script


michshelly

Recommended Posts

Hi there,

 

I'm trying to put time into a script.  The time is results of olympic events.

 

Here is some examples of my script:

 

create table Results (

EventID  char (4) not null,

CompetitorNum numeric (3) not null,

ElapsedTime TIME not null,

Place numeric (4) not null,

CONSTRAINT results_competitornum_fk FOREIGN KEY (competitornum) references Competitors

(CompetitorNum),

constraint Results_EventComp_pk Primary Key (EventID, CompetitorNum)

);

 

 

insert into Results values

('S001',132,  TIME '4:50.05', 1);

insert into Results values

('S001', 166, TIME '54:88',2);

 

I can put the top line in values in the script and it runs okay but when I add more I get this message:

 

ERROR: invalid input syntax for type time: "4:50.05"

SQL state: 22007

 

 

Can someone please help me please?

 

thanks

Michshelly

 

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.