Re: Converting fields from Double to String while writing a table view

From: Matt Whitman <mgwhitman_at_gmail.com>
Date: Fri, 16 Nov 2012 11:40:00 -0800 (PST)
Message-ID: <78c34575-12f1-42cb-a83c-d37a0bc04d0d_at_googlegroups.com>



On Friday, November 16, 2012 12:32:57 PM UTC-5, Harry Tuttle wrote:
> Matt Whitman wrote on 16.11.2012 02:49: > Here is a brief example of what I'm trying to do. I've not had any issues creating the view I am >uncertain the best method to change the connection column to string when it is currently a double. > > CREATE VIEW GIS_VIEW AS > SELECT address, > id, > status, > connection > FROM Location > WHERE status = "active" > In SQL (in general as well as in Oracle) character literals (aka strings) need to be enclosed in single quotes. Double quotes are used to denote identifiers (tables, columns, ...) CREATE VIEW GIS_VIEW AS SELECT address, id, status, connection FROM Location WHERE status = 'active'; Btw: that is not PL/SQL, that is simple SQL. PL/SQL is about procedures, functions, triggers and such things.

Thanks for the help. Sorry for the lack of clarity. In my original post I should I said was transitioning from working with Access (program) to PL/SQL Developer (program). This transition involves updating my previous Access specific queries to SQL. I am trying to set the column data type because I need to convert it so I can join with a spatial dataset string field. I understand this can be done with to_char and had just wondering if the group had any advice on the best practice. Thanks! Received on Fri Nov 16 2012 - 20:40:00 CET

Original text of this message