It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 10 years ago.
I have a column (nvarchar(255)) and I'm looking to trim, to just display the name
Input
22;#Simon Smith
103;#John Doe
34;#Sarah Jones
1;#Robert Snow
...
Output Required
Simon Smith
John Doe
Sarah Jones
Robert Snow
Assuming ;# is always present, this should do the trick:
select substring('22;#Simon Smith', charindex(';#', '22;#Simon Smith')+2, 255)
Now you'll need to update your table:
update tablename
set columnname = substring(columnname, charindex(';#', columnname)+2, 255)
Replace tablename and columnname with the right values.
SELECT
RIGHT(YOUR_COLUMN, LEN(YOUR_COLUMN) - CHARINDEX('#', YOUR_COLUMN))
FROM YOUR_TABLE
Related
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 9 years ago.
La> ila>ha illAlla>hu wah}dahu> la> shari>ka lahu, lahul mulku wa lahul h}amdu, wa huwa ‘ala> kulli shai’in nadir.
This is transliteration of ayah. The font used is Times New Arabic . After applying this font i didn't see any changes.Characters like ">" didn't disappears. any solution?
use
NSString *ayah = #"La> ila>ha illAlla>hu wah}dahu> la> shari>ka lahu, lahul mulku wa lahul h}amdu, wa huwa ‘ala> kulli shai’in kadir.";
ayah = [ayah stringByReplacingOccurrencesOfString:#">"
withString:#""];
ayah = [ayah stringByReplacingOccurrencesOfString:#"}"
withString:#""];
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 10 years ago.
I am working on an iOS application. In this application I am trying to convert NSString to hexadecimal. But in some cases NSString contains special $, ¥, etc. This is where I am facing problem. These characters don't convert to hexadecimal.
Is there any way to convert special characters to hexadecimal?
Convert the string to NSData
[NSString dataUsingEncoding:]
Then using the data object you can output any base you want: octal, hex, decimal, binary.
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 11 years ago.
How can I decode unicode characters from an URL?. I specified response.charset="UTF-8" in my request, and I received unicode characters like %e3%81%a4%e3%82%8c%e3%. How can I convert these to something I can display on my form?
RFC 3986 specifies how to interpret this. You first decode the percent-escaped byte values in the standard way. Then you interpret the byte stream as UTF-8 to reconstruct the characters. You can find more information here.
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 10 years ago.
As seen here, they have the line ZG9udGJlYWhhdGVyc3RhcnR1cCtoYWNrZXJuZXdzQGdtYWlsLmNvbQ==.
How would one go about decoding this line of Base64?
Base64-decode it. For example, put it in this online decoder: http://www.opinionatedgeek.com/dotnet/tools/base64decode/
BTW this is not encryption, it's encoding.
This is a simple base64 encoding, one way to decode it is to use openssl
echo 'ZG9udGJlYWhhdGVyc3RhcnR1cCtoYWNrZXJuZXdzQGdtYWlsLmNvbQ==' | openssl base64 -d
Use a base64 decoder. Or - specify a language you would like to use and I can give you some example code.
BTW: I decoded this using this online decoder:
http://www.convertstring.com/EncodeDecode/Base64Decode
It decodes to
dontbeahaterstartup+hackernews#gmail.com
Base64 encoding is explained here: Base64 decoder
ZG9udGJlYWhhdGVyc3RhcnR1cCtoYWNrZXJuZXdzQGdtYWlsLmNvbQ== => dontbeahaterstartup+hackernews#gmail.com
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 12 years ago.
I'm totally confused which one to use and when, first thing I do when something goes wrong in code with a slash is replace the one with other so my test cases double with one for / and one for \ .Help me to get the logic behind slashes.
From the wikipedia article about the backslash:
Bob Bemer introduced the \ character
into ASCII, on September 18, 1961, as
the result of character frequency
studies. In particular the \ was
introduced so that the ALGOL boolean
operators "∧" (AND) and "∨" (OR) could
be composed in ASCII as "/\" and "/"
respectively.[4] Both these operators
were included in early versions of the
C programming language supplied with
Unix V6 , Unix V7 and more currently
BSD 2.11.
/ is generally used to denote division as in 10/2 meaning 10 divided by 2. \ is generally used as an escape character as in \t or \n representing a tab and a newline character respectively.
There's nothing like a "forward slash". There's a "slash" / and a "backslash" \.
There's a long and IMHO ilarious discussion about that on the xkcd forum
One More Thing....
The Forward Slash / is Used in *nix To Navigate to the Filesystem...
Like .... /root/home/vs4vijay
and The BackSlash \is Used In Windows ...
Like ..... F:\Games\CounterStrike