| Author |
Topic |
|
learntsql
524 Posts |
Posted - 2010-01-06 : 06:19:14
|
| Hi..How to retrieve some special characters as those are stored in dblike &,< using.when i try to read & its showing as & |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2010-01-06 : 06:27:22
|
| sorry didnt get that. whats the datatype of field? |
 |
|
|
learntsql
524 Posts |
Posted - 2010-01-06 : 06:35:31
|
| nvarchar(MAX) |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2010-01-06 : 06:37:21
|
| then it should have any problem. whats it displaying when you try to select column? |
 |
|
|
learntsql
524 Posts |
Posted - 2010-01-06 : 06:52:46
|
| when i try to read "&" its showing as & followed by amp; |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2010-01-06 : 06:56:41
|
| the try to print taking its ascii value |
 |
|
|
learntsql
524 Posts |
Posted - 2010-01-06 : 07:08:22
|
| sorry i didnt get.u mean & ascii value or what. |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2010-01-06 : 07:11:25
|
| does you field store them as a big string or does it just store character alone? |
 |
|
|
learntsql
524 Posts |
Posted - 2010-01-06 : 07:16:39
|
| It is stored as part big stringeg: The Audit is done by Agarwal & Meebo. |
 |
|
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2010-01-06 : 07:42:31
|
Are you retreiving the character to an XML variable? N 56°04'39.26"E 12°55'05.63" |
 |
|
|
learntsql
524 Posts |
Posted - 2010-01-06 : 08:03:09
|
| no,directly retrieving column in select statement. |
 |
|
|
webfred
Master Smack Fu Yak Hacker
8781 Posts |
Posted - 2010-01-06 : 08:05:14
|
Only to be sure.Where do you display the &-sign - in SSMS query window or somewhere else (HTML-Page)? No, you're never too old to Yak'n'Roll if you're too young to die. |
 |
|
|
learntsql
524 Posts |
Posted - 2010-01-06 : 08:08:03
|
| I use stored procedure and binds it to Report. |
 |
|
|
webfred
Master Smack Fu Yak Hacker
8781 Posts |
Posted - 2010-01-06 : 08:18:36
|
Is the problem also existent when displaying the result of your stored proc in SSMS? No, you're never too old to Yak'n'Roll if you're too young to die. |
 |
|
|
learntsql
524 Posts |
Posted - 2010-01-06 : 08:23:53
|
| Yes even in SSMS. |
 |
|
|
webfred
Master Smack Fu Yak Hacker
8781 Posts |
Posted - 2010-01-06 : 08:31:44
|
Maybe it is dislayed as it is stored in the table.Try to see what happens if youre column is retrieved as follows:replace(your_colum,'unwanted code here','&') as your_column unwanted code= & plus amp; No, you're never too old to Yak'n'Roll if you're too young to die. |
 |
|
|
learntsql
524 Posts |
Posted - 2010-01-06 : 23:54:42
|
| Whne i retrieve that column directly its showing correct,but when i use this column in stored procedure its showing wrong text as above posts.the same problem is for < and > symbols too. |
 |
|
|
learntsql
524 Posts |
Posted - 2010-01-07 : 00:09:57
|
quote: Originally posted by Peso Are you retreiving the character to an XML variable? N 56°04'39.26"E 12°55'05.63"
Sorry Peso.In my Stored procedure to build this column i am using "STUFF" and "FOR XML PATH('')".What would be the problem. |
 |
|
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2010-01-07 : 01:12:42
|
Yes.Try adding the "TYPE" declarative. N 56°04'39.26"E 12°55'05.63" |
 |
|
|
learntsql
524 Posts |
Posted - 2010-01-07 : 01:43:51
|
| Thank you.sorry i didnt get.any sample code please. |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2010-01-07 : 01:49:01
|
| see last part herehttp://bradsruminations.blogspot.com/2009/11/xml-paths-of-glory.html |
 |
|
|
Next Page
|