I take it, these two commands should work:
UPDATE Items
SET InStock = CAST( InStock.PhysicalStock AS VARCHAR) + '|' + CAST( InStock.SystemStock*.9 AS VARCHAR)
WHERE InStock.PhysicalStock < InStock.SystemStock
UPDATE Items
SET InStock = CAST( InStock.SystemStock*.9 AS VARCHAR) + '|' + CAST( InStock.PhysicalStock AS VARCHAR)
WHERE InStock.PhysicalStock < InStock.SystemStock
No stopping stupid mistakes. (At least, without transactions.) Clunky way of getting what you want. No intellesense in SQL. SQL is generally case insensitive, would InStock.systemstock work? INSTOCK.SystemStock? What kind of error for InStock.SystemStoc? If you aliased a table as InStock and joined it with this table, would it work? If so, would you have to prefix the InStock struct with it's table name?
This command should fail?:
UPDATE Items
SET InStock.SystemStock = InStock.SystemStock*.9
WHERE InStock.PhysicalStock < InStock.SystemStock
but could work if the set property was defined?
UDTs are always value types, not reference types?
When reading into a DataTable, if you include the namespace for the Struct, will it automatically include that type in the data adapter? Even with earlier versions of .NET?