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...
To ignore the time part, use this syntax, rather than CONVERT: WHERE DATEADD(DAY, DATEDIFF(DAY, 0, UpdateDate), 0) > DATEADD(DAY, DATEDIFF(DAY, 0,...
The use of bit-wise comparison is a clever programming technique, but unfortunately in a database it is counterproductive because the Metadata column...
You have a statement SELECT TOP(10000) * FROM tmp_Table This returns a list of 10000 rows from tmp_table. So what was your question again?
"proper indexing has been created on the table and fields" You don't mention if there's a Primary Key defined, or at the very least a unique...
Why not start by looking at the errors you're getting, and try to work out what is going wrong. Then when there are specific details that you need...
Separate names with a comma.