Forum Articles
  Welcome back Join CF
You are here You are here: Home | Forum | Problems with US Robotics USR8054 and NTL STB

You are currently viewing our boards as a guest which gives you limited access to view most of the discussions, articles and other free features. By joining our Virgin Media community you will have full access to all discussions, be able to view and post threads, communicate privately with other members (PM), respond to polls, upload your own images/photos, and access many other special features. Registration is fast, simple and absolutely free so please join our community today.


Welcome to Cable Forum
Go Back   Cable Forum > Computers & IT > General IT Discussion
Register FAQ Community Calendar

SQL Query help
Reply
 
Thread Tools
Old 06-04-2004, 13:31   #1
Bifta
Inactive
 
Join Date: Jul 2003
Location: Eglinton, Co. Derry
Posts: 7,640
Bifta has a nice shiny starBifta has a nice shiny star
Bifta has a nice shiny starBifta has a nice shiny starBifta has a nice shiny starBifta has a nice shiny starBifta has a nice shiny starBifta has a nice shiny starBifta has a nice shiny starBifta has a nice shiny starBifta has a nice shiny starBifta has a nice shiny starBifta has a nice shiny starBifta has a nice shiny starBifta has a nice shiny starBifta has a nice shiny starBifta has a nice shiny starBifta has a nice shiny starBifta has a nice shiny starBifta has a nice shiny starBifta has a nice shiny starBifta has a nice shiny star
SQL Query help

Need a spot of help, I have a SQL database I need to insert values in to.

Basically the table has 10 columns, all with data in, but there's a column I need to populate with a set bit of text, I tried

INSERT INTO homes
(agent)
values (whatever)

but obviously this just creates a new row with nothing populated in the other columns .. so er, how do I insert a value into 'agent' for all the current rows?

Thanks.
Bifta is offline   Reply With Quote
Advertisement
Old 06-04-2004, 13:41   #2
Tricky
Inactive
 
Tricky's Avatar
 
Join Date: Jun 2003
Location: I am house...
Services: $KY+HD - BT Infinity
Posts: 2,284
Tricky is the helpful oneTricky is the helpful oneTricky is the helpful oneTricky is the helpful oneTricky is the helpful oneTricky is the helpful oneTricky is the helpful oneTricky is the helpful oneTricky is the helpful oneTricky is the helpful oneTricky is the helpful oneTricky is the helpful oneTricky is the helpful oneTricky is the helpful oneTricky is the helpful oneTricky is the helpful oneTricky is the helpful one
Re: SQL Query help

update tablename set columnname = "value"
can add a where columnname = "value" if you want to restrict this to certain rows
Tricky is offline   Reply With Quote
Old 06-04-2004, 13:47   #3
Bifta
Inactive
 
Join Date: Jul 2003
Location: Eglinton, Co. Derry
Posts: 7,640
Bifta has a nice shiny starBifta has a nice shiny star
Bifta has a nice shiny starBifta has a nice shiny starBifta has a nice shiny starBifta has a nice shiny starBifta has a nice shiny starBifta has a nice shiny starBifta has a nice shiny starBifta has a nice shiny starBifta has a nice shiny starBifta has a nice shiny starBifta has a nice shiny starBifta has a nice shiny starBifta has a nice shiny starBifta has a nice shiny starBifta has a nice shiny starBifta has a nice shiny starBifta has a nice shiny starBifta has a nice shiny starBifta has a nice shiny starBifta has a nice shiny star
Re: SQL Query help

Quote:
Originally Posted by Tricky
update tablename set columnname = "value"
can add a where columnname = "value" if you want to restrict this to certain rows
Genius! Thank you.
Bifta is offline   Reply With Quote
Old 06-04-2004, 14:40   #4
John Smiths
cf.addict
 
John Smiths's Avatar
 
Join Date: Nov 2003
Location: Cambridge
Age: 40
Services: NTL Cable and Phone, Sky TV as NTL was (is) terrible!
Posts: 181
John Smiths is on a distinguished roadJohn Smiths is on a distinguished road
Send a message via MSN to John Smiths
Re: SQL Query help

Quote:
Originally Posted by Tricky
update tablename set columnname = "value"
can add a where columnname = "value" if you want to restrict this to certain rows
Wouldn't that change the name of the column to 'value'?? Or would it add value into every row with columname?
John Smiths is offline   Reply With Quote
Old 06-04-2004, 14:51   #5
Bifta
Inactive
 
Join Date: Jul 2003
Location: Eglinton, Co. Derry
Posts: 7,640
Bifta has a nice shiny starBifta has a nice shiny star
Bifta has a nice shiny starBifta has a nice shiny starBifta has a nice shiny starBifta has a nice shiny starBifta has a nice shiny starBifta has a nice shiny starBifta has a nice shiny starBifta has a nice shiny starBifta has a nice shiny starBifta has a nice shiny starBifta has a nice shiny starBifta has a nice shiny starBifta has a nice shiny starBifta has a nice shiny starBifta has a nice shiny starBifta has a nice shiny starBifta has a nice shiny starBifta has a nice shiny starBifta has a nice shiny starBifta has a nice shiny star
Re: SQL Query help

Quote:
Originally Posted by John Smiths
Wouldn't that change the name of the column to 'value'?? Or would it add value into every row with columname?
No, cos you stick the columnname in instead of value and it worked perfectly so it must be right.
Bifta is offline   Reply With Quote
Old 06-04-2004, 15:03   #6
Richard M
Inactive
 
Join Date: Jun 2003
Location: Los Angeles, CA
Age: 47
Posts: 6,343
Richard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze array
Richard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze array
Re: SQL Query help

It is right.
Richard M is offline   Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 01:36.


Server: lithium.zmnt.uk
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
All Posts and Content are © Cable Forum