Viewing 15 posts - 21,226 through 21,240 (of 22,196 total)
Another vote for Visual Studio. Hook it into source control and then you get versions of your scripts too. Very handy when one of them suddenly breaks for no apparent...
January 15, 2008 at 12:34 pm
In addition to what Matt Miller is suggesting, you might verify that the data types of the parameters is the same as the data types of the columns. If you're...
January 15, 2008 at 12:33 pm
You have to understand, BOL is my best friend because I'm too darned stupid to remember stuff.
January 15, 2008 at 8:28 am
Oh, that's likely to be a bit tougher then. I'm not sure how you'd do this in 7.0 (haven't touched it in years and years).
January 15, 2008 at 7:12 am
Just note, it's 'sys.databases' not 'sysdatabases'. You need to get in the habit of looking at the catalog views, not the 2000 system tables.
January 15, 2008 at 7:03 am
You can use parameters within sp_executesql. Those parameters can be output parameters. You can set those values within the ad hoc query and output them from there and then set...
January 15, 2008 at 7:00 am
Probably a completely inadequate solution... but I wanted a little experiment this morning:
CREATE TABLE #DBList(DBName NVARCHAR(100))
DECLARE @Tablename NVARCHAR(100)
DECLARE @Tsql NVARCHAR(MAX)
DECLARE @DBName NVARCHAR(100)
DECLARE Cur CURSOR FOR
SELECT NAME
FROM [sys].databases;
SET @Tablename =...
January 15, 2008 at 6:52 am
I got them, but both were tagged as potential spam by our filter. Maybe that's where yours are?
January 15, 2008 at 6:11 am
AND, can't believe I forgot this, you need to look at the selectivity of the data in those columns to be sure an index will work well.
January 14, 2008 at 12:28 pm
First question I'd ask is, what are the additional search criteria? That will affect the index. Also, do you have clustered indexes already on these tables? If so, what columns?...
January 14, 2008 at 12:27 pm
From BOL:
Avoid using float or real columns in WHERE clause search conditions, especially the = and <> operators. It is best to limit float and real columns to > or...
January 14, 2008 at 12:19 pm
The problem with floats is that they are imprecise, by definition.
Sorry about the bit of misdirection. I used it against a decimal several times with no issue. Works well in...
January 14, 2008 at 11:58 am
Yes, you need to add wild cards. Instead of simply
LIKE '42'
make it instead
LIKE '42%'
January 14, 2008 at 11:21 am
There are a number of third party tools that can do this, for example Embarcadero's RapidSQL. You can also simply right click on the tables and get it for yourself....
January 14, 2008 at 11:17 am
Yes, that's exactly the type of auditing function that I had understood the OUTPUT function to be useful for. I just hadn't made the leap to using it with more...
January 14, 2008 at 8:21 am
Viewing 15 posts - 21,226 through 21,240 (of 22,196 total)