Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
AskSQLTeam
Ask SQLTeam Question
0 Posts |
Posted - 2006-12-11 : 07:56:37
|
| manjiri writes "i want to show Uniqueidentifier generated by SQL in tha labelbut it is giving me an error that is "Cast from GUID to string is invalid". What should i do now? " |
|
|
spirit1
Cybernetic Yak Master
11752 Posts |
Posted - 2006-12-11 : 08:02:36
|
guid.ToString() ??Go with the flow & have fun! Else fight the flow blog thingie: http://weblogs.sqlteam.com/mladenp |
 |
|
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2006-12-11 : 08:14:11
|
| []In SQL Server, you do as this[/b]select cast(newid() as varchar(36))What language are you using?Peter LarssonHelsingborg, Sweden |
 |
|
|
harsh_athalye
Master Smack Fu Yak Hacker
5581 Posts |
Posted - 2006-12-11 : 08:16:45
|
Casting to string? which specific data type? where?This works on my box:declare @u uniqueidentifierset @u = newid()select cast(@u as varchar(100)) Harsh AthalyeIndia."The IMPOSSIBLE is often UNTRIED" |
 |
|
|
|
|
|