Welcome to Dream.In.Code
Become an Expert!

Join 137,362 Programmers for FREE! Get instant access to thousands of experts, tutorials, code snippets, and more! There are 1,822 people online right now. Registration is fast and FREE... Join Now!




PL/SQL

 
Reply to this topicStart new topic

PL/SQL, How to select a column name that contains a dash

xav_mrobinson
8 Oct, 2008 - 10:56 AM
Post #1

New D.I.C Head
*

Joined: 8 Oct, 2008
Posts: 1



Thanked: 1 times
My Contributions
I am trying to select columns from a table defines as DataStuEmail with column names defined as
E-mailType
E-mailTypeNum
etc.

Example:

SELECT E-mailType from DataStuEmail;

gives an error

SELECT 'E-mailType' from DataStuEmail;

gives 'E-mailType' for all records = wrong, need the contents of the field not the fieldname

SELECT "E-mailType" from DataStuEmail;

gives error



In Transact SQL I use [E-mailType] around the column names on the select and it works.

What do I use in PL/SQL?


User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic
Time is now: 12/5/08 01:09AM

Live Help!

Tutorials

Programming

Web Development

Reference Sheets

Code Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month