or rather (localhost)
Also, have you tried (HOSTNAME) ?
Two things come to mind, (1) multiple network cards on the SQL Server machine (2) something I remember as "reverse IP lookup" - try a search
Use a temporary table. Insert all your partial results there, then at the end of your script just select from your temp table.
Use DISTINCT, and use NOT EXISTS correlated subquery. Search Books Online for the
Well, you could take the suggestion seriously, and do a search here on the forums for "parameter sniffing". Seriously. You'll be surprised.
Smells like the old parameter sniffing problem.
Db probably has "SIMPLE" recovery mode. As suggested, set up regular backups of the log, with truncation.
If you do SELECT * with two or more tables in the FROM clause, then all columns from all tables will be shown. In a regular query, that is not really...
If you do, you do. And if you don't, you don't. What was your question, again?
Split up the search term: your table variable should have separate fields to match the fields in your ITEM table. The concatenation in your criteria...
Are the queries really that simple? If you run the same queries from Enterprise Manager, do you get the same (odd) results? If you get the proper...
Try writing the query exactly as you describe it. Seems like you're starting off with the selection criteria, so the first part of your description...
Such a shame that you have a perfectly normalized table, and someone wants the information shown in a rather clumsy way (one row per group, and...
That would appear to confirm that no primary key or unique index existed. Adding a clustered index on a table without a primary key or unique index...
Separate names with a comma.