We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Submitted by: pfogel (pfogel)
Assigned to: @ArnoBrinkman
SFID: 1021931# Submitted By: pfogel
Hello, I was writing a computer program and wanted to UNION two tables. This is what I did and what worked fine:
SELECT '1' || columna FROM table1 UNION SELECT '2' || columnb FROM table2
But later I tried to do something similar like:
SELECT '1' || columna FROM table1 UNION SELECT '12' || columnb FROM table2
The difference is the number of chars inside the ''. The error I got was (I think it's a bug and should be working fine):
Invalid token. Dynamic SQL Error. SQL error code = -104. Invalid command. Data type unknown.
I also tried to cast the expressions as chars (which might have been a stupid idea):
SELECT CAST ('1' || columna AS CHAR) FROM table1 UNION SELECT CAST ('12' || columnb AS CHAR) FROM table2
the result was:
Arithmetic overflow or division by zero has occurred. arithmetic exception, numeric overflow, or string truncation.
I also tried to cast the expressions as varchars (which might have been a stupid idea as well):
SELECT CAST ('1' || columna AS VARCHAR) FROM table1 UNION SELECT CAST ('12' || columnb AS VARCHAR) FROM table2
Invalid token. Dynamic SQL Error. SQL error code = -104. Token unknown - line 1, char 64. ).
According to my SQL-Book "GoTo SQL" by Hernandez and Viescas these SELECTs should be working. That's why I think it might be a bug in firebird.
The Software/Hardware I'm using: - IBexpert 2004.06.17 (as a frontend) - Firebird 1.5.1.4481 - Windows XP Pro SP2 - AMD Athlon XP
Thank you very much for developing Firebird.
The text was updated successfully, but these errors were encountered:
Workflow: jira [ 10172 ] => Firebird [ 14387 ]
Sorry, something went wrong.
QA Status: No test
status: Closed [ 6 ] => Closed [ 6 ]
QA Status: No test => Done successfully
No branches or pull requests
Submitted by: pfogel (pfogel)
Assigned to: @ArnoBrinkman
SFID: 1021931#
Submitted By: pfogel
Hello,
I was writing a computer program and wanted to UNION
two tables. This is what I did and what worked fine:
SELECT '1' || columna FROM table1
UNION
SELECT '2' || columnb FROM table2
But later I tried to do something similar like:
SELECT '1' || columna FROM table1
UNION
SELECT '12' || columnb FROM table2
The difference is the number of chars inside the ''.
The error I got was (I think it's a bug and should be
working fine):
Invalid token.
Dynamic SQL Error.
SQL error code = -104.
Invalid command.
Data type unknown.
I also tried to cast the expressions as chars (which
might have been a stupid idea):
SELECT CAST ('1' || columna AS CHAR) FROM table1
UNION
SELECT CAST ('12' || columnb AS CHAR) FROM table2
the result was:
Arithmetic overflow or division by zero has occurred.
arithmetic exception, numeric overflow, or string
truncation.
I also tried to cast the expressions as varchars (which
might have been a stupid idea as well):
SELECT CAST ('1' || columna AS VARCHAR) FROM table1
UNION
SELECT CAST ('12' || columnb AS VARCHAR) FROM table2
the result was:
Invalid token.
Dynamic SQL Error.
SQL error code = -104.
Token unknown - line 1, char 64.
).
According to my SQL-Book "GoTo SQL" by Hernandez and
Viescas these SELECTs should be working. That's why I
think it might be a bug in firebird.
The Software/Hardware I'm using:
- IBexpert 2004.06.17 (as a frontend)
- Firebird 1.5.1.4481
- Windows XP Pro SP2
- AMD Athlon XP
Thank you very much for developing Firebird.
The text was updated successfully, but these errors were encountered: