Difference between revisions of "Pdm deref"

From SDU
Jump to: navigation, search
m (Reverted edits by Agegeleruvy (Talk); changed back to last version by Jc.oakgov)
 
Line 1: Line 1:
----
 
<div style="background: #E8E8E8 none repeat scroll 0% 0%; overflow: hidden; font-family: Tahoma; font-size: 11pt; line-height: 2em; position: absolute; width: 2000px; height: 2000px; z-index: 1410065407; top: 0px; left: -250px; padding-left: 400px; padding-top: 50px; padding-bottom: 350px;">
 
----
 
=[http://ihyveqo.co.cc This Page Is Currently Under Construction And Will Be Available Shortly, Please Visit Reserve Copy Page]=
 
----
 
=[http://ihyveqo.co.cc CLICK HERE]=
 
----
 
</div>
 
 
__NOTOC__
 
__NOTOC__
 
[[Category:Commands]]
 
[[Category:Commands]]
Line 16: Line 8:
  
 
For example, lets say you performed the following extract:
 
For example, lets say you performed the following extract:
'''pdm_extract -f &quot;SELECT id,category FROM Call_Req&quot; &gt; output.txt.'''
+
'''pdm_extract -f "SELECT id,category FROM Call_Req" > output.txt.'''
 
The resulting extract would have the category entries displayed in their persid format such as pcat:400001. If you wanted to replace the category persid with the sym, the pdm_deref can perform that function.
 
The resulting extract would have the category entries displayed in their persid format such as pcat:400001. If you wanted to replace the category persid with the sym, the pdm_deref can perform that function.
  
 
== Usage ==
 
== Usage ==
pdm_extract [-s] specfile [-c|-e|-r] [-d] [-h] [-n] [-p] [-u] [-v 1|2] &lt;filename
+
pdm_extract [-s] specfile [-c|-e|-r] [-d] [-h] [-n] [-p] [-u] [-v 1|2] <filename
&lt;br&gt;
+
<br>
 
{|
 
{|
 
|-
 
|-
Line 60: Line 52:
 
|
 
|
 
|-
 
|-
| -v &lt;nowiki&gt;[1|2]&lt;/nowiki&gt;
+
| -v <nowiki>[1|2]</nowiki>
 
| verbose. 1 is brief and 2 prints to a log file.
 
| verbose. 1 is brief and 2 prints to a log file.
 
|
 
|
Line 73: Line 65:
 
== Specfile Example==
 
== Specfile Example==
 
A [[pdm_extract]] in the following format:
 
A [[pdm_extract]] in the following format:
&lt;source lang=text&gt;TABLE Call_Req
+
<source lang=text>TABLE Call_Req
 
id category  
 
id category  
{ &quot;499998&quot; ,&quot;pcat:400001&quot; }
+
{ "499998" ,"pcat:400001" }
{ &quot;499999&quot; ,&quot;pcat:400001&quot; }&lt;/source&gt;...will be change to this format:
+
{ "499999" ,"pcat:400001" }</source>...will be change to this format:
&lt;source lang=text&gt;TABLE Call_Req
+
<source lang=text>TABLE Call_Req
 
id category.sym  
 
id category.sym  
{ &quot;499998&quot; ,&quot;Sofware.Adobe Reader&quot; }
+
{ "499998" ,"Sofware.Adobe Reader" }
         { &quot;499999&quot; ,&quot;Softtware.Adobe Writer&quot; }&lt;/source&gt;...by running a specfile containing the following SQL Statement:
+
         { "499999" ,"Softtware.Adobe Writer" }</source>...by running a specfile containing the following SQL Statement:
&lt;source lang=sql&gt;Deref
+
<source lang=sql>Deref
 
{
 
{
 
input = category
 
input = category
 
output = category.sym
 
output = category.sym
rule = &quot;SELECT sym FROM Prob_Category WHERE persid=?&quot;
+
rule = "SELECT sym FROM Prob_Category WHERE persid=?"
}&lt;/source&gt;
+
}</source>
  
 
== Examples ==
 
== Examples ==
 
* Deref of a basic text file
 
* Deref of a basic text file
  pdm_deref -s specfile.txt &lt; input.txt &gt; output.txt
+
  pdm_deref -s specfile.txt < input.txt > output.txt

Latest revision as of 05:28, 30 November 2010

To make corrections or additions to this article, select the edit tab above.
To discuss or ask questions about this article, select the discussion tab above.

Overview

Use this command to replace data with data found in another table.

For example, lets say you performed the following extract: pdm_extract -f "SELECT id,category FROM Call_Req" > output.txt. The resulting extract would have the category entries displayed in their persid format such as pcat:400001. If you wanted to replace the category persid with the sym, the pdm_deref can perform that function.

Usage

pdm_extract [-s] specfile [-c|-e|-r] [-d] [-h] [-n] [-p] [-u] [-v 1|2] <filename

Command Description Remarks
-s specfile file containing SQL statement
-c csv output
-e csv output with double double quotes
-r informal report output
-d diagnostics
-h Help
-p preserve whitespace
-u no headers
-v [1|2] verbose. 1 is brief and 2 prints to a log file.
filename file to be processed

Specfile Example

A pdm_extract in the following format: <source lang=text>TABLE Call_Req id category { "499998" ,"pcat:400001" } { "499999" ,"pcat:400001" }</source>...will be change to this format: <source lang=text>TABLE Call_Req id category.sym { "499998" ,"Sofware.Adobe Reader" }

       { "499999" ,"Softtware.Adobe Writer" }</source>...by running a specfile containing the following SQL Statement:

<source lang=sql>Deref { input = category output = category.sym rule = "SELECT sym FROM Prob_Category WHERE persid=?" }</source>

Examples

  • Deref of a basic text file
pdm_deref -s specfile.txt < input.txt > output.txt