Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error on script with current_date [CORE1875] #2306

Closed
firebird-automations opened this issue Apr 30, 2008 · 5 comments
Closed

Error on script with current_date [CORE1875] #2306

firebird-automations opened this issue Apr 30, 2008 · 5 comments

Comments

@firebird-automations
Copy link
Collaborator

Submitted by: Zhuldyz (joolio)

DDL:

SET SQL DIALECT 3;

SET NAMES WIN1251;

CREATE TABLE NEW_TABLE (
F1 VARCHAR(30),
F2 VARCHAR(30),
F3 VARCHAR(30),
DATA_REG DATE
);

Error on script:

EXECUTE BLOCK(
IN_F1 VARCHAR(30) = :IN_F1,
IN_F2 VARCHAR(30) = :IN_F2,
IN_F3 VARCHAR(30) = :IN_F3)
AS
BEGIN
IF (NOT(EXISTS(SELECT * FROM NEW_TABLE NT WHERE NT.F1=:IN_F1 AND NT.F2=:IN_F2 AND NT.DATA_REG=CURRENT_DATE))) THEN
BEGIN
END ELSE
BEGIN
END
END

Server closes connection on script:

EXECUTE BLOCK(
IN_F1 VARCHAR(30) = :IN_F1,
IN_F2 VARCHAR(30) = :IN_F2,
IN_F3 VARCHAR(30) = :IN_F3)
AS
BEGIN
IF (NOT(EXISTS(SELECT * FROM NEW_TABLE NT WHERE NT.F1=:IN_F1 AND NT.F2=:IN_F2 AND NT.DATA_REG=CAST(CURRENT_DATE AS DATE) ))) THEN
BEGIN
END ELSE
BEGIN
END
END

No problem on script, eg:

EXECUTE BLOCK(
IN_F1 VARCHAR(30) = :IN_F1,
IN_F2 VARCHAR(30) = :IN_F2,
IN_F3 VARCHAR(30) = :IN_F3)
AS
BEGIN
IF (NOT(EXISTS(SELECT * FROM NEW_TABLE NT WHERE NT.F1=:IN_F1 AND NT.F2=:IN_F2 AND NT.DATA_REG='dd.mm.yyyy'))) THEN
BEGIN
END ELSE
BEGIN
END
END

Commits: 359b18a a1b0886 62b5c64 d5e68f6

@firebird-automations
Copy link
Collaborator Author

Modified by: @hvlad

assignee: Vlad Khorsun [ hvlad ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @hvlad

status: Open [ 1 ] => Resolved [ 5 ]

resolution: Fixed [ 1 ]

Fix Version: 2.5 Alpha 1 [ 10224 ]

Fix Version: 2.1.1 [ 10223 ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @pcisar

status: Resolved [ 5 ] => Closed [ 6 ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @pavel-zotov

QA Status: No test

@firebird-automations
Copy link
Collaborator Author

Modified by: @pavel-zotov

status: Closed [ 6 ] => Closed [ 6 ]

QA Status: No test => Done successfully

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants