Viewing 15 posts - 31 through 45 (of 50 total)
Hey now, my response demonstrated that several hours before you found that other site.
🙂
For the same reason, the line that reads
WHEN -1 THEN DATALENGTH(c.text)
should read
WHEN -1 THEN DATALENGTH(c.text)...
October 6, 2008 at 6:55 am
Perhaps to strip off comments around the actual command text?
Replace the top line of your query with
/* test */SELECT a.session_id,
a.statement_start_offset AS StartO,
a.statement_end_offset AS...
October 3, 2008 at 8:05 am
In my case, I was joining on the primary key. Maybe I missed something, but I didn't have to do any totaling, and pivot was light years faster for me....
October 1, 2008 at 8:16 am
Because joining on the same table multiple times can be slow, you may want to try SQL2005's pivot, something like...
SELECT iCompanyID AS Company, [Name],
[417] AS [417 Number],
[416] AS...
October 1, 2008 at 7:51 am
Have you looked up the record based on the returned primary key?
(As Jack points out based on your snippet, if it is returning a primary key, then it is performing...
September 30, 2008 at 7:29 am
James, just to be sure we're comparing apples to apples...
If you're putting the IP address in the config file, then it needs to be of the form "IPAddress\InstanceName," not just...
September 11, 2008 at 6:49 am
Is your "cart" pointing to a different SQL instance (maybe on a different machine) from where sql manager is pointing (live versus staging, perhaps)? Your "cart" appears to be pointing...
September 10, 2008 at 10:44 am
Re-reading your original submission, are you updating the products table, or updating some other table?
September 10, 2008 at 10:05 am
I've upgraded from express to standard with no similar error, so I have some suggestions along a different line.
What happens when you execute "Select mcpartnum from products"?
* Are you...
September 10, 2008 at 8:31 am
How about adding a column in #DriveSpace called PrevSpaceUsed
and updating it as needed with the data to compare against?
This is rough SQL code for comparing against the preceding...
September 4, 2008 at 12:45 pm
An alternate check that may or may not help in your situation (and is decent with encrypted sprocs) is to check the create or modified dates:
Use MyDB
SELECT name, create_date, modify_date
FROM...
August 29, 2008 at 12:52 pm
To let them view without ability to change the sproc, how about creating a db role and granting permission to view definitions:
-- Point to the DB with the sprocs to...
August 29, 2008 at 12:28 pm
Is there a unique index on the tables? If so, what fields comprise it? (Or, is there a way to tell if a record is in both files without comparing...
July 24, 2008 at 11:23 am
With your current solution, you could add "SET NOCOUNT ON" as the first line of your input file to suppress the "number of rows affected" messages. Also, "osql /?" will...
July 24, 2008 at 7:30 am
If you reallywant to do this in SQL...
This'd be UGLY, but for the first query, you could union 50 occurrences of your statement with a tweak (your original code indented...
July 22, 2008 at 9:25 am
Viewing 15 posts - 31 through 45 (of 50 total)