public inbox for [email protected]
help / color / mirror / Atom feedFrom: Arbol One <[email protected]>
To: Adrian Klaver <[email protected]>
To: PostGreSQL MailingList <[email protected]>
Subject: Re: Help with syntax error
Date: Sun, 1 Dec 2024 19:21:44 -0500
Message-ID: <BYAPR12MB2808D148D08980B590F5286DBA352@BYAPR12MB2808.namprd12.prod.outlook.com> (raw)
In-Reply-To: <[email protected]>
References: <BYAPR12MB2808DF98728597CE430A9B3DBA352@BYAPR12MB2808.namprd12.prod.outlook.com>
<[email protected]>
😳 OOOOO, I feel so dumb, that I find it so funny!!
Thanks man!!!
I need to step away from the computer for a while, I think fatigue is
getting the best of me.
On 2024-12-01 7:17 p.m., Adrian Klaver wrote:
> On 12/1/24 16:14, Arbol One wrote:
>> I have these tables:
>>
>> *CREATE TABLE IF NOT EXISTS registrar (
>> index SERIAL,
>> registrar_id TEXT,
>> day TEXT NOT NULL,
>> month TEXT NOT NULL,
>> year TEXT NOT NULL,
>> hour TEXT NOT NULL,
>> minute TEXT NOT NULL,
>> second TEXT NOT NULL,
>> millisecond TEXT NOT NULL,
>> am_pm TEXT NOT NULL,
>> admin BOOLEAN NOT NULL DEFAULT false,
>> CONSTRAINT key PRIMARY KEY (registrar_id) );
>>
>> CREATE TABLE IF NOT EXISTS user_name (
>> user_name_id TEXT PRIMARY KEY REFERENCES registrar(registrar_id),
>> first_name TEXT NOT NULL,
>> middle_name TEXT NOT NULL,
>> last_name TEXT NOT NULL);*
>>
>> When I enter the following pg commands :
>>
>> *INSERT INTO registrar VALUES (DEFAULT, '18551420601012L23', '1',
>> '12', '2024', '18', '55', '14', '207', 'PM');
>> INSERT INTO user_name '18551420601012L23', 'John', 'Fitzgerald',
>> 'Kennedy'); <= **/UserNameTable.write()/*
>>
>
> You don't see the difference between the first and second statements.
>
> Hint, it starts with V.
>
>> I get this message :
>>
>> */Exception in thread "main" java.sql.SQLException: In
>> company.contact.Company$UserNameTable.write()
>> ERROR: syntax error at or near "'18551420601012L23'"
>> Â Â Position: 23/
>> *
>>
>> The error is in the user_name_id, which is a primary that references
>> the table "*registrar*" 's "*registrar_id" *primary key.
>> According to the documentation
>> <https://www.postgresql.org/docs/current/tutorial-fk.html;, the
>> insertion should be OK, no?
>>
>> What am I doing wrong?
>>
>>
>> --
>> */ArbolOne â„¢/*
>> Using Fire Fox and Thunderbird.
>> ArbolOne is composed of students and volunteers dedicated to
>> providing free services to charitable organizations.
>> ArbolOne's development on Java, PostgreSQL, HTML and Jakarta EE is in
>> progress [ Ã ]
>
--
*/ArbolOne â„¢/*
Using Fire Fox and Thunderbird.
ArbolOne is composed of students and volunteers dedicated to providing
free services to charitable organizations.
ArbolOne's development on Java, PostgreSQL, HTML and Jakarta EE is in
progress [ Ã ]
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected]
Subject: Re: Help with syntax error
In-Reply-To: <BYAPR12MB2808D148D08980B590F5286DBA352@BYAPR12MB2808.namprd12.prod.outlook.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox