473,386 Members | 1,715 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Very strange selectproblem

Can't select 3 columns from a table called varer.

The columns are the three first and are called vnummer, puNr and dNr.

The error message is:

indiadan=# select varer.vNummer from varer;
ERROR: No such attribute varer.vnummer
indiadan=#

I'm probably doing something else wrong, but can't figure what…

Help needed,

regards,

Victor

---------------------------(end of broadcast)---------------------------
TIP 8: explain analyze is your friend

Nov 12 '05 #1
2 1413
See my comments below.

On Tue, 2003-11-04 at 13:10, Victor Spång Arthursson wrote:
Can't select 3 columns from a table called varer.

The columns are the three first and are called vnummer, puNr and dNr.

The error message is:

indiadan=# select varer.vNummer from varer; ^^^^^^^^^^
this is upper case N ERROR: No such attribute varer.vnummer

^^^^^^^
this is lower case n in vnummer

The problem could be that you created the table with the name of the vNummer column enclosed in double quotes, like this: "vNummer".
In this case postgres remembers the case of the field name. Names are case sensitive in postgres.
In your query, you don't enclose the field names in double quotes, like: varer.vNummer, which is folded to all lower case by postgres, and won't match the mixed case field you have created.
Try to quote the field names in the query, it will likely work.
A good practice to avoid such errors is to always use lower case names with postgres.

HTH,
Csaba.
---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to ma*******@postgresql.org so that your
message can get through to the mailing list cleanly

Nov 12 '05 #2
> indiadan=# select varer.vNummer from varer;
ERROR: No such attribute varer.vnummer
indiadan=#


PostgreSQL casts all names to lowercase. To select your field, you need
to use double quotes, as in:

select varer."vNummer" from varer;

Cheers.

---------------
Francois

Home page: http://www.monpetitcoin.com/

"Would Descartes have programmed in Pascal?" - Umberto Eco
---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to ma*******@postgresql.org

Nov 12 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Google Mike | last post by:
I have RH9 and am using the PHP and MySQL that came with it. I was doing fine with all manner of my web pages for this app until I started having this very strange problem. It's a work order...
6
by: leonecla | last post by:
Hi everybody, I'm facing a very very strange problem with a very very simple C program... My goal should be to write to a binary file some numbers (integers), each one represented as a sequence...
2
by: TB | last post by:
I am seeing a very strange problem as follows... I have a loop where a fair amount of processing is going on and near the top of the loop I access a class that has only static helper functions...
5
by: cody | last post by:
I have a very funny/strange effect here. if I let the delegate do "return prop.GetGetMethod().Invoke(info.AudioHeader, null);" then I get wrong results, that is, a wrong method is called and I...
2
by: Shapper | last post by:
Hello, I have this code: Dim cultureList(,) As String = {{"E", "en-GB"}, {"P", "pt-PT"}} Select Case Session("culture") Case "pt-PT" ... Dim cultureList(,) As String =...
12
by: John | last post by:
I can't get my head around this! I have the following code: <% .... Code for connection to the database ... .... Code for retrieving recordset ... If Not rs.EOF Then ... Do something...
2
by: peter | last post by:
Hi, I have very strange situation but first description ;) I have: 1) project in VB.NET, in this f.e. 1 function: Public Function Login(ByVal UserName As String, ByVal UserPassword As...
11
by: VijaKhara | last post by:
Hi all, I just write a very simple codes in C and vthere is a very strange bug which I cannot figure out why. The first loop is for v, and the second for k. There is no relationship between v...
4
by: Gotch | last post by:
Hi, I'm getting a very strange behaviour while running a project I've done.... Let's expose it: I've two projects. Both of them use a Form to do some Gui stuff. Other threads pack up messages...
112
by: Prisoner at War | last post by:
Friends, your opinions and advice, please: I have a very simple JavaScript image-swap which works on my end but when uploaded to my host at http://buildit.sitesell.com/sunnyside.html does not...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.