Resend my activation email : Register : Log in 
BCF: Bike Chat Forums


SQL Query

Reply to topic
Bike Chat Forums Index -> The Geek Zone
View previous topic : View next topic  
Author Message

NSR Mick
World Chat Champion



Joined: 26 Jun 2005
Karma :

PostPosted: 22:37 - 29 Mar 2006    Post subject: SQL Query Reply with quote

I have a table populated with data and one column is year. What I need to do is change all the data in this column to the same value.

Can anyone help with an sql command?
____________________
If you dont like the way that I ride.......Stop trying to keep up!!!
 Back to top
View user's profile Send private message Visit poster's website You must be logged in to rate posts

Kickstart
The Oracle



Joined: 04 Feb 2002
Karma :

PostPosted: 22:39 - 29 Mar 2006    Post subject: Reply with quote

Hi

Think that is going to vary with the flavour of SQL you are using. Generally easy to do though.

All the best

Keith
____________________
Traxpics, track day and racing photographs - Bimota Forum - Bike performance / thrust graphs for choosing gearing
 Back to top
View user's profile Send private message Send e-mail You must be logged in to rate posts

NSR Mick
World Chat Champion



Joined: 26 Jun 2005
Karma :

PostPosted: 22:41 - 29 Mar 2006    Post subject: Reply with quote

It's Sybase SQL Anywhere 8 Thumbs Up
____________________
If you dont like the way that I ride.......Stop trying to keep up!!!
 Back to top
View user's profile Send private message Visit poster's website You must be logged in to rate posts

Suzuki
Roger



Joined: 03 May 2005
Karma :

PostPosted: 22:45 - 29 Mar 2006    Post subject: Reply with quote

Code:
UPDATE table_name SET column_name = 'VALUE';


Thumbs Up
____________________
<Simple> no I'm shaven Jon Razz
<Simple> it is a big enough hole.. I'll leave it now
Ride: 1999 Suzuki GSXR600 (yellow/black) IRC: Stats - Relationship Map
 Back to top
View user's profile Send private message Send e-mail Visit poster's website You must be logged in to rate posts

NSR Mick
World Chat Champion



Joined: 26 Jun 2005
Karma :

PostPosted: 22:51 - 29 Mar 2006    Post subject: Reply with quote

Suzuki my friend you are my hero, spot on. Thumbs Up

Thanks for the quick response too. Karma
____________________
If you dont like the way that I ride.......Stop trying to keep up!!!
 Back to top
View user's profile Send private message Visit poster's website You must be logged in to rate posts

Suzuki
Roger



Joined: 03 May 2005
Karma :

PostPosted: 22:56 - 29 Mar 2006    Post subject: Reply with quote

I do it for a living Wink

Glad you're sorted.
____________________
<Simple> no I'm shaven Jon Razz
<Simple> it is a big enough hole.. I'll leave it now
Ride: 1999 Suzuki GSXR600 (yellow/black) IRC: Stats - Relationship Map
 Back to top
View user's profile Send private message Send e-mail Visit poster's website You must be logged in to rate posts

NSR Mick
World Chat Champion



Joined: 26 Jun 2005
Karma :

PostPosted: 23:09 - 29 Mar 2006    Post subject: Reply with quote

Very Happy

Proper weight off my shoulders that one. It is actually bike related, its for a sprint results program that happens to have the date hard coded into the app, so I'm just going to let the app insert the date as 2005 in each entry and then just change them all to 2006 at the end of the day. Wink
____________________
If you dont like the way that I ride.......Stop trying to keep up!!!
 Back to top
View user's profile Send private message Visit poster's website You must be logged in to rate posts

Kickstart
The Oracle



Joined: 04 Feb 2002
Karma :

PostPosted: 23:45 - 29 Mar 2006    Post subject: Reply with quote

Hi

Not sure on Sybase. With Oracle you can just add days to a date, so you could do:-

update table_name set date_field = date_field + 365

Default is that it adds days.

All the bst

Keith
____________________
Traxpics, track day and racing photographs - Bimota Forum - Bike performance / thrust graphs for choosing gearing
 Back to top
View user's profile Send private message Send e-mail You must be logged in to rate posts

NSR Mick
World Chat Champion



Joined: 26 Jun 2005
Karma :

PostPosted: 21:35 - 30 Mar 2006    Post subject: Reply with quote

Thanks for that Kieth, I do infact have the delphi source code for the app so could change the sql within the app. The only problem being is that i dont have some of the modules required to recompile it. Crying or Very sad
____________________
If you dont like the way that I ride.......Stop trying to keep up!!!
 Back to top
View user's profile Send private message Visit poster's website You must be logged in to rate posts

Kickstart
The Oracle



Joined: 04 Feb 2002
Karma :

PostPosted: 22:07 - 30 Mar 2006    Post subject: Reply with quote

Hi

How complex is the system? What is it all written in? Is it a commercial application?

All the best

Keith
____________________
Traxpics, track day and racing photographs - Bimota Forum - Bike performance / thrust graphs for choosing gearing
 Back to top
View user's profile Send private message Send e-mail You must be logged in to rate posts

NSR Mick
World Chat Champion



Joined: 26 Jun 2005
Karma :

PostPosted: 22:21 - 30 Mar 2006    Post subject: Reply with quote

No its not commercial app, it was written by a mate of mine i dont see anymore using Delphi 6. I'm pretty sure he used some 3rd party add on modules as he was a Delphi programmer by trade.
____________________
If you dont like the way that I ride.......Stop trying to keep up!!!
 Back to top
View user's profile Send private message Visit poster's website You must be logged in to rate posts

Kickstart
The Oracle



Joined: 04 Feb 2002
Karma :

PostPosted: 22:31 - 30 Mar 2006    Post subject: Reply with quote

Hi

What does it do? Possible to rewrite it easily?

All the best

Keith
____________________
Traxpics, track day and racing photographs - Bimota Forum - Bike performance / thrust graphs for choosing gearing
 Back to top
View user's profile Send private message Send e-mail You must be logged in to rate posts

NSR Mick
World Chat Champion



Joined: 26 Jun 2005
Karma :

PostPosted: 22:37 - 30 Mar 2006    Post subject: Reply with quote

It puts sprint time results into a database and then will create a print out of results, not rocket science but could it be rewritten easily? Not by me thats for sure.
____________________
If you dont like the way that I ride.......Stop trying to keep up!!!
 Back to top
View user's profile Send private message Visit poster's website You must be logged in to rate posts

Kickstart
The Oracle



Joined: 04 Feb 2002
Karma :

PostPosted: 22:39 - 30 Mar 2006    Post subject: Reply with quote

Hi

Sounds like it could be done fairly easily. Does it need to be done on a laptop at a drag strip, or is it for publishing the results online?

All the best

Keith
____________________
Traxpics, track day and racing photographs - Bimota Forum - Bike performance / thrust graphs for choosing gearing
 Back to top
View user's profile Send private message Send e-mail You must be logged in to rate posts

NSR Mick
World Chat Champion



Joined: 26 Jun 2005
Karma :

PostPosted: 22:49 - 30 Mar 2006    Post subject: Reply with quote

times are inputed pretty much live, the commentator has a laptop allowing him to view riders previous runs that day, and theres a machine in the paddock so that riders can check how there doing in their class etc, both of these machines view the data via http pages that are generated by the delphi app. the only time the year will be an issue is after all runs are complete and the results printed for the trophy presentation at the end of the day. at no other time is the date in the table seen or used.
____________________
If you dont like the way that I ride.......Stop trying to keep up!!!
 Back to top
View user's profile Send private message Visit poster's website You must be logged in to rate posts

Kickstart
The Oracle



Joined: 04 Feb 2002
Karma :

PostPosted: 22:56 - 30 Mar 2006    Post subject: Reply with quote

Hi

Any more details on the http generation? Is it just a static html document generated every so often, or some kind of dynamic page (eg, php / asp script running on a web server).

All the best

Keith
____________________
Traxpics, track day and racing photographs - Bimota Forum - Bike performance / thrust graphs for choosing gearing
 Back to top
View user's profile Send private message Send e-mail You must be logged in to rate posts

NSR Mick
World Chat Champion



Joined: 26 Jun 2005
Karma :

PostPosted: 22:57 - 30 Mar 2006    Post subject: Reply with quote

Its Dynamic, the pages are generated by the delphi app, give me 10 minutes and I'll pm you an address so you can see how it works.
____________________
If you dont like the way that I ride.......Stop trying to keep up!!!
 Back to top
View user's profile Send private message Visit poster's website You must be logged in to rate posts
Old Thread Alert!

The last post was made 20 years, 166 days ago. Instead of replying here, would creating a new thread be more useful?
  Display posts from previous:   
This page may contain affiliate links, which means we may earn a small commission if a visitor clicks through and makes a purchase. By clicking on an affiliate link, you accept that third-party cookies will be set.

Post new topic   Reply to topic    Bike Chat Forums Index -> The Geek Zone All times are GMT + 1 Hour
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum

Read the Terms of Use! - Powered by phpBB © phpBB Group
 

Debug Mode: ON - Server: birks (www) - Page Generation Time: 0.08 Sec - Server Load: 0.37 - MySQL Queries: 13 - Page Size: 97.1 Kb