Viewing 15 posts - 6,196 through 6,210 (of 7,187 total)
Matt Miller (11/6/2007)
Mark Green (11/6/2007)
This code does not give me a random order of numbers. It just gives me them in numerical order. Albeit 10,000 times.
I'm not sure...
November 7, 2007 at 1:34 am
Mark
It's to save you having to use a cursor or loop. Row-by-row processing is nearly always less efficient than set-based processing in T-SQL, and the numbers table allows you...
November 6, 2007 at 7:45 am
...or maybe even
UPDATE Random_region_lookup_table
SET Place_key = CASE WHEN Entry_key%354 = 0 THEN 354
ELSE Entry_key%354 END
or
UPDATE Random_region_lookup_table
SET Place_key = (Entry_key - 1)%354 + 1
Either that or seed your identity at 0...
November 6, 2007 at 7:29 am
Mark
This isn't tested. It requires you to create a numbers (or tally) table called MyNumbers, with values up to at least 10,000. There's lots of discussion on this...
November 6, 2007 at 6:41 am
One way to do it is to use DROP PROCEDURE and CREATE PROCEDURE instead of ALTER PROCEDURE. Beware, though: you will need to grant permissions again if you do...
November 6, 2007 at 4:59 am
Dana
That's right. You can make them take account of the schema with a little more work. For example, in my second query, you'd do something like this:
IF EXISTS...
November 6, 2007 at 4:47 am
Mmm.. sounds like you're asking us to do the whole of your homework/prjoect work for you! What have you tried so far? Here's a hint: you can't use...
November 6, 2007 at 4:28 am
Dana
What don't you understand? By the way, I take it you're using SQL Server 2005? If so, better to go with this one:
IF EXISTS (
SELECT * FROM sys.objects
WHERE...
November 6, 2007 at 3:21 am
Try downloading the sysinternals suite (I think) from the Microsoft website. This will enable you to see exactly what is going on under the covers on your computer. ...
November 5, 2007 at 7:15 am
Check the path to the executable. Does the account you're logged in as have permission to run it? Also, check that the same account has permission to log...
November 5, 2007 at 7:02 am
Mark
My suggestion would be not to bother with an extra column, but instead to store that single extra value in a variable.
John
November 5, 2007 at 6:59 am
The only difference between a LEFT JOIN and an INNER JOIN is that there are some NULLs in the right-hand table where there are no matches with the values in...
November 3, 2007 at 6:13 pm
Perry
I think the problem is that the last line of your ANSI-compliant query effectively turns the join with order_sales into an inner join. You haven't posted any table structure,...
November 3, 2007 at 1:42 pm
Sentilnathan
It's not really a good idea from a security point of view to use sa for application use. But from a purely technical perspective, you should be able to...
November 3, 2007 at 5:26 am
Yes, you do. The account needs to have permissions on the share that you're copying to or from.
John
November 3, 2007 at 2:54 am
Viewing 15 posts - 6,196 through 6,210 (of 7,187 total)