MKDocs Colspan in Table - mkdocs

I am trying to use colspan in a table in mkdocs
When I set the table up, with the same about of cells per row in the row that has the colspan, the table renders, but I have empty cells to the right:
| | | | Version {: colspan=5} | | | |
|-------------------------|---|-------|:-----------------------:|:-----:|:-----:|:-----:|
| **TITLE** {: rowspan=5} | | **E** | **F** | **G** | **H** | **I** |
| A | X | X | | | |
| B | X | X | X | | |
| C | | | X | X | X |
| D | | | X | X | X |
result:
If I remove the cells that should be filled using the colspan, the table doesn't render at all (I have to post a screenshot of the code because it gets half rendered as a table):
result:
Any suggestions as to how I can get teh colspan option to work correctly would be greatly appreciated. TIA

Related

Update one column based on matching values of two columns from the same table

Basically I have 3 columns, like this:
+-------------+-------------+--------+
| startpoint | endpoint | number |
+-------------+-------------+--------+
| 15037232632 | 4226861620 | null |
| 4226862003 | 4226862079 | null |
| 4226862079 | 4226862111 | null |
| 4226862111 | 4226862121 | 2 |
| 4226862121 | ---------- | 1 |
| 15025374738 | 4226862003 | null |
| 4226861620 | 15025374738 | null |
| 4226801794 | 15037232632 | null |
+-------------+-------------+--------+
What I am trying to do is:
Step 1 : I assign a number '1' to any one of the IDs from the 'startpoint' column
Step 2 : Match the 'startpoint' ID to which I assigned the number in the previous step with the IDs in the 'endpoint' column
Step 3 : After the 'startpoint' ID matches with the 'endpoint' ID, I assign the number 2 in the 'number' column on the ROW where the endpoint matched
Step 4: On the row where number was assigned, I take the 'startpoint' ID and then repeat the steps 2-4 again.
I have tried playing around with the update query but it doesn't seem right. Any help would be appreciated.
EDIT:
I am also including the expected output. The table without applying any queries is given above
+-------------+-------------+--------+
| startpoint | endpoint | number |
+-------------+-------------+--------+
| 15037232632 | 4226861620 | 7 |
| 4226862003 | 4226862079 | 4 |
| 4226862079 | 4226862111 | 3 |
| 4226862111 | 4226862121 | 2 |
| 4226862121 | ---------- | 1 |
| 15025374738 | 4226862003 | 5 |
| 4226861620 | 15025374738 | 6 |
| 4226801794 | 15037232632 | 8 |
+-------------+-------------+--------+

remove duplicate headers in hive-beeline

Select ACCOUNT_NUMBER, BIN AS RISK_BIN FROM test.daily_call_routing2;"
| python -c 'exec("import sys;import csv;reader = csv.reader(sys.stdin,
dialect=csv.excel_tab);writer = csv.writer(sys.stdout,
dialect=csv.excel)\nfor row in reader: writer.writerow(row)")' >
$EXPORT_DIR//home/rabbid160/test_$DATE_STR.csv;**
When I'm trying to execute the above command in beeline-hive, I am able to see the data however with multiple headers in between. Can anyone please tell me how this can be solved to only one header and data following.
Example as follows:
+-------------------+-----------+--+
| account_number | risk_bin |
+-------------------+-----------+--+
| 8498310230444304 | 2 |
| 8778104140754717 | 2 |
| 8155100513664825 | 2 |
| 8155100513664825 | 2 |
| 8155400040004812 | 2 |
| 8155200521190266 | 2 |
| 8155300210482543 | 2 |
| 8497202241094288 | 2 |
| 8155500010197049 | 2 |
+-------------------+-----------+--+
| account_number | risk_bin |
+-------------------+-----------+--+
| 8155100030718781 | 2 |
| 8495444731138751 | 2 |
| 8498320015120250 | 2 |
| 8498330360083177 | 2 |
| 8155300210487112 | 2 |
| 8777701821146336 | 2 |
| 8497202461586765 | 2 |
| 8155400310837610 | 2 |
In beeline, the number of rows after which header should be repeated is defined by beeline variable headerinterval .
You may set headerinterval using beeline command !set headerinterval 100
Set headerinterval to large value so that possibly you will see header only once.

MS Access Report Field Value as Heading with Other Field Values Beneath in Table

In a Microsoft Access report, how can I display each record of a field as a column heading with the records of other fields in that columns records beneath it.
My query gives me data in the following format:
| ID | Item | Item Characteristic 1 | Item Characteristic 2 | Other Fields |
|:--:|:------:|:---------------------:|:---------------------:|--------------|
| 22 | Code 1 | Blue | 48 | … |
| 22 | Code 2 | Red | 50 | … |
| 22 | Code 3 | Green | 99 | … |
I'd like to have on my report to look something like this:
| Heading | Data True to All Records1 | More Data True to All Records2 | |
|:---------------------:|:-------------------------:|:------------------------------:|:------------:|
| ------------ | ------------ | ------------ | ------------ |
| Item | Code 1 | Code 2 | Code 3 |
| Item Characteristic 1 | Blue | Red | Green |
| Item Characteristic 2 | 48 | 50 | 99 |
| Other Fields | … | … | … |
| ------------ | ------------ | ------------ | ------------ |
| Footer | Data True to All Records3 | More Data True to All Records4 | |
Currently, I can only get data in the format:
| Heading | | |
|:-------:|:-----:|:--:|
| ---- | | |
| Code 1 | Blue | 48 |
| | | |
| Code 2 | Red | 50 |
| | | |
| Code 3 | Green | 99 |
| --- | | |
| Footer | | |
Where each record is resulting in a new 'row' in the report.
Can anyone help?
Table needs a unique record identifier - an autonumber type field should serve, then consider the following.
Query1:
SELECT RecID, ID, "Item" AS Category, Item AS Data FROM Tablename
UNION SELECT RecID, ID, "ItemChar1", ItemChar1 FROM Tablename
UNION SELECT RecID, ID, "ItemChar2", ItemChar2 FROM Tablename;
Query2:
TRANSFORM First(Query1.Data) AS FirstOfData
SELECT Query1.ID, Query1.Category
FROM Query1
GROUP BY Query1.ID, Query1.Category
PIVOT Query1.RecID;
For posterity, I resolved this by setting out a table of unbound labels.
I gave each of these labels a control name of x-y, where x was the column number and y was the row number.
I then looped through each column and row and changed the caption of the label to the value from my RecordSet.
(Form("FormName").Controls.Item(x & "-" & y)).Caption = .Fields("FieldName")

MYSQL multi JOIN from different tables

I have multiple MYSQLI tables for multiple details and options about a touristic package.
I have package containing the main information, then I have package_option which contains unknown number of options added to the package, and there's package_images which contains the images.
I want to get all the information in one query, but it's prooving a difficult task. Let me explain.
I've used JOIN with but the problem was if the package_option had 3 options and the package_images had 6 images, the result was a 6*4 plus 1 (package) result table.
I would like a result containing all the fields, as many as they originaly are in the tables, not multiplied for each match in every table.
For example, the table I aim for looks like that:
-------------------------------------------------------------------------
| ID | name | description | price | option | image | size | explanation |
-------------------------------------------------------------------------
| 1 | test | some desc | 50 $ | opt. 1 | img1 | 30 | |
| | | | | opt. 2 | img2 | | |
| | | | | opt. 3 | img3 | | |
| | | | | | img4 | | |
| | | | | | img5 | | |
| | | | | | img6 | | |
Right now, the above table gets populated in every field, but it's multiplied, so I don't get only 6 rows, but 24.
I did a lot of JOINS, I'm not a beginer, which is even more frustrating, but it's the first time I try to do that, a select from multiple tables with different columns and unknown number of rows.
package_option and package_images looks like that:
-------------------------------------
| ID | package_id | option / image |
-------------------------------------
| 1 | 1 | opt. 1 / img 1 |
| 2 | 2 | opt. 2 / img 2 |
..... etc
so I don't know how many rows I'll have.
Thank you in advance for t

MySQL - Join tables and convert rows to columns

I have two tables similar to these (t_stamp would normally be a DATETIME, abbreviated here for clarity):
datapoints
+------+---------+----+---------+
| ndx | value | ID | t_stamp |
+------+---------+----+---------+
| 1 | 503.42 | 1 | 3/1/15 |
| 2 | 17.81 | 2 | 3/1/15 |
| 4 | 498.21 | 1 | 3/2/15 |
| 4 | 19.51 | 2 | 3/2/15 |
+------+---------+----+---------+
parameters
+------+----+---------------+-------+
| ndx | ID | description | unit |
+------+----+---------------+-------+
| 1 | 1 | wetwell level | ft |
| 2 | 2 | effluent flow | MGD |
+------+----+---------------+-------+
I'm looking to combine them so that the descriptions become column headers and list the values in order of time stamp, end result looking something like this:
new table
+---------+---------------+---------------+
| t_stamp | wetwell level | effluent flow |
+---------+---------------+---------------+
| 3/1/15 | 503.42 | 17.81 |
| 3/2/15 | 498.21 | 19.51 |
+---------+---------------+---------------+
Bearing in mind, I have considerably more rows in each table so I'm looking for something dynamic. It could be query or stored procedure based. Thank you for any help!