Questions tagged [quoted-identifier]

Use this tag for questions involving SQL delimited identifiers (quoted identifiers.)

In SQL, a delimited identifier (also referred to as "quoted identifier") is an identifier (name) enclosed in double quotes.

Delimited identifiers are special in two aspects:

• They can contain characters normally not supported in SQL identifiers. (E.g. "!# odd column name".)

• They can be identical to a reserved word. (E.g. "YEAR".)

Two consecutive double quotation marks within a delimited identifier are interpreted as one double quotation mark. (E.g. "12"" vinyl".)

SQL is by default case insensitive. To make an identifier (name) case sensitive it needs to be quoted. "Some_Table", "SOME_TABLE" and "some_table" are different names because they are quoted. The names some_table, SOME_TABLE and Some_Table are identical names because they are not quoted.

The SQL standard defines the double quote " as the quoting character (single quotes: ' are for string literals.) Some DBMS products deviate from the standard and allow alternative quoting characters. Microsoft SQL Server uses square brackets: [Some_Table] and MySQL uses backticks `Some_Table`.

148 questions
1
vote
1 answer

Unable to insert into table where column is a foreign key

When inserting into my table I get this error: ERROR: column "brandid" of relation "Item" does not exist The brandId column has a foreign key constraint on it that links it to the id of another table. the table I am inserting into is defined as…
1
vote
1 answer

SQL SERVER - Same code different result when running SQL script via SQLCMD and via MSSQL

I have this weird issue where same script have different results. Below is my code: --Create table ExtractForCustomerLoyalty-------------------------------------------------------------------- --This contains the customer extract records and is used…
Cyberpau
  • 125
  • 9
1
vote
1 answer

No way to implement a q quoted string with custom delimiters in Antlr4

I'm trying to implement a lexer rule for an oracle Q quoted string mechanism where we have something like q'$some string$' Here you can have any character in place of $ other than whitespace, (, {, [, <, but the string must start and end with the…
user3770822
  • 63
  • 1
  • 5
1
vote
1 answer

How do I do Select queries on a table that is inside of a schema in PostgreSQL?

I have an RDS instance set up on AWS. I can't connect to the PostgreSQL database without issues. When I try to run select statements against the table I am getting odd results. It just lists the logged in user. The table is User. I see that the…
user2385520
  • 103
  • 1
  • 12
1
vote
1 answer

How to resolve ERROR: relation "user_login" does not exist Position: 22 in PostgreSQL

I am getting following error when I try to get ResultSet: relation "user_login" does not exist Position: 22 I have a table name User_Login but the error indicates lower case table name. I have been trying to debug it but I am unable to find out…
Mike
  • 777
  • 3
  • 16
  • 41
1
vote
3 answers

Selenium with postgreSQL

I'm trying to connect Selenium with Postgres and the following error is shown: FAILED: selectQuery org.postgresql.util.PSQLException: ERROR: relation "login" does not exist My code is below: package Posgress; import java.sql.Connection; import…
user7403515
1
vote
2 answers

Filtered Unique Index causing UPDATE to fail because incorrect 'QUOTED_IDENTIFIER' settings

We've put in place the following filtered index on a table in our SQL Server 2016 database: CREATE UNIQUE NONCLUSTERED INDEX [fix_SystemPKeyExecutionOrder] ON [DataInt].[TaskMaster] ( [SystemPkey] ASC, [ExecutionOrder] ASC ) WHERE…
user3810913
1
vote
1 answer

Quoted identifier error Codefluent

We have a QUOTEDIDENTIFIER problem with the Azure producer. We have an entity where we defined a Geography property. We created a geospatial index on that table. However, if we perform an insert or update on that table we get the followind…
Peter de Bruijn
  • 792
  • 6
  • 22
1
vote
1 answer

Why isn't my sql command accepting a quoted identifier for a table name?

I wanted to make my sql query bullet proof and found this question about sanitizing table/column names. I followed the advices but somehow it doesn't work as expected. My table name is foo.Bar so I passed it to the CommandBuilder's QuoteIdentifier…
t3chb0t
  • 16,340
  • 13
  • 78
  • 118
1
vote
1 answer

Postgres Alter Table relation does not exist

I have a table called Foo, which I'm trying to add a column "bar" to. Using psycopg2 in python, my function call is cursor.execute('ALTER TABLE "Foo" ADD COLUMN bar text') However, I get the following error: relation "Foo" does not exist I also…
Teboto
  • 1,005
  • 1
  • 12
  • 16
1
vote
1 answer

Postgres column does not exist

Someone else wrote a SQL Server query which worked, and I have the job of porting it over to Postgres. I don't really know either database beyond the very basic SQL commands (I'm working my way through the tutorial and will continue either way, but…
thumbtackthief
  • 6,093
  • 10
  • 41
  • 87
1
vote
2 answers

SQL Server: INSERT/UPDATE/DELETE failed because the following SET options have incorrect settings: ‘QUOTED_IDENTIFIER’

I have this rather awkward problem: For two weeks now, whenever after I've updated/created stored procedures using my SQL scripts, when these stored procedures are run, they fail with above error. Other posts dealing with this problem didn't help in…
AxD
  • 2,714
  • 3
  • 31
  • 53
1
vote
1 answer

Regex for Pipe Delimted with quoted Identifiers

Possible Duplicate: Parsing CSV files in C# I have a C# application that parses a pipe delimited file. It uses the Regex.Split method: Regex.Split(line, @"(?
1
vote
1 answer

using special characters in Oracle

I have table as create table loan (loan_id varchar2(20), cust_id varchar2(10), loan_amt number, start_date date, loan_plan varchar2(20), end_date date, Credit_bureau_score varchar2(20), "small char" varchar2(20), "special_char3^%#$@#^%*&"…
user1011046
  • 204
  • 1
  • 5
  • 16
0
votes
1 answer

"ORA-00942: table or view does not exist" for mixed case table and columns

TOAD gives "ORA-00942: table or view does not exist" when updating mixed case tables or columns. For update I do not write any queries, I am trying to update data on grid (data tab). For upper case tables and columns it updates sucessfully. For some…
rovsen
  • 4,932
  • 5
  • 38
  • 60