Viewing 15 posts - 1,876 through 1,890 (of 3,957 total)
ChrisM@Work (3/7/2013)
March 7, 2013 at 5:49 am
Without knowing a little more about what exactly your functions return, this is just a shot in the dark:
INSERT INTO @TEMP_EXPORT
SELECT *
FROM [dbo].[#TSC_ExportedColumnIds] a
CROSS APPLY [dbo].[udf_TSC_qry_ExportBlockColumnParam1](@COLUMN_ID) b
WHERE a.ColumnType...
March 7, 2013 at 5:34 am
Lynn Pettis (3/6/2013)
Really?? You have to be kidding.
I'm tempted to violate my mantra and post a script that dumps all table names into a temp table and then CURSORs through...
March 6, 2013 at 10:25 pm
Lynn Pettis (3/6/2013)
Well, I've just seen...
March 6, 2013 at 9:38 pm
Lynn Pettis (3/5/2013)
dwain.c (3/5/2013)
Lynn Pettis (3/5/2013)
You know Dwain, now if we could just get you to use the semicolon as a terminator instead of a begininator! 😛
Lynn - I'm...
March 6, 2013 at 1:42 am
Lynn Pettis (3/5/2013)
You know Dwain, now if we could just get you to use the semicolon as a terminator instead of a begininator! 😛
Lynn - I'm 100% with you...
March 5, 2013 at 8:48 pm
Greg Snidow (3/5/2013)
March 5, 2013 at 6:30 pm
Steven Willis (3/5/2013)
SELECT
...
March 5, 2013 at 6:24 pm
You can use the staggered row number approach to get this:
CREATE TABLE #empleaves(
[empid] [int] NULL,
[leavedate] [date] NULL
) ON [PRIMARY]
GO
INSERT #empleaves ([empid], [leavedate]) VALUES (1, CAST(0xCE360B00 AS Date))
INSERT #empleaves...
March 5, 2013 at 5:43 pm
The ghostly apparition of the third parameter to ROUND makes its spooky appearance. :w00t:
So here's various solutions except for Sergiy's showing they all work and timing results for 2 (my...
March 5, 2013 at 5:47 am
You can try this:
CREATE TABLE #Analysis
(
ID INT IDENTITY,
Margin [numeric](21, 6) NULL,
Gallons INT,
Freight [numeric](21, 6) NULL,
AccMargin [numeric](21, 6) NULL)
INSERT INTO #Analysis ( Margin,Gallons,Freight)
SELECT 0.050220,5022,-30.180000
INSERT INTO #Analysis ( Margin,Gallons,Freight)
SELECT 0.050220,-5022,318.260000
UPDATE #Analysis
SET AccMargin...
March 4, 2013 at 6:32 pm
tota00 (3/4/2013)
March 4, 2013 at 6:21 pm
I for one offer you kudos for your affinity for speed Jeff.
I formally confess that I tried for awhile yesterday to come up with something faster to no avail. ...
March 4, 2013 at 5:49 pm
If you can update it through the CTE (your option 2) it might be better. It may be necessary to reverse the order of the JOINed tables, i.e., make...
March 4, 2013 at 5:46 pm
Try it like this:
DECLARE @test1 TABLE (letter varchar(1))
INSERT INTO @test1(letter) VALUES('a')
INSERT INTO @test1(letter) VALUES('b')
INSERT INTO @test1(letter) VALUES('c')
INSERT INTO @test1(letter) VALUES('d')
INSERT INTO @test1(letter) VALUES('a')
INSERT INTO @test1(letter) VALUES('a')
INSERT INTO @test1(letter) VALUES('d')
INSERT INTO...
March 4, 2013 at 1:48 am
Viewing 15 posts - 1,876 through 1,890 (of 3,957 total)