Viewing 15 posts - 50,791 through 50,805 (of 59,098 total)
I haven't tried it, but I believe your problem is in the following code...
DECLARE @MaxRecipeId as INT
SELECT @MaxRecipeId = MAX(RecipeId )
FROM Recipe Where LocationId =1
It should...
--Jeff Moden
Change is inevitable... Change for the better is not.
May 3, 2008 at 12:57 am
I don't suppose you did a search on "running total" or anything like that... 😉
There's a lot of ways to solve the running total problem in SQL Server... they're all...
--Jeff Moden
Change is inevitable... Change for the better is not.
May 3, 2008 at 12:50 am
Here's the proof...
DROP TABLE jbmtest
go
SELECT TOP 1000000
RowNum = IDENTITY(INT,1,1),
...
--Jeff Moden
Change is inevitable... Change for the better is not.
May 3, 2008 at 12:47 am
And, I gotta tell you, 2n for CHAR, VARCHAR, and NVARCHAR size doesn't make a bit of difference because row size isn't any multiple of 2n (ie. 8060) and neither...
--Jeff Moden
Change is inevitable... Change for the better is not.
May 3, 2008 at 12:39 am
I'd have to say a lot of that depends on two things...
1. How important is the data? In other words, do you actually want the data to be...
--Jeff Moden
Change is inevitable... Change for the better is not.
May 3, 2008 at 12:33 am
No, the order is predictable especially if you supress parallelism with MAXDOP... please see the following article...
http://www.sqlservercentral.com/articles/Advanced+Querying/61716/
... and just say "NO" to cursors 😛
--Jeff Moden
Change is inevitable... Change for the better is not.
May 3, 2008 at 12:17 am
Heh... yeech... you can use a cursor, if you like... here's your's with the fix...
DECLARE @MyCmd VARCHAR(100)
declare @database nvarchar(128)
declare mycursor CURSOR LOCAL
FOR select name from master.dbo.sysdatabases where dbid>5
OPEN mycursor
fetch...
--Jeff Moden
Change is inevitable... Change for the better is not.
May 3, 2008 at 12:01 am
Yes there is... you will need to build a BCP Format File, but it's worth it for the sheer speed of Bulk Insert...
The format file would look something like this...
8.0
4
1...
--Jeff Moden
Change is inevitable... Change for the better is not.
May 2, 2008 at 11:20 pm
Hi Bill,
I'm a little confused by the data you've posted. Take a look at the URL I carry in my signature line... providing data and table info in that...
--Jeff Moden
Change is inevitable... Change for the better is not.
May 2, 2008 at 8:43 pm
Simon_L (5/1/2008)
Jeff Moden (5/1/2008)
Ok... thanks... just trying to figure it all out... I think that's the last piece. I'll see what I can do tonight.thanks Jeff appreciated 🙂
Sorry, Simon......
--Jeff Moden
Change is inevitable... Change for the better is not.
May 2, 2008 at 8:41 pm
Not with 60 points in 79 visits, you haven't 😉
--Jeff Moden
Change is inevitable... Change for the better is not.
May 2, 2008 at 8:37 pm
Sorry, my mistake... you don't need a CASE at all...
DECLARE @DemoTable TABLE (Amount VARCHAR(15))
INSERT INTO @DemoTable (Amount)
SELECT '$102.50' UNION ALL
SELECT '-$57.75'
SELECT REPLACE(STR(ABS(CAST(Amount AS MONEY)*100.0),8),' ','0')
...
--Jeff Moden
Change is inevitable... Change for the better is not.
May 2, 2008 at 8:20 pm
Don't need a case statement to figure the zero's...
DECLARE @DemoTable TABLE (Amount VARCHAR(15))
INSERT INTO @DemoTable (Amount)
SELECT '$102.50' UNION ALL
SELECT '-$57.75'
SELECT REPLACE(STR(ABS(CAST(Amount AS MONEY)*100.0),8),' ','0')
...
--Jeff Moden
Change is inevitable... Change for the better is not.
May 2, 2008 at 8:16 pm
You want projects to practice on? Why go anywhere else... stay on this forum and start answering questions. You won't find a better or more diverse set of...
--Jeff Moden
Change is inevitable... Change for the better is not.
May 2, 2008 at 7:55 pm
So, turn it on... end of proc trace takes no overhead and beats the heck out of modifying 300+ procs 🙂
--Jeff Moden
Change is inevitable... Change for the better is not.
May 2, 2008 at 7:16 pm
Viewing 15 posts - 50,791 through 50,805 (of 59,098 total)