Recent

Author Topic: autofill columns - question  (Read 1742 times)

secretk

  • New member
  • *
  • Posts: 10
autofill columns - question
« on: September 05, 2018, 09:25:43 pm »
I have a table in mysql with about 52 columns.

i have a formula that fills the first column with data.
- How can i fill the rest of the column with data based on the formula of the first column without writing the same code 52 times?
- How to do previous but by filling the amount of columns based on a value given in a edit or combobox?

(I use Zeos Access and mysql)

valdir.marcos

  • Hero Member
  • *****
  • Posts: 544
Re: autofill columns - question
« Reply #1 on: September 06, 2018, 12:25:49 am »
I have a table in mysql with about 52 columns.

i have a formula that fills the first column with data.
- How can i fill the rest of the column with data based on the formula of the first column without writing the same code 52 times?
- How to do previous but by filling the amount of columns based on a value given in a edit or combobox?

(I use Zeos Access and mysql)
Prepare a small sample with TBufDataset showing where you are now and we will help you to improve that.
Then, you can adapt that for you real MySQL project.

orionyx

  • New member
  • *
  • Posts: 8
Re: autofill columns - question
« Reply #2 on: September 24, 2018, 11:17:33 pm »
First, it looks like what you have is a spreadsheet, not a table.
Any table with 52 columns is probably not renormalized.
Any table where 51 columns can be computed from the first one - which is what you seem to be saying - has 51 redundant columns.
Reconsider your work after a little reading up on database design.