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

From: Harry Tuttle <SOZRBLNTLEEE_at_spammotel.com>
Date: Fri, 16 Nov 2012 18:32:58 +0100
Message-ID: <agnbm7F14chU1_at_mid.individual.net>



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. Received on Fri Nov 16 2012 - 18:32:58 CET

Original text of this message