Viewing 15 posts - 6,196 through 6,210 (of 7,191 total)
Ties
No, but you can create a user-defined function instead. Look in Books Online for CREATE FUNCTION.
John
November 9, 2007 at 4:11 am
You can script it using sp_configure (I think), or you can use the GUI. It's all in the documentation if you search for it. Set up a test...
November 9, 2007 at 2:23 am
Look at the SQL Server Properties (Security Tab) topic in (the most recent version of) SQL Server 2000 Books Online.
John
November 9, 2007 at 2:04 am
Well, if you have a standard installation it's Start -> All Programs -> Microsoft SQL Server 2005 -> Documentation and Tutorials -> SQL Server Books Online. It's all on...
November 8, 2007 at 1:44 am
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
Viewing 15 posts - 6,196 through 6,210 (of 7,191 total)