How can I create subheaders for specific rows in a table? - flextable

In my dataset I have a grouping column that I would like to use to create subheaders for specific rows in a table. Is it possible to create a table similar to the one below using Flexible where the subheader "Race" is for only for select rows ("White", "Black", "Hispanic" or "Latino", and "Asian") in this case?
Table Example

Related

Trying to copy or somehow move the contents (values) in a TEXT column 3k+ large rows to another table in the same database without success

I have created a new column in the "destination" table with the same name, datatype and other values as appear in the "source" column in a different table. I have tried many suggested solutions as found on stackoverflow. This one appeared to work (found on Quora) but when I went to the destination table the previously empty column remains empty with nothing but NULL values noted. This is the Quora suggestion:
you can fill data in column from another existing one by using INSERT INTO statement and SELECT statement together like that
INSERT INTO `table1`(column_name)
SELECT column_name FROM `table2`
here you filled a single column in table 1 with data located in a single column in table 2
so if you want to fill the whole table 1 (all columns) with data located in table 2 you can make table 1 like a copy of table 2 by using the same code but without column name
INSERT INTO `table1`
SELECT * FROM `table2`
but note to do this (copy table content to another one) ensure that both of tables have the same column count and data types.
I'm not sure what is meant by column count (do the two table have to have the same number of columns?)
When I run it I get error # 1138.
Any help greatly appreciated. -JG

select all rows but modifying a date format

I have a table called data where I have multiple columns of multiple times, and the table columns are dynamic.
I need to display it in a table, so I do select * from data but when the date columns are displaying like this 2018-10-10T18:30:00.000Z but the type of the column is date.
Should I modify it and then display or it is because of something else?

SELECT all COLUMN_NAMES from a table that have a specific entry

I have a table with 21 columns and I need to find all column names that have a specific value in them. This goes beyond my knowledge of database querying.
If this is possible, how would I do this?
Do you need to find columns in which the name of the column contains a certain value or there exists a row in which the given column contains the given value?
In the first case you could try the show columns: http://dev.mysql.com/doc/refman/5.0/en/show-columns.html

Adding columns to Mysql table using loops but excluding few values

I'm fairly new to mySQL. Let's say I'm adding columns to my table like so:
alter table add query but its hectic and takes time
I have a table with column stockvalue.I want to create columns named stockvalue_1 stocvalue_2 till stockvalue_99,but the numbers ending with 0 shouldn't come up ... eg: stockvalue_20 should'nt come.
alter table ass query but its hectic and takes time

Add new field to multiple table at once?

I want to add same field to multiple tables. Can I do this with single query in MySql?
I don't think you can do this with a single query, as it requires the ALTER TABLE syntax which only supports one table per query (although you could add/modify multiple columns in the same table).
You have to do one ALTER TABLE query per table to be modified.