ERROR for '@' for function

Started by Sachin Srivastavaabout 10 years ago3 messagesgeneral
Jump to latest
#1Sachin Srivastava
ssr.teleatlas@gmail.com

How to handle this below situation, I am getting error for function, my
Postgres version is 9.4
is

ERROR: syntax error at or near "@"
LINE 67: AUTONUMBERSETTING@REPOS.BIRCHSTREET.NET
^
********** Error **********
ERROR: syntax error at or near "@"
SQL state: 42601
Character: 3274

------------------------

BEGIN
select NEXT_NUMBER into STRICT id from
AUTONUMBERSETTING@REPOS.BIRCHSTREET.NET
--pbeach_repos8.AUTONUMBERSETTING
where subscriber_id=subscriber and AUTO_NUMBER_ID=348 and company_id=
buyer;
exception
when no_data_found then
insert into
smerror_log(error_log_id,subscriber_id,company_id,error_message,system_message,
method_name,creation_date,creation_user,update_date,update_user)
values (nextval('smerror_log_sequence'),subscriber,buyer,'Auto Number
not found',null,
'PunchoutProfile' ,LOCALTIMESTAMP,'Admin',LOCALTIMESTAMP,'Admin');
commit;
return;
end;

-------------------------------

#2Thomas Kellerer
spam_eater@gmx.net
In reply to: Sachin Srivastava (#1)
Re: ERROR for '@' for function

Sachin Srivastava schrieb am 20.01.2016 um 12:42:

How to handle this below situation, I am getting error for function, my Postgres version is 9.4
is

ERROR: syntax error at or near "@"
LINE 67: AUTONUMBERSETTING@REPOS.BIRCHSTREET.NET <mailto:AUTONUMBERSETTING@REPOS.BIRCHSTREET.NET>
^
********** Error **********
ERROR: syntax error at or near "@"
SQL state: 42601
Character: 3274

Well, AUTONUMBERSETTING@REPOS.BIRCHSTREET.NET is an invalid identifier.
A "@" is not allowed as part of a table name.

You need to enclose that in double quotes:

SELECT ...

#3Sachin Srivastava
ssr.teleatlas@gmail.com
In reply to: Thomas Kellerer (#2)
Re: ERROR for '@' for function

Thanks Thomas !!!

Now, it's working fine.

On Wed, Jan 20, 2016 at 5:18 PM, Thomas Kellerer <spam_eater@gmx.net> wrote:

Show quoted text

Sachin Srivastava schrieb am 20.01.2016 um 12:42:

How to handle this below situation, I am getting error for function, my

Postgres version is 9.4

is

ERROR: syntax error at or near "@"
LINE 67: AUTONUMBERSETTING@REPOS.BIRCHSTREET.NET <mailto:

AUTONUMBERSETTING@REPOS.BIRCHSTREET.NET>

^
********** Error **********
ERROR: syntax error at or near "@"
SQL state: 42601
Character: 3274

Well, AUTONUMBERSETTING@REPOS.BIRCHSTREET.NET is an invalid identifier.
A "@" is not allowed as part of a table name.

You need to enclose that in double quotes:

SELECT ...
FROM "AUTONUMBERSETTING@REPOS.BIRCHSTREET.NET"

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general