Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Field Update

Status
Not open for further replies.

trawets

Technical User
Feb 26, 2004
5
GB
Please could someone offer advise on how to update a fields within an sql database

The fields contains date and time
in this format "2005-10-17 08:00:00"
I require to update 381 consecutive entries with individual entry data out of around 700 or so
Could someone offer the correct syntax I should use so I can either run a query or upload through .csv?
Thanking you in advance
 
I require to update 381 consecutive entries with individual entry data out of around 700 or so
you'll have to be more specific than that -- after all, we don't know a thing about your table or any of its columns other than the fact that it has at least one datetime column

r937.com | rudy.ca
Buy my new book Simply SQL from Amazon
 
Hi sorry for not giving enough info, hope this helps
This is my table
`lid` int(11) NOT NULL,
`matchid` int(11) NOT NULL auto_increment,
`matchdate` datetime NOT NULL,
`hometeam` varchar(30) NOT NULL,
`awayteam` varchar(30) NOT NULL,
`homescore` smallint(5) unsigned default NULL,
`awayscore` smallint(5) unsigned default NULL,
`homepen` smallint(5) unsigned default '0',
`awaypen` smallint(5) unsigned default '0',
`bonuspoints` int(11) default '0',
`gametype` char(1) default 'L',
`competition` int(11) default NULL,
`week` smallint(6) default '0',
`venue` varchar(64) default NULL,
PRIMARY KEY (`matchid`,`lid`)


the only feild I wish to change is `matchdate` all other I wish to remain the same. as previously sais I need to alter the first 381 entries
 
Is there something that is common to the first 381 entries though?
How do you know it's the first 381? What is common to them and not the others?



Trojan.
 
Both lid field and matchid
lid tells me which league they all belong to (in this case is No 1 this is common)and the matchid is the game number which gives me the number 381(which also corresponds to the enry number in the db), I need to change the time section of the matchdate field by -7 hours because of my server location.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top