Skip to Content (Press Enter)
OutSystems.com
Personal Edition
Community
Support
Training
Training
Online Training
Developer Schools
Boot Camps
Certifications
Tech Talks
Documentation
Documentation
Overview
ODC
O11
Forums
Forge
Get Involved
Get Involved
Jobs
Ideas
Members
Mentorship
User Groups
Platform
Platform
ODC
O11
Search in OutSystems
Log in
Get Started
Back to Forums
J.
MVP
134
Views
2
Comments
backslash issue in advanced query sqlserver
Question
SQL
Database
Hi,
I need to compare a value in the database which contains a backslash.
so my query looks like this
SELECT {User}.[Name], {User}.[Username], 'FOO\' + @Somename
FROM {User}
WHERE {User}.[Username] = 'FOO\' + @Somename
however, the backslash will be generated as double backslash.
so the compare always fails.
how to fix this?
J.
MVP
well, bit puzzled myself and ended up with this
SELECT {User}.[Name], {User}.[Username]
FROM {User}
WHERE {User}.[Username] = 'FOO'+ char(92) + @Somename
Kilian Hekhuis
MVP
Yeah, that works. Alternatively, you could pass "FOO\" as a separate parameter or add it to @Somename if that's the only use of it.
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
See the full guidelines
Loading...