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!

Merging columns 1

Status
Not open for further replies.

mortac8

Programmer
Jun 7, 2001
12
US
I need to merge 3 columns in BO. It looks something like this:

TestDate Data1 Data2 Data3
1/2/01 12 10 7
. . . .
. . . .

I want merge Data1 Data2 and Data3 into one big column so I can accurately calculate standard deviation and perform other calculations. Any ideas?
I basically need to find standard deviation of (All data in Data1 Data2 and Data3). If I had it all in one big column this would be easy.
 
Select testdate, data1 from Mytable
union all
select testdate, data2 from Mytable
union all
select testdate, data3 from Mytable;

as free-hand or a view

you can use the Set operation (looks like a visa card) in the selections, union looks like a big U. I love everyone til they prove otherwise, sadly some prove otherwise SO quickly
 
You can delete the last two columns and then edit the formula for first column for whatever you want.
Ex. If you have three columns as <n1>, <n2> and <n3> then for <n1> column if you want the sum of all three, edit the formula for <n1> as <n1>+<n2>+<n3> and delete the <n2>, <n3> column.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top