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
0
votes
0 answers

How the query plan of a stored procedure can be different according to what QUOTED_IDENTIFIER is set to?

On SQL-Server 2016 (using Management Studio 2016), I created two identical stored procedures: one is compiled with SET QUOTED_IDENTIFIER OFF, the other one with ON. Here is the query plan executed with ON, instant result, we can see the right index…
0
votes
1 answer

Update statement fails due to quoted identifer after adding filtered index

I just added a filtered index to an existing table, now insert/update queries don't work against this table. I've set quoted_identifier both on and off before executing my update statement, but it still fails consistently. Note that there is no…
gzak
  • 3,908
  • 6
  • 33
  • 56
0
votes
1 answer

quoted_identifier on?

One of our programs is erroring out because a stored procedure was "created with QUOTED_IDENTIFIER option ON". This is a Microsoft SQL Server (8). All that happened to it yesterday was: Stored procedures were editted. A table was created. I have…
Tyllyn
  • 279
  • 1
  • 4
  • 12
0
votes
2 answers

Quoted Identifier Issue with Power Builder application

A Power Builder 11 application is facing issues with DB queries through ODBC driver on a windows 2008 server. Below are details. Application has query in format like select "column1" from "table1" . Application uses MSSQL Database. This…
0
votes
1 answer

How to change identifier quote character in SSIS for connection to ODBC DSN

I'm trying to create an SSIS 2008 Data Source View that reads from an Ingres database via the ODBC driver for Ingres. I've downloaded the Ingres 10 Community Edition to get the ODBC driver, installed it, set up the data access server and a DSN on…
William Rose
  • 971
  • 1
  • 6
  • 13
0
votes
1 answer

Parsing single qoute char in a single-quoted string in parsec

I've got a silly situation in my parsec parsers that I would like your help on. I need to parse a sequence of strongs / chars that are separated by | characters. So, we could have a|b|'c'|'abcd' which should be turned into [a,b,c,abcd] Space is…
Fredrik Karlsson
  • 485
  • 8
  • 21
0
votes
1 answer

Error while updating Database with mssql_query

I'm using mssql_query to connect to an existing SQL Server 2008 Database. SELECT querys are ok, but when I run UPDATE querys like the following: mssql_query("UPDATE TABLENAME SET fieldname = 1 WHERE Pk = '".$pk."'"); I get this error: UPDATE…
carlosduarte
  • 83
  • 1
  • 2
  • 6
-1
votes
1 answer

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 around table names when I cut and paste my ORM…
Eric Ouellet
  • 10,996
  • 11
  • 84
  • 119
-1
votes
2 answers

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?
lupin
  • 173
  • 5
  • 19
-1
votes
2 answers

How to set quoted identifier off while creating stored procedure using exec

I have a scenario to alter the columns of few user defined table types programmatically. To do this, I need to drop the referenced stored procedures. So, I have designed my SQL scripts to do following activities: Taking the backup of stored…
-1
votes
1 answer

How to fix Column does not exist on this Inner Join of two tables with three conditions?

Currently, I am trying to create a new table based on the Inner Join query of two tables with three conditions. However, the SQL Error window always tells me the columns does not exist even when they clearly do. So this is what has to happen an…
ThunderSpark
  • 89
  • 2
  • 13
-1
votes
1 answer

Porting a view from SAP SQL Anywhere to Postgres

I am currently looking into Postgres as a possible alternative to SAP SQL Anywhere. I have successfully ported our development db (700 tables) into Postgres and am now attempting to create some equivalent views in the Postgres DB. The following…
-3
votes
1 answer

Postgres query cannot find rows based on column value

I want to select rows based on a column value. I know for a fact the column value exists. The first query returns 100 rows from the listing table. The second query, which looks for listings.OriginatingSystemName = 'mfrmls` returns nothing.…
1 2 3
9
10