Viewing 15 posts - 12,526 through 12,540 (of 13,459 total)
I'm assuming that on this document, it looks something like this based on your original post.
You would want to add something similar in blue; note how i removed the...
Lowell
August 7, 2007 at 9:11 am
I don't think the issue is with Conn.Execute where it is calling that stored proc.
I think you have a statement after Conn.execute that is referencing a recordset (notes maybe?) that...
Lowell
August 6, 2007 at 8:01 am
here's one of many ideas you'll get:
since you have the SQL, put it in query analyzer and get the estimated execution plan.(control K in QA)
look at the plan and see...
Lowell
August 3, 2007 at 12:33 pm
usually select @@SERVERNAME wil return what you are looking for. if it were a n instance, like MYSERVER\SQL2005, it would be the part before the slash.
Lowell
August 3, 2007 at 7:01 am
the status column is used a s a bitfield mask to query whether an index is clustered,unique, etc.
the status of zero is going to mean false for all indexproperties; it...
Lowell
August 3, 2007 at 6:59 am
ok i see the difference.... I was concentrating on max field size, , so my version would simply find the largest used column size a for the MaxActualLength.each max size...
Lowell
August 2, 2007 at 6:06 am
of course someone already had done this, so I didn't follow the rabbit down the hole to reinvent the wheel;
here's a link:
http://sqljunkies.com/WebLog/amachanic/archive/2005/01/25/6897.aspx
Lowell
August 1, 2007 at 11:54 am
the script does...just look for anything with an DefinedSize greater than 8060:
create table BadExample(
varint int,
var1 varchar(8000),
var2 varchar(8000),
var3 varchar(8000),
var4 varchar(8000))
insert into BadExample(varint,var1,var2,var3,var4) values (1,'sometext','more text than before','etc,etc',null)
you get this on creation and insert:
Warning: The...
Lowell
July 31, 2007 at 6:08 am
I'm going to start a [Bankers Rounding] is the [Best Practice] thread now.
Lowell
July 30, 2007 at 6:16 pm
Nice Jeff; your version does a much better job of analysis and presenting a basisi for improvements to someone's schema, i like it.
Lowell
July 30, 2007 at 7:13 am
Thanks Jeff; I'm sure you are right...I should initialize the MaxActualLength with the values from syscolumns, and then update...makes the comparison much better.
You contribute a lot to SSC; thanks!
I also...
Lowell
July 28, 2007 at 5:49 am
ok how about this:
it gives results that look something like this:
there is also an underlying table ##tmp, where you can see which columsn are defined but never used
Lowell
July 27, 2007 at 11:38 am
Sugesh getting a program to call them all is pretty easy...the problem is usually dependancy issues....you know, script 42 has to be run after some other specific scripts, something in...
Lowell
July 27, 2007 at 10:24 am
here you go; a snippet i made a while back:
create table ##tmp (TableName varchar(100),DefinedRowSize int)
exec sp_msforeachtable 'INSERT INTO ##TMP Select ''?'' As TableName, SUM(C.Length) as Length from dbo.SysColumns C where...
Lowell
July 27, 2007 at 10:15 am
Note that I'm assuming you have a table named States which has the abbreviation and the long description of the state:
SELECT FirstName, LastName, City, region, country, ModuleTitle,[FileName]
FROM
(SELECT MAX(CASE WHEN ppd.propertyName = 'FirstName' THEN up.propertyValue END) AS FirstName,
MAX(CASE WHEN ppd.propertyName = 'LastName' THEN up.propertyValue END) AS LastName,
MAX(CASE WHEN ppd.propertyName = 'City' THEN up.propertyValue END) AS City,
MAX(CASE WHEN ppd.propertyName = 'region' THEN St.StateAbbrev END) AS region,
MAX(CASE WHEN ppd.propertyName = 'Country' THEN up.propertyValue END) AS country,
up.UserID, l.clickdate, t.UrlType,m.ModuleTitle, f.FileName,u.Email
FROM ProfilePropertyDefinition AS ppd
INNER JOIN UserProfile AS up ON up.PropertyDefinitionID = ppd.PropertyDefinitionID
INNER JOIN UrlLog l ON up.UserID = l.UserID
INNER JOIN Users u ON u.UserID = l.UserID
RIGHT OUTER JOIN UrlTracking t ON l.UrlTrackingID = t .UrlTrackingID
LEFT OUTER JOIN Modules m ON t .ModuleId = m.ModuleID
LEFT OUTER JOIN Files f ON REPLACE(t .Url, 'FileID=', '') = f.FileId
LEFT OUTER JOIN STATES st ON up.propertyValue = St.StateDescription
GROUP BY
up.UserID,
u.Email,
l.clickdate,
t.UrlType,
m.ModuleTitle, f.FileName) d
WHERE (FirstName IS NOT NULL)
AND (LastName IS NOT NULL)
AND (clickdate BETWEEN '2007 - 07 - 21' AND '2007 - 07 - 28')
AND (UrlType = 'F')
and [FileName] like '%.zip%
Lowell
July 25, 2007 at 12:32 pm
Viewing 15 posts - 12,526 through 12,540 (of 13,459 total)