Reputation
612
Top tag
Next privilege 1,000 Rep.
See votes, expandable usercard
Badges
5 15
Impact
~20k people reached

  • 0 posts edited
  • 1 helpful flag
  • 2 votes cast
Dec
19
awarded  Popular Question
Dec
4
accepted What's the relationship between Documents, XSDs and Collections?
Dec
4
asked What's the relationship between Documents, XSDs and Collections?
Dec
2
asked Do differing table schemas under a partitioning view preclude writability?
Nov
16
awarded  Yearling
Nov
12
revised Can FOR XML PATH return NULL for an empty resultset?
Extra Example
Nov
12
comment Can FOR XML PATH return NULL for an empty resultset?
It was a mistake to use null in my example. I clarified above based on your suggestion.
Nov
12
revised Can FOR XML PATH return NULL for an empty resultset?
Clarified Problem
Nov
12
asked Can FOR XML PATH return NULL for an empty resultset?
Nov
7
asked Is there a FOR XML variant that can add attributes with arbritrary values?
Oct
24
comment How to deploy XSD from SQLCLR?
You can make a standard c# visual studio project to create SQLCLR objects, including procedures, functions and types. Just copy the resulting assembly to the SQL Server and use CREATE ASSEMBLY in tsql. However, it appears that schema definitions can only be deployed through database projects. Database projects maddening disallow embeddedresources, so xml documents can't be included in a project as standalone files. They have to be added to a class as string literals, which just horrid. I Quit.
Oct
20
comment How to deploy XSD from SQLCLR?
No I currently have a simple c# class project that builds an assembly, which I deploy by hand. A SSDT-BI 'database project' is not the same as what I have and presents other questions beyond this one. I still haven't found an answer.
Oct
20
comment How to deploy XSD from SQLCLR?
Apparently XSDs can be deployed as part of a 'Database Project' in VS.
Oct
20
asked How to deploy XSD from SQLCLR?
Sep
10
comment How to convert unsigned int accidentally stored as signed int?
cs.cornell.edu/~tomf/notes/cps104/twoscomp.html
Sep
10
comment How to convert unsigned int accidentally stored as signed int?
I can get close with a bitwise AND and adding one.
Sep
10
comment How to convert unsigned int accidentally stored as signed int?
I'm getting from the query as written above and it returns those two values. If I run the this - select CONVERT(binary,-29440) I get a different result.
Sep
10
comment How to convert unsigned int accidentally stored as signed int?
The source system is no longer available. See comment above. I'm pretty sure all the bits from the source came over, but the representation is weird. It was a cobol app- who knows what it was doing in that field.
Sep
10
comment How to convert unsigned int accidentally stored as signed int?
I have to obfuscate. The field is a small int in SQL Server. It was populated from an outside source system under the presumption that it was the same as a Sql Server int. Clearly that's not the case. However, the 8D value is 141 in hex so there's some way to get back to the correct value. This is some sort of twos-complement math that I must have slept through.
Sep
10
comment How to convert unsigned int accidentally stored as signed int?
select MyField as foo,convert(binary,MyField) as bar