Viewing 15 posts - 1,366 through 1,380 (of 1,472 total)
I'm afraid you're going to have to explain what you're looking for a little better. See the link in my signature for some tips on asking questions / posting...
October 16, 2008 at 11:45 am
Probably:
CPU
Reads
Writes
Duration
Number of total rows you are working with
Number of rows being replaced by the function. (Number of NULLS)
Nuber of rows in the final output.
Execution plan
October 16, 2008 at 11:06 am
SELECT *
FROM mytable
WHERE SUBSTRING(mydata,10,1) = 'F' AND SUBSTRING(mydata,11,1) IN ('1','2','3','4','5')
October 16, 2008 at 11:02 am
If you want multiple values in the list format you stated, you cannot. However, if you convert it to a local table variable and use that instead, you can...
October 16, 2008 at 9:12 am
Not entirely accurate:
[font="Courier New"]USE NorthWind
DECLARE @A TABLE(
NameLetter VARCHAR(20))
INSERT INTO @A(NameLetter)
SELECT 'M' UNION ALL
SELECT 'J'
DECLARE @B VARCHAR(20)
SET @B = 'R'
DECLARE @C VARCHAR(20)
SET @C = 'First'
SELECT *
FROM Employees
WHERE LEFT(FirstName,1) IN (@B)...
October 16, 2008 at 6:20 am
While my subquery seems to fit all that criteria, I'm not sure that it's creating a triangular join in this case. The subquery method is blazingly fast, it was...
October 15, 2008 at 6:49 pm
*considers a world without aliases*
...
*dies a little inside*
...
*goes to get a beer*
October 15, 2008 at 6:36 pm
In re-reading this, it seems you only want to go 1(Rows from T1 not in T2) way, not both ways. That's even easier.
I would do this as
SELECT T1.*
FROM Table1...
October 15, 2008 at 3:11 pm
This should be fairly easily accomplished with a couple of outer joins. Please post some table definitions / sample data according to the link in my signature and I'd...
October 15, 2008 at 2:44 pm
Thanks Matt, and good catch. I guess that's the downside of having perfectly ordered test data =).
October 15, 2008 at 12:21 pm
Not allowed to use loops or cursors? I like that =). Add this after #DailyBalance is generated.
[font="Courier New"]ALTER TABLE #DailyBalance
ALTER COLUMN RowNum INT NOT NULL
ALTER TABLE #DailyBalance
ALTER COLUMN...
October 15, 2008 at 12:00 pm
This solution is a variation of Jeff Moden's Running Total Technique, which can be found here:
http://www.sqlservercentral.com/articles/Advanced+Querying/61716/
This is the setup for this solution, please post sample data in this fashion in...
October 15, 2008 at 11:19 am
Oh yeah, that's much better than letters =). Jeff might have been doing this for so long that he just intuitively grasps it all, but I still need my...
October 15, 2008 at 8:25 am
This still seems like a semi-poor way to do it, but I believe a very long case statement would probably beat out your 135 update statements.
EG:
UPDATE large_table
SET...
October 15, 2008 at 7:15 am
And if you have something like:
1 A B C
2 A D...
October 14, 2008 at 10:52 pm
Viewing 15 posts - 1,366 through 1,380 (of 1,472 total)