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

fix sql templates #1645

Open
Medienkunzt opened this issue May 15, 2024 · 0 comments
Open

fix sql templates #1645

Medienkunzt opened this issue May 15, 2024 · 0 comments
Assignees

Comments

@Medienkunzt
Copy link
Contributor

Currently, several templates in our playground use CHAR(50) as a datatype. Unfortunately, this datatype fills empty characters with whitespace. As a result, queries such as attr LIKE 'D%d' yield no results, even though there are entries with 'Dortmund'. This occurs because the LIKE operator considers the trailing spaces as part of the string.

To address this issue, we need to change all instances of CHAR(xx) to VARCHAR(xx) in our database templates. The VARCHAR datatype does not pad strings with trailing spaces, which will resolve the issue with the LIKE operator.

Additionally, we have identified cases where inserted data has trailing spaces, such as "Berlin ". These instances need to be cleaned up by trimming the trailing spaces from the affected data.

--> Code

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