Solar-h2o:Copper-Graphs: Difference between revisions

From Earlham CS Department
Jump to navigation Jump to search
Copelco (talk | contribs)
No edit summary
 
Copelco (talk | contribs)
Line 1: Line 1:


=== Export database table to file ===
=== Export database table to file ===
  hip=# BEGIN;
  hip=# BEGIN;BEGIN
BEGIN
  hip=# CREATE TEMP TABLE copper_runs AShip-# SELECT to_char(run3,'099.99') as run3,to_char(run2,'099.99') as run2,to_char(run1,'099.99') as run1 FROM ss_copper_lab ORDER BY date ASC;
  hip=# CREATE TEMP TABLE copper_over_time AS
hip-# SELECT to_char(date, 'MI:SS'),run1,run2,run3 FROM ss_copper_lab ORDER BY date ASC;
  SELECT
  SELECT
  hip=# COPY copper_over_time TO '/clients/users/copelco/copper_lab.txt';
  hip=# COPY copper_runs TO '/clients/users/copelco/copper_lab.txt';COPY
COPY
  hip=# ROLLBACK;ROLLBACK
  hip=# ROLLBACK;
  hip=#
  ROLLBACK

Revision as of 23:22, 21 November 2006

Export database table to file

hip=# BEGIN;BEGIN
hip=# CREATE TEMP TABLE copper_runs AShip-# SELECT to_char(run3,'099.99') as run3,to_char(run2,'099.99') as run2,to_char(run1,'099.99') as run1 FROM ss_copper_lab ORDER BY date ASC;
SELECT
hip=# COPY copper_runs TO '/clients/users/copelco/copper_lab.txt';COPY
hip=# ROLLBACK;ROLLBACK
hip=#