If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > PostgreSQL > Select SQL query for character varying [] data type

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 09-16-11, 08:26
ranyeng ranyeng is offline
Registered User
 
Join Date: Sep 2011
Posts: 1
Select SQL query for character varying [] data type

This is my ias_possible_value table:



Column Type Not Null
-----------------------------------------------------------------------------------
parameter_id integer NOT NULL
language_id integer NOT NULL
possibleValues character varying(100)[] ** this is a array of char varying
valueType character varying(50) NOT NULL


When I execute sql command select * from ias_possible_value, it works fine.

But, we I execute sql command select possibleValues from ias_possible_value, it display the following error message:

ERROR: column "possiblevalues" does not exist
LINE 1: select possibleValues from ias_possible_value where paramete...

Please help me.
Reply With Quote
  #2 (permalink)  
Old 09-16-11, 08:51
shammat shammat is offline
Registered User
 
Join Date: Nov 2003
Posts: 2,408
apparently your table has been created using double quotes for column names, thus they are case-sensitive now. That has nothing to do with the data type. You have the same "problem" for the column valueType.

You now need to double quote the columns all the time you want to access them:
Code:
select "possibleValues", "valueType"
from ias_possible_value
Reply With Quote
  #3 (permalink)  
Old 10-10-11, 13:47
loquin loquin is offline
Super Moderator
 
Join Date: Jun 2004
Location: Arizona, USA
Posts: 1,797
BTW - pgAdmin always creates object using quotes... so that, if you don't use lower case naming convention, you'll always need to use quotes afterwards.
__________________
Lou
使大吃一惊
"Lisa, in this house, we obey the laws of thermodynamics!" - Homer Simpson
"I have my standards. They may be low, but I have them!" - Bette Middler
"It's a book about a Spanish guy named Manual. You should read it." - Dilbert

Reply With Quote
Reply

Tags
character varying, postgres, select query

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On