You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
SELECT CAST(a ASDECIMAL(16, 2)) AS f
SELECT CAST(a ASDECIMAL (162)) AS f
I have tried to change the code to add a delim to fix this problem, but I am not sure at all it is the right way to go about this.
I will open a pull request to show what I tried and would appreciate if someone who knows the codebase could have a look.
thanks!
The text was updated successfully, but these errors were encountered:
nicoder
added a commit
to nicoder/PHP-SQL-Parser
that referenced
this issue
Nov 6, 2018
without this change, parsing and then re-creating a SQL query casting a
field as a decimal loses the comma in the decimal
for example `DECIMAL (16,2)` became `DECIMAL (16 2)`
added a `delim` in `ExpressionListProcessor`, when have a comma token,
as is done in `SelectProcessor#process`.
not sure if this is the right way to proceed,
and if it is it might need to be done in other places.
hi,
If I parse a SQL query containing
CAST (foo AS DECIMAL(16, 2))
,and then create a query with the creator,
it loses the comma in
DECIMAL(16, 2)
test code :
output:
I have tried to change the code to add a
delim
to fix this problem, but I am not sure at all it is the right way to go about this.I will open a pull request to show what I tried and would appreciate if someone who knows the codebase could have a look.
thanks!
The text was updated successfully, but these errors were encountered: