|  | Posted by Neil on 10/31/05 04:56 
After I got your note I did go ahead and make MachName nchar, as BOL says that HOST_NAME() returns that type, and the sample it showed of storing its
 return value in a table used an nchar(30) field.
 
 The InvtrySelections table had the PK (ID/MachName) as the clustered index.
 I created a second index on MachName alone, and it made it the clustered
 index.
 
 With the above two changes, the results were the same. Still getting
 "#Deleted".
 
 Neil
 
 
 "Erland Sommarskog" <esquel@sommarskog.se> wrote in message
 news:Xns970061F02065Yazorman@127.0.0.1...
 > Neil (nospam@nospam.net) writes:
 >> SELECT INVTRY.*, InvtrySelections.Sel, InvtrySelections.MachName
 >> FROM dbo.INVTRY INNER JOIN
 >>     dbo.InvtrySelections ON
 >>     dbo.INVTRY.ID = dbo.InvtrySelections.ID
 >> WHERE (dbo.InvtrySelections.MachName = HOST_NAME())
 >
 > Now that I see the entire view, I repeat what I said before: make
 > MachName nvarchar, and put the clustered index on this column.
 >
 >
 > --
 > Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se
 >
 > Books Online for SQL Server SP3 at
 > http://www.microsoft.com/sql/techinfo/productdoc/2000/books.asp
 >
 [Back to original message] |