<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[My Visual Database — Povit operator]]></title>
		<link>https://myvisualdatabase.com/forum/viewtopic.php?id=8121</link>
		<atom:link href="https://myvisualdatabase.com/forum/extern.php?action=feed&amp;tid=8121&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in Povit operator.]]></description>
		<lastBuildDate>Wed, 11 May 2022 15:35:35 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: Povit operator]]></title>
			<link>https://myvisualdatabase.com/forum/viewtopic.php?pid=44691#p44691</link>
			<description><![CDATA[<p>The PIVOT command is not standard SQL command, it is supported only by some DBMS, SQLite and MySQL are not among them.</p><br /><p>But you can make a similar view of the data using a script that will create a table view with the desired number of columns and rows.<br />This is not often ordered, I don’t have a ready-made simple example. All I can say is that you will need three SQL queries: 1) get a list of headers for rows 2) get a list of headers for columns 3) get data. </p><p>Key methods: </p><p>1) add Column for Row Names</p><div class="codebox"><pre><code>  try
     Grid.Columns.Add(TNxTextColumn);
   except
   end;
  Grid.Columns[0].Width := 40;
  Grid.FixedCols := 1;
  Grid.Columns[0].Color := clbtnFace;</code></pre></div><p>2) add a column for data</p><div class="codebox"><pre><code>    
    try
      Grid.Columns.Add(TNxTextColumn);
    except
    end;
    Grid.Columns[Grid.Columns.count-1].Header.Caption := ColData.FieldByName(&#039;name&#039;).asString;
    Grid.Columns[Grid.Columns.count-1].Color := clWhite;
    Grid.Columns[Grid.Columns.count-1].Width := 40;</code></pre></div><br /><p>3) add a row </p><div class="codebox"><pre><code>    Grid.AddRow;
    Grid.Cells[0, Grid.RowCount-1] := RowData.FieldByName(&#039;name&#039;).asString;</code></pre></div><p>4) fill the cell with data.</p><div class="codebox"><pre><code>       Grid.Cells[col, row] := CellData;</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (k245)]]></author>
			<pubDate>Wed, 11 May 2022 15:35:35 +0000</pubDate>
			<guid>https://myvisualdatabase.com/forum/viewtopic.php?pid=44691#p44691</guid>
		</item>
		<item>
			<title><![CDATA[Povit operator]]></title>
			<link>https://myvisualdatabase.com/forum/viewtopic.php?pid=44689#p44689</link>
			<description><![CDATA[<p>Hi every one,<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;I am sure every one be ok. Today I want to know about Povit. I read about it which is used in sql. Can any one tell to me how can we use it in MVD? It is possible or not? If it is possible then plz write some detail with example.<br />Thank in advance.</p>]]></description>
			<author><![CDATA[null@example.com (unforgettable)]]></author>
			<pubDate>Wed, 11 May 2022 09:51:55 +0000</pubDate>
			<guid>https://myvisualdatabase.com/forum/viewtopic.php?pid=44689#p44689</guid>
		</item>
	</channel>
</rss>
