473,394 Members | 1,734 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

changing one column in each row

ie if i have

x 1 2 3 4 5
------------
1| a b c d e
2| f g h i j
3| k l m n o
4| p q r s t
5| u v w x y
and i want to change it to

x 1 2 3 4 5
------------
1| a b c d e
2| a b c d e
3| a b c d e
4| a b c d e
5| a b c d e

any ideas on how to do that?
Jul 20 '05 #1
2 1224
Hi, Zellos!

ZM> any ideas on how to do that?

have one:
update t
set t.fld1=t2.fld1,
t.fld2=t2.fld2,
t.fld3=t2.fld3,
t.fld4=t2.fld4,
t.fld5=t2.fld5
from table1 t, (select top 1 * from table1) t2

-
éxexe!
Jul 20 '05 #2

"Zellos Mokozu" <me@zellos.net> wrote in message
news:a2**************************@posting.google.c om...
ie if i have

x 1 2 3 4 5
------------
1| a b c d e
2| f g h i j
3| k l m n o
4| p q r s t
5| u v w x y
and i want to change it to
I'm confused. Why not simply, Update foo set 1='a', 2='b', 3='c', 4='d',
5='e'

It looks like all your rows are the same.


x 1 2 3 4 5
------------
1| a b c d e
2| a b c d e
3| a b c d e
4| a b c d e
5| a b c d e

any ideas on how to do that?

Jul 20 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

16
by: StenKoll | last post by:
Help needed in order to create a register of stocks in a company. In accordance with local laws I need to give each individual share a number. I have accomplished this by establishing three tables...
3
by: MS | last post by:
What's the best way to "store" and display a value in a text box that changes from day to day. An example of this would be where the name of the user is manually typed in after using the datbase,...
5
by: VB Programmer | last post by:
I have a simple datagrid on a webform. (I'm using VB.NET.) In the page load I get some data, set the .DataSource property of the dg, then do a .DataBind. The columns are automatically created. ...
1
by: martin | last post by:
Hi, I have a datagrid that contains 3 colums. This is rendered to the page fine, except that I would like to be able to control the width of each table cell of the datagrid I have the following...
1
by: Simon Harris | last post by:
Hi All, Ok, I have 6 datagrids, populated from 1 dataset. Each datagrid has 3 columns. There are 18 columns in the dataset. I have written a sub to change the background colour of the row in...
4
by: Mac via DotNetMonster.com | last post by:
I am attempting to change the header text on all the columns in my datagrid once it was been populated from a dataset. I have tried to implement some code from the following MSDN document but what...
5
by: Sai | last post by:
Hi, We have around 150 databases as case sensitive, and we are planning to change it to case insensitive. Each database has around 180 tables, I have changed the collation on DB, but changing...
1
by: Charls | last post by:
Hi, I need to be able to change individual column's colour in a series in bar charts, i.e. IF Column Value > Target THEN Column Colour = Green ELSEIF Column Value = Target THEN ...
7
oll3i
by: oll3i | last post by:
i want to change the values in two columns one colum is a combobox and the secons column is editable too i want to get the value of that second column and the value of combobox and sent that...
7
blazedaces
by: blazedaces | last post by:
Hi guys, what I'm I have is a jtable with boolean variables in the first column and text in the next two (checkboxes). I want my tableChanged method to make it so when I check one of the checkboxes...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.