Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Exporting to Excel
Message
De
10/10/2021 19:11:49
 
 
À
10/10/2021 16:53:10
Thomas Ganss (En ligne)
Main Trend
Frankfurt, Allemagne
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Autre
Divers
Thread ID:
01682467
Message ID:
01682477
Vues:
37
>>This works. But, what does it do exactly?
>
>Uses Belt, Suspenders and Chastity girdle to force a string, as your
>CHAR(34)+'Hello'+CHAR(10)+'World'+CHAR(34)
>worked, but Replace() failed and eliminates side effects perhaps caused by your replace as well
>.
>So using only functions which in wee times of differing SQL dialects either were missing or already were guaranteed to be working on strings only should do the same - if some very old code allowed replace to do other things as well, that might cause hickups or the replacement worked like wrong SQL injection.
>
>Curious minds might now abolish some parts of working statement
>CHAR(34)+substring(" " +Table.Field, 2, 999999)+CHAR(34)
>CHAR(34)+rtrim(Table.Field)+CHAR(34)
>CHAR(34)+cast(Table.Field as ...)+CHAR(34)
>CHAR(34)+stuff(Table.Field, with no working, "whatever")+CHAR(34)
>CHAR(34)+stuff(Table.Field, working, "whatever")+CHAR(34)
>
>to discern a pattern ;-)
>
>Of course sometimes my gut hunches are correct and my mental reasoning after the fact is totally off base. It is a weird way to operate if you are normally proud on the workings of the matter between your ears...

Thanks
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform