From oracle-l-bounce@freelists.org Fri Mar 19 08:57:03 2004 Return-Path: Received: from air189.startdedicated.com (root@localhost) by orafaq.com (8.11.6/8.11.6) with ESMTP id i2JEv3H10827 for ; Fri, 19 Mar 2004 08:57:03 -0600 X-ClientAddr: 206.53.239.180 Received: from turing.freelists.org (freelists-180.iquest.net [206.53.239.180]) by air189.startdedicated.com (8.11.6/8.11.6) with ESMTP id i2JEv3o10822 for ; Fri, 19 Mar 2004 08:57:03 -0600 Received: from turing (localhost [127.0.0.1]) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTP id 67E42390AC2; Fri, 19 Mar 2004 09:55:20 -0500 (EST) Received: with ECARTIS (v1.0.0; list oracle-l); Fri, 19 Mar 2004 09:54:11 -0500 (EST) X-Original-To: oracle-l@freelists.org Delivered-To: oracle-l@freelists.org Received: from smtp101.mail.sc5.yahoo.com (smtp101.mail.sc5.yahoo.com [216.136.174.139]) by turing.freelists.org (Avenir Technologies Mail Multiplex) with SMTP id 25C883909DA for ; Fri, 19 Mar 2004 09:54:11 -0500 (EST) Received: from unknown (HELO itlap01) (saira?somani@207.139.2.138 with login) by smtp101.mail.sc5.yahoo.com with SMTP; 19 Mar 2004 15:00:33 -0000 From: "Saira Somani-Mendelin" To: Subject: RE: Create view using CAST to change datatype Date: Fri, 19 Mar 2004 10:03:24 -0500 Organization: Hospital Logistics Inc. Message-ID: <004301c40dc3$53d5c980$e20110ac@itlap01> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook, Build 10.0.2627 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4807.1700 In-Reply-To: Importance: Normal X-archive-position: 1238 X-ecartis-version: Ecartis v1.0.0 Sender: oracle-l-bounce@freelists.org Errors-To: oracle-l-bounce@freelists.org X-original-sender: saira_somani@yahoo.com Precedence: normal Reply-To: oracle-l@freelists.org X-list: oracle-l Tom, That's a great suggestion, but how could I do that in a view? Perhaps like this? CAST(RTRIM(OB_OID) AS NUMBER) OB_OID... would that work? Here is the view definition: CREATE OR REPLACE VIEW V_ITH_F AS (SELECT ITH_RID, TRANSACT, SKU, PKG, FROM_LOC, TO_LOC, TRANSACT_STT, WAVE, CAST(OB_OID AS NUMBER) OB_OID, OB_TYPE, CAST(IB_OID AS NUMBER) IB_OID, IB_TYPE, OB_LNO, IB_LNO, ACT_QTY, WHSE, FROM ITH_F); -----Original Message----- From: oracle-l-bounce@freelists.org [mailto:oracle-l-bounce@freelists.org] On Behalf Of Mercadante, Thomas F Sent: March 19, 2004 9:54 AM To: 'oracle-l@freelists.org' Subject: RE: Create view using CAST to change datatype Saira, My first idea would be to trim the blanks from the column thus converting the value to a null before casting. Would that work? What happens with the Cast statement when a null value is involved? Can you show the Create View Sql? thanks Tom Mercadante Oracle Certified Professional ---------------------------------------------------------------- Please see the official ORACLE-L FAQ: http://www.orafaq.com ---------------------------------------------------------------- To unsubscribe send email to: oracle-l-request@freelists.org put 'unsubscribe' in the subject line. -- Archives are at http://www.freelists.org/archives/oracle-l/ FAQ is at http://www.freelists.org/help/fom-serve/cache/1.html -----------------------------------------------------------------