| Author |
Topic |
|
duhaas
Constraint Violating Yak Guru
310 Posts |
Posted - 2006-08-08 : 09:36:17
|
| Not sure what I am missing or how to determine whats different, but it appears I can insertQDC-MPP as one value in a primary keyandQDC-MPP as another value, one value was typed in, the other value was copied/pasted in, what am i missing, how do i tell whats really different? when i try to type in the value QDC-MPP after its already in the table i get the error, when i paste it, i dont??? |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2006-08-08 : 09:52:11
|
is there any unprintable code some where in the value ? Or is it the value is of different case and your table is case sensitive ? KH |
 |
|
|
duhaas
Constraint Violating Yak Guru
310 Posts |
Posted - 2006-08-08 : 11:03:40
|
| Thats a great question, I can tell you that the table isnt case sensitive, and am not sure how to look for the unprintable code? Any help would be greatly appreciated |
 |
|
|
Arnold Fribble
Yak-finder General
1961 Posts |
Posted - 2006-08-08 : 11:44:09
|
| Wild guess: the thing that looks like a hyphen is a different character in each. |
 |
|
|
Michael Valentine Jones
Yak DBA Kernel (pronounced Colonel)
7020 Posts |
Posted - 2006-08-08 : 11:51:26
|
quote: Originally posted by duhaas Thats a great question, I can tell you that the table isnt case sensitive, and am not sure how to look for the unprintable code? Any help would be greatly appreciated
select a.MyKey, -- Convert Key to binary to see actual characters. MyKeyBinary = convert(varbinary(100),a.MyKey)from MyTable awhere a.MyKey like '%QDC%MPP%'order by a.MyKey CODO ERGO SUM |
 |
|
|
duhaas
Constraint Violating Yak Guru
310 Posts |
Posted - 2006-08-08 : 13:14:25
|
| you da man! |
 |
|
|
mahesh_bote
Constraint Violating Yak Guru
298 Posts |
Posted - 2006-08-10 : 09:04:27
|
| can't we convert binary data into another datatype. i.e. in varchar etc.e.g.Select Convert(VarBinary(1000), 'SQL')o/p--------0x53514Cnow i want to do...Select Convert(VarChar(1000), '0x53514C')o/p--------0x53514Crequired o/p--------SQLit returns the same value. how can i get o/p of binavry values to characters or another datatype?thank in advance,Mahesh |
 |
|
|
harsh_athalye
Master Smack Fu Yak Hacker
5581 Posts |
Posted - 2006-08-10 : 09:12:02
|
quote: Originally posted by mahesh_bote can't we convert binary data into another datatype. i.e. in varchar etc.e.g.Select Convert(VarBinary(1000), 'SQL')o/p--------0x53514Cnow i want to do...Select Convert(VarChar(1000), '0x53514C')o/p--------0x53514Crequired o/p--------SQLit returns the same value. how can i get o/p of binavry values to characters or another datatype?thank in advance,Mahesh
Sure...just remove the quotes around the hex value...like thisSelect Convert(VarChar(1000), 0x53514C) Harsh AthalyeIndia."Nothing is Impossible" |
 |
|
|
mahesh_bote
Constraint Violating Yak Guru
298 Posts |
Posted - 2006-08-10 : 09:19:13
|
| ZAKKAS |
 |
|
|
|