String constans refer to quoted string literals, or in some languages also to constant expressions formed from them, usually via concatenation.
Questions tagged [string-constant]
79 questions
1
vote
1 answer
hstore value with single quote
I asked similar question here for: hstore value with space. And get solved by user: Clodoaldo Neto. Now I have come across next case with string containing single quote.
SELECT 'k=>"name", v=>"St. Xavier's Academy"'::hstore;
I tried it by using…

Ram Shrestha
- 39
- 1
- 1
- 7
0
votes
1 answer
Why does __builtin_constant_p evaluate to false for a constexpr std::string_view argument?
I need to interface with an API that expects compile time static strings. It enforces them via using
static_assert (__builtin_constant_p (str));
To be more specific, I'm referring to the Apple Signpost API here.
Now I have a situation where I'd…

PluginPenguin
- 1,576
- 11
- 25
0
votes
1 answer
psql treating text input as column in a Join statement
SELECT DISTINCT midiport_id, mp.implementation, d.device_function, mp.serial, mp.dev, mp.subdev, mc.device_id, mc.target, mc.mask, mf.midi_function_id, kd.divn, mc.dev, mc.channel, d.inputs, d.outputs, mc.lo_key, mc.hi_key, mc.program,…

Cheetaiean
- 901
- 1
- 12
- 26
0
votes
1 answer
Setting a specific date in c++
i want to set a date, so that if the current date exceed the date set, the function will not run.
For example after a certain date user are not able to vote…

Jayren
- 11
- 1
0
votes
2 answers
While Inserting Data Showing Data as does not exist
Query
INSERT INTO public.employee
(id,first_name,last_name,salary,joining_date,department)
VALUES
(1, Monika, Arora, 100000, '2014-02-20 09:00:00', HR);
Output:
ERROR: column "monika" does not exist

Subodh verma
- 3
- 1
0
votes
0 answers
Postgersql change the label for a query in case condition
I have a query like this
SELECT "source"."User Profile__user_type", case when "User Profile__user_type" = 4 then cast("User Profile__user_type" as text)="BUILDER" end AS "User Profile__user_type", sum("source"."totalPrice") AS "sum"
FROM (SELECT…

user591814
- 11
- 2
0
votes
0 answers
ERROR: syntax error at or near "a2e3916c" LINE 1: a2e3916c-dce2-11ec-a644-16e7866bc173 ^ SQL state: 42601 Character: 1
enter image description here
enter image description here
CAN YOU PLEASE SOLVE MY QUERY? I AM GETTING ERRORS AGAIN AND AGAIN
0
votes
0 answers
INSERT INTO SELECT: mix between select column and plain values?
INSERT INTO "ApiToken" ("ownerId", token, name)
SELECT u.id, u."apiToken", "Default"
FROM "User" u
Here, I'd like "name" to be set to a plain value "Default", but the query interprets this as "getting the Default column from User":
column…

Baptiste Arnaud
- 2,522
- 3
- 25
- 55
0
votes
0 answers
Postgresql column not exists when trying to insert
DROP TABLE IF EXISTS workspace;
CREATE TABLE "workspace" (
"wk_space" VARCHAR(100) NOT NULL,
"token" TEXT,
PRIMARY KEY("wk_space", "token")
);
INSERT INTO "workspace" ("wk_space", "token") VALUES…

user8314628
- 1,952
- 2
- 22
- 46
0
votes
0 answers
Why does postgreSQL detect this line as a column name?
I'm doing this (Postgre)SQL excercize for a course i'm following; the objective is fairly simple i suppose:
Insert data into courses using the data provided. Make sure id is system generated.
for reference, this is the query to create said…
0
votes
0 answers
ERROR: column "USA" does not exist postgresql
I am new to posrgresql. I created a table called games where I have three columns: country, games, year. I am trying to insert some data to it using this code:
insert into games
values("USA", "Baseball", 2012),
("China", "Wrestling",…

Rashida
- 401
- 7
- 18
0
votes
1 answer
ORA-00984: column not allowed here - error at line 1 sql
SQL>CREATE TABLE student(ID INT, Name VARCHAR(20), Percentage INT,
Location VARCHAR(20), DateOfBirth DATE);
SQL> INSERT INTO student(ID, Name, Percentage, Location, DateOfBirth)
VALUES(1, "Manthan Koli", 79, "Delhi",…
0
votes
2 answers
Basic DELETE commands in PostgreSQL detecting value as column name
I'm trying to delete a row at PostgreSQL using pgAdmin4.
Here is my command:
DELETE FROM commissions_user
WHERE first_name = "Steven";
For some reason, the error states that
ERROR: column "Steven" does not exist
LINE 2: WHERE first_name =…

Steven Kristian
- 92
- 2
- 7
0
votes
2 answers
PostgreSQL query for emails with Apostrophe
I have a database table with email addresses with apostrophe such as "some.o'ne@somewhere.com".
I would like to:
Query this table, and check if this email address exist
insert this email address if it doesn't exist in the table
I tried:
SELECT *…

Ruby
- 1
- 1
0
votes
1 answer
How to use stored procedure parameter as the select column value in Postgres?
I'm trying to write a stored procedure in Postgres where I would use the parameter passed to the SP as a column value (not the column name) in a SELECT:
CREATE OR REPLACE PROCEDURE create_log
(_contractCode varchar,
_signedOn timestamp,
…

o..o
- 1,789
- 5
- 31
- 59