Viewing 15 posts - 21,361 through 21,375 (of 26,484 total)
Bob Hovious (4/23/2009)
Where would one look for examples of bad SQL?
I can think of a poster child. I'll bet Lynn can too.
Bob, how about: SQL 2008, the sequel?...
April 23, 2009 at 10:35 am
I'd look at setting up a test DB here at work on our development server if everything could be put into a consolidated zip file. The server I have...
April 23, 2009 at 9:27 am
Click on the post # of the post. You can get a url like: http://www.sqlservercentral.com/Forums/FindPost702820.aspx. That one happens to be to you post asking how to it.
April 22, 2009 at 4:19 pm
I'm also looking for the test data as well.
April 22, 2009 at 4:10 pm
Is there a specific post where I can find the SQL to setup a test suite?
April 22, 2009 at 3:03 pm
What Lowell is talking about is using the view to update the underlying table. You can learn more about updateable views in Books Online. If your view meets...
April 22, 2009 at 8:46 am
Goldie Graber (4/22/2009)
Lynn Pettis (4/21/2009)
Goldie Graber (4/21/2009)
Bevan keighley (4/21/2009)
Hi Goldie,Do you have an index on UserID?
Yes, Non-Unique, Non-Clustered.
That is the problem. For the "quirky update" to work you need...
April 22, 2009 at 8:17 am
No setup code, just my code. I am including the code for both user-defined functions as well.
/****** Object: UserDefinedFunction [dbo].[ufn_Tally2] Script Date: 04/22/2009 08:02:45 ******/
SET...
April 22, 2009 at 8:06 am
Here is the sample data.
INSERT INTO dbo.BackgroundViews
SELECT '1/8/09 9:18:01',46636,17,15,8,'222.127.161.230'
UNION ALL
SELECT '1/8/09 9:18:02',46636,17,15,8,'82.109.68.165'
UNION ALL
SELECT '1/8/09 9:18:03',46636,17,15,8,'136.229.5.44'
UNION ALL
SELECT '1/8/09 9:18:04',46636,17,15,8,'62.2.187.21'
UNION ALL
SELECT '1/8/09 9:18:05',46636,17,15,8,'86.96.227.88'
UNION ALL
SELECT '1/8/09 9:18:06',23452,17,15,8,'86.96.228.86'
UNION ALL
SELECT '1/8/09 9:19:07',23452,17,15,8,'86.96.228.86'
UNION ALL
SELECT '1/8/09 9:18:08',46636,17,15,8,'202.79.203.51'
UNION...
April 22, 2009 at 7:40 am
real (4/21/2009)
Declare @price decimal(10,2)
SET @price = price_01 FROM prices
SET @rebate = rebate_01 FROM rebates
SET @shipping = shipping_01 FROM Shipping
With "hundred" of formulas.
.
.
.
As you can see, only the...
April 21, 2009 at 9:20 pm
Goldie Graber (4/21/2009)
Bevan keighley (4/21/2009)
Hi Goldie,Do you have an index on UserID?
Yes, Non-Unique, Non-Clustered.
That is the problem. For the "quirky update" to work you need a clustered index on...
April 21, 2009 at 9:16 pm
The only change to my code that I could suggest is 1) make sure you have declared the clustered index properly, and 2) change the index hint from 0 to...
April 21, 2009 at 9:09 pm
real (4/21/2009)
You understand the problem very well. The formulas are all the same in the 24 functions. The only thing that differ is the fields (price_01, 02, 03, etc).Thanks
Real
Awesome! ...
April 21, 2009 at 8:22 pm
Lynn Pettis (4/20/2009)
CREATE TABLE #CheckIn
(
CheckInID INT IDENTITY(1,1)
,UserID INT
,Comment VARCHAR(50)
)
-- insert some...
April 21, 2009 at 8:19 pm
Susan Moore (4/21/2009)
Thanks for your quick response. There was a trigger on the table that was giving me the error. I disabled it and now it works.
Triggers, yes,...
April 21, 2009 at 12:36 pm
Viewing 15 posts - 21,361 through 21,375 (of 26,484 total)