Difference between revisions of "Pdm extract"

From SDU
Jump to: navigation, search
 
(One intermediate revision by one other user not shown)
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://yxiwisewava.co.cc Page Is Unavailable Due To Site Maintenance, Please Visit Reserve Copy Page]=
 
----
 
=[http://yxiwisewava.co.cc CLICK HERE]=
 
----
 
</div>
 
 
__NOTOC__
 
__NOTOC__
 
[[Category:Commands]]
 
[[Category:Commands]]
Line 14: Line 6:
 
== Overview ==
 
== Overview ==
 
Use this command to dump data from the database to the screen or file (typically txt, dat, or csv).
 
Use this command to dump data from the database to the screen or file (typically txt, dat, or csv).
 +
Note: The table names are case sensitive.
  
 
== Usage ==
 
== Usage ==
 
pdm_extract [-h] [-f] [-c] [-e] [-r] [-v] [-s] [-u] [-d] [-x] [-X] [ALL | database table names]
 
pdm_extract [-h] [-f] [-c] [-e] [-r] [-v] [-s] [-u] [-d] [-x] [-X] [ALL | database table names]
&lt;br&gt;
+
<br>
 
{|
 
{|
 
|-
 
|-
Line 73: Line 66:
 
== Examples ==
 
== Examples ==
 
* Extract all Service Desk tables
 
* Extract all Service Desk tables
  pdm_extract All &gt; All.txt
+
  pdm_extract All > All.txt
  
 
* Extract a filtered list
 
* Extract a filtered list
  pdm_extract -f &quot;SELECT * FROM Call_Req WHERE type = 'I'&quot; &gt; Call_Req.dat
+
  pdm_extract -f "SELECT * FROM Call_Req WHERE type = 'I'" > Call_Req.dat
  
 
* Extract a full table
 
* Extract a full table
  pdm_extract Priority &gt; pri.txt
+
  pdm_extract Priority > pri.txt
  
 
* Extract multiple tables
 
* Extract multiple tables
  pdm_extract Call_Request Activity_Log &gt; call.dat
+
  pdm_extract Call_Request Activity_Log > call.dat
  
 
* Extract two or more joined tables (you cannot use INNER JOIN or similar clausules, only this cross join is possible)
 
* Extract two or more joined tables (you cannot use INNER JOIN or similar clausules, only this cross join is possible)
  pdm_extract -f &quot;SELECT  ca_contact.id, c_acctyp_id FROM ca_contact, usp_contact WHERE ca_contact.id = usp_contact.id AND c_acctyp_id is null&quot;
+
  pdm_extract -f "SELECT  ca_contact.id, c_acctyp_id FROM ca_contact, usp_contact WHERE ca_contact.id = usp_contact.id AND c_acctyp_id is null"
  
  
Line 92: Line 85:
  
 
----
 
----
&lt;div align='center'&gt;&lt;font color=&quot;green&quot;&gt;To make corrections or additions to this article, select the ''edit'' tab above.&lt;br&gt;
+
<div align='center'><font color="green">To make corrections or additions to this article, select the ''edit'' tab above.<br>
To discuss or ask questions about this article, select the ''discussion'' tab above.&lt;/font&gt;&lt;/div&gt;
+
To discuss or ask questions about this article, select the ''discussion'' tab above.</font></div>

Latest revision as of 01:26, 4 September 2012

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 dump data from the database to the screen or file (typically txt, dat, or csv). Note: The table names are case sensitive.

Usage

pdm_extract [-h] [-f] [-c] [-e] [-r] [-v] [-s] [-u] [-d] [-x] [-X] [ALL | database table names]

Command Description Remarks
-h Help
-f format string
-c csv output
-e csv output with double double quotes
-r informal report output
-v verbose
-s saved script
-u no headers
-d use dataent.fmt
-x locale sensitive numeric formats
-X extract all tables except table list


Examples

  • Extract all Service Desk tables
pdm_extract All > All.txt
  • Extract a filtered list
pdm_extract -f "SELECT * FROM Call_Req WHERE type = 'I'" > Call_Req.dat
  • Extract a full table
pdm_extract Priority > pri.txt
  • Extract multiple tables
pdm_extract Call_Request Activity_Log > call.dat
  • Extract two or more joined tables (you cannot use INNER JOIN or similar clausules, only this cross join is possible)
pdm_extract -f "SELECT  ca_contact.id, c_acctyp_id FROM ca_contact, usp_contact WHERE ca_contact.id = usp_contact.id AND c_acctyp_id is null"




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.