146 questions
0
votes
0
answers
7
views
Trying to select all rows in this column with a certain value, and failing [duplicate]
I am new to writing raw SQL queries so forgive me for this being easy to solve. The database is Postgres.
I have a table similar to:
taskId providerName lastScan ignore
====================...
-1
votes
1
answer
2k
views
PostgreSQL - I get SQL Error [42P01] or [42703] if I don't add double quotes around table names or Fields
I'm using DBeaver to write script for my PostgreSQL database.
I have a PostgreSQL DB with Tables autogenerated by C#/EFCore (Microsoft ORM) - I receive SQL Error [42P01] if I don't add double quotes ...
0
votes
1
answer
64
views
Weird error when trying to query from database [duplicate]
As the title suggests, I have no clue why this doesn't work. If someone can point out what I am doing wrong it would be sweet.
Here's the current table rows and cols:
Makes table:
id | make
...
0
votes
1
answer
37
views
How to insert data into `group` labeled table
I have a database in Postgres that has multiple tables. One of them is group. I know that this is a reserved name. The question is how to insert data into that table.
0
votes
0
answers
66
views
When do we use double quotes for table names in SQL? [duplicate]
A SQL coding challenge provided a database; every table was accessible when passed as a string using double quotes and not when passed as a word as I am normally used to.
This did not work:
SELECT * ...
1
vote
0
answers
43
views
PostgresSQL production table database has capital letter
may I know how can I select my database if all the column has all capital letters. I run this query and it works
SELECT public.countryhomes."PH" from public.countryhomes where public....
0
votes
1
answer
457
views
How to make column name of query result in UPPERCASE
How to make column name of query result in UPPERCASE (Postgres)
SELECT USER_NAME, USER_AGE from table;
Result
user_name
user_age
First
123
Second
234
Expectation : Result column name to be in ...
2
votes
1
answer
715
views
Selecting numeric named columns in PostgreSQL returns ?column?
I am using PostgreSQL 13.7 (Debian 13.7-0+deb11u1) and have the following table:
CREATE TABLE public.meterdata (
"0.0.0" numeric(8,0) NOT NULL,
"0.9.1" numeric(7,0) NOT NULL,
...
0
votes
2
answers
1k
views
not able to delete database in postgres
The drop database command is not working in sql shell. It shows db doesn't exists. But pgadmin and \l shows the db. What is the problem and how to delete the db?
1
vote
1
answer
2k
views
PostgreSQL disable auto lowercase column name
I have created a PostgreSQL database 12.7 and converted it to an esri geodatbases, then I copied the tables and feature classes from a file geodatabases , this caused the al column names to be ...
0
votes
1
answer
178
views
Postgres: How to drop a schema which has a double quote included in its name?
I have a schema called "tenant__xyz" in my db but need to drop it.
How can I do this? Thank you in advance
0
votes
1
answer
4k
views
Best way to rename a rename a table to avoid caching issues?
I've been trying to rename a table from "fund performance" to fund_performance in SQLWorkbench for a Redshift database. Commands I have tried are:
alter table schemaname."fund ...
0
votes
0
answers
1k
views
Query Error: error: column does not exist [duplicate]
I have created two tables and tried to join them, but it resulted in Query Error. What could be the problem?
Here is how I created tables
CREATE TABLE Customer
(
"Ids" int,
"...
0
votes
2
answers
64
views
displaying column names instead of data from psql terminal
I connect to the remote ubuntu 20.04 computer from the terminal with ssh, connect to the database that I have installed on the postgres user, and I want to see the data in a column with psql commands. ...
0
votes
1
answer
169
views
foreign key camel case issue in postgres on heroku server
i am creating table on heroku successfully but the problems is foreign key when add foreign key it will automatically created in small letter by default
postgres accept foreign key like serviceId ...