when timestamp is null - Mailing list pgsql-general

From mikeo
Subject when timestamp is null
Date
Msg-id 3.0.1.32.20000712154027.00943470@pop.spectrumtelecorp.com
Whole thread Raw
Responses Re: when timestamp is null  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
hi,

  i want to update rows of a table where the column defined

as type timestamp is null.


update cust set cust_svc_start_dt = cust_svc_end_dt -1

where cust_svc_start_dt is null;


<bold>ERROR:  Unable to convert null timestamp to date

</bold>

how can i get around this?  i've tried to_char and casting

as date, time, etc.  to no avail.


TIA,

  mikeo


\d cust

                Table "cust"

     Attribute     |    Type     | Modifier

-------------------+-------------+----------

 cust_id           | varchar(15) | not null

 cut_id            | varchar(6)  |

 cust_name         | varchar(50) |

 cust_division     | varchar(6)  |

 cust_svc_start_dt | timestamp   |

 cust_svc_end_dt   | timestamp   |

 cust_valid        | varchar(1)  |

 cust_bill_loc_id  | varchar(6)  |

 wu_id             | varchar(10) |

 cust_timestamp    | timestamp   |

 agt_id            | integer     |

 rse_id            | integer     |

 bd_id             | varchar(6)  |

 cust_email        | varchar(50) |

 cust_stream       | integer     |

 br_cycle          | bigint      |

pgsql-general by date:

Previous
From: Howie
Date:
Subject: Re: Enterprise Java Beans support?
Next
From: Tom Lane
Date:
Subject: Re: Slashdot discussion