Decode URL encoded characters in inline table valued function?Inline table-valued function vs inline sqlT-SQL...
How can guns be countered by melee combat without raw-ability or exceptional explanations?
Using font-relative distances in tikzpictures
Identical projects by students at two different colleges: still plagiarism?
Why does this quiz question say that protons and electrons do not combine to form neutrons?
How to modify 'inter arma enim silent leges' to mean 'in a time of crisis, the law falls silent'?
80-bit collision resistence because of 80-bit x87 registers?
Why is airport car rental so cheap
Last Reboot commands don't agree
Aligning Systems of Equations
Build ASCII Podiums
SQL Server 2017 crashes when backing up because filepath is wrong
Is it possible to detect 100% of SQLi with a simple regex?
Smallest possible mole
Why would you use 2 alternate layout buttons instead of 1, when only one can be selected at once
Is it ethical to apply for a job on someone's behalf?
Does the Holy Ark weigh 4 tons?
Cryptic cross... with words
Does the Resurrection spell consume material components if the target isn’t willing to be resurrected?
Why is Bernie Sanders maximum accepted donation on actblue $5600?
How should I ship cards?
Was the Soviet N1 really capable of sending 9.6 GB/s of telemetry?
What did Putin say about a US deep state in his state-of-the-nation speech; what has he said in the past?
Are encryption algorithms with fixed-point free permutations inherently flawed?
What is the difference between crontab -e and nano /etc/crontab?
Decode URL encoded characters in inline table valued function?
Inline table-valued function vs inline sqlT-SQL View — How to 'pre-fetch' schema using scalar function, then populate using table queryHow to determine the data type of all fields in a result set in SSDT?CROSS APPLY on Scalar functionWhy scalar valued functions need execute permission rather than select?Table valued function VS Stored procedureCommon TVF in SQL server to get results from differnt schemaTable Valued UDF vs Stored Proc for passing values to a SELECT statementEfficiency of Scalar UDF vs TVFForced serialization on inline table valued function
I'm looking for a inline table valued function that decodes URL encoded characters (like %20 for space). reference
I see other functions but haven't seen one that is an inline table valued function. I'm tempted in just writing a bunch of REPLACE statements in a function but I'm wondering if there's a better way.
CREATE FUNCTION dbo.itvfURLDecode
(
@StringValue VARCHAR(MAX)
)
RETURNS TABLE
AS
RETURN (
SELECT REPLACE(REPLACE(@StringValue,'%2B','+'),'%20',' ') /* etc..*/ AS DecodedValue
)
;WITH cteData AS
(
SELECT 'This%2Bis%20a%20test%3C%3E%20ok%3F%20100%25' AS example
)
SELECT
example, q.DecodedValue /* returns: This+is a test<> ok? 100% */
FROM cteData c
CROSS APPLY dbo.itvfURLDecode(example) q
sql-server sql-server-2017
add a comment |
I'm looking for a inline table valued function that decodes URL encoded characters (like %20 for space). reference
I see other functions but haven't seen one that is an inline table valued function. I'm tempted in just writing a bunch of REPLACE statements in a function but I'm wondering if there's a better way.
CREATE FUNCTION dbo.itvfURLDecode
(
@StringValue VARCHAR(MAX)
)
RETURNS TABLE
AS
RETURN (
SELECT REPLACE(REPLACE(@StringValue,'%2B','+'),'%20',' ') /* etc..*/ AS DecodedValue
)
;WITH cteData AS
(
SELECT 'This%2Bis%20a%20test%3C%3E%20ok%3F%20100%25' AS example
)
SELECT
example, q.DecodedValue /* returns: This+is a test<> ok? 100% */
FROM cteData c
CROSS APPLY dbo.itvfURLDecode(example) q
sql-server sql-server-2017
add a comment |
I'm looking for a inline table valued function that decodes URL encoded characters (like %20 for space). reference
I see other functions but haven't seen one that is an inline table valued function. I'm tempted in just writing a bunch of REPLACE statements in a function but I'm wondering if there's a better way.
CREATE FUNCTION dbo.itvfURLDecode
(
@StringValue VARCHAR(MAX)
)
RETURNS TABLE
AS
RETURN (
SELECT REPLACE(REPLACE(@StringValue,'%2B','+'),'%20',' ') /* etc..*/ AS DecodedValue
)
;WITH cteData AS
(
SELECT 'This%2Bis%20a%20test%3C%3E%20ok%3F%20100%25' AS example
)
SELECT
example, q.DecodedValue /* returns: This+is a test<> ok? 100% */
FROM cteData c
CROSS APPLY dbo.itvfURLDecode(example) q
sql-server sql-server-2017
I'm looking for a inline table valued function that decodes URL encoded characters (like %20 for space). reference
I see other functions but haven't seen one that is an inline table valued function. I'm tempted in just writing a bunch of REPLACE statements in a function but I'm wondering if there's a better way.
CREATE FUNCTION dbo.itvfURLDecode
(
@StringValue VARCHAR(MAX)
)
RETURNS TABLE
AS
RETURN (
SELECT REPLACE(REPLACE(@StringValue,'%2B','+'),'%20',' ') /* etc..*/ AS DecodedValue
)
;WITH cteData AS
(
SELECT 'This%2Bis%20a%20test%3C%3E%20ok%3F%20100%25' AS example
)
SELECT
example, q.DecodedValue /* returns: This+is a test<> ok? 100% */
FROM cteData c
CROSS APPLY dbo.itvfURLDecode(example) q
sql-server sql-server-2017
sql-server sql-server-2017
asked 6 mins ago
GabeGabe
4331918
4331918
add a comment |
add a comment |
0
active
oldest
votes
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "182"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fdba.stackexchange.com%2fquestions%2f230430%2fdecode-url-encoded-characters-in-inline-table-valued-function%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
Thanks for contributing an answer to Database Administrators Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fdba.stackexchange.com%2fquestions%2f230430%2fdecode-url-encoded-characters-in-inline-table-valued-function%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown