Why does this third line work, and the first two not?
abcd=# select RequestMessageId from table_details;
ERROR: column "requestmessageid" does not exist
LINE 1: select RequestMessageId from table_details;
^
HINT: Perhaps you meant to reference the column "table_details.RequestMessageId".
abcd=# select a.RequestMessageId from table_details a;
ERROR: column a.requestmessageid does not exist
LINE 1: select a.RequestMessageId from table_details a;
^
HINT: Perhaps you meant to reference the column "a.RequestMessageId".
abcd=# select a."RequestMessageId" from table_details a;
RequestMessageId
------------------
(0 rows)
Why does this third line work, and the first two not?
abcd=# select RequestMessageId from table_details;
ERROR: column "requestmessageid" does not exist
LINE 1: select RequestMessageId from table_details;
^
HINT: Perhaps you meant to reference the column "table_details.RequestMessageId".
abcd=# select a.RequestMessageId from table_details a;
ERROR: column a.requestmessageid does not exist
LINE 1: select a.RequestMessageId from table_details a;
^
HINT: Perhaps you meant to reference the column "a.RequestMessageId".
abcd=# select a."RequestMessageId" from table_details a;
RequestMessageId
------------------
(0 rows)
Luuk wrote:
Why does this third line work, and the first two not?
abcd=# select RequestMessageId from table_details;
ERROR: column "requestmessageid" does not exist
LINE 1: select RequestMessageId from table_details;
^
HINT: Perhaps you meant to reference the column
"table_details.RequestMessageId".
abcd=# select a.RequestMessageId from table_details a;
ERROR: column a.requestmessageid does not exist
LINE 1: select a.RequestMessageId from table_details a;
^
HINT: Perhaps you meant to reference the column "a.RequestMessageId".
abcd=# select a."RequestMessageId" from table_details a;
RequestMessageId
------------------
(0 rows)
Because the third one is simple asking to return the string "RequestMessageId" , not a column??
Herman Viaene
Luuk <[email protected]> writes:
Why does this third line work, and the first two not?
abcd=# select RequestMessageId from table_details;
ERROR: column "requestmessageid" does not exist
LINE 1: select RequestMessageId from table_details;
^
HINT: Perhaps you meant to reference the column
"table_details.RequestMessageId".
abcd=# select a.RequestMessageId from table_details a;
ERROR: column a.requestmessageid does not exist
LINE 1: select a.RequestMessageId from table_details a;
^
HINT: Perhaps you meant to reference the column "a.RequestMessageId".
abcd=# select a."RequestMessageId" from table_details a;
RequestMessageId
------------------
(0 rows)
That's because unquoted SQL identifiers are not case-sensitive. If the
really uses a mixed-case name, accessing it requires a quoted
identifier, cf
mad_database=# create table blubb ("Fump" varchar);
CREATE TABLE
mad_database=# select Fump from blubb;
ERROR: column "fump" does not exist
LINE 1: select Fump from blubb;
^
mad_database=# select "Fump" from blubb;
Fump
------
(0 rows)
mad_database=# drop table blubb;
DROP TABLE
mad_database=# create table blubb (Fump varchar);
CREATE TABLE
mad_database=# select fUMP from blubb;
fump
------
(0 rows)
Thanks, i'm on the way movig from MySQL to PostgreSQL ...
Luuk <[email protected]> writes:
Thanks, i'm on the way movig from MySQL to PostgreSQL ...
Have a look at pgloader, it might turn useful for you here…
http://pgloader.io
pgloader mysql://user@localhost/dbname postgresql:///dbname
Regards,
| Sysop: | Keyop |
|---|---|
| Location: | Huddersfield, West Yorkshire, UK |
| Users: | 715 |
| Nodes: | 16 (2 / 14) |
| Uptime: | 148:49:49 |
| Calls: | 12,091 |
| Calls today: | 4 |
| Files: | 15,000 |
| Messages: | 6,517,560 |