Viewing 15 posts - 58,126 through 58,140 (of 59,067 total)
Yep... I concur with PW... "Create or Replace" is definitely Oracle code and the string functions available are quite different in SQL Server.
So, which do you need, Oracle Code or...
--Jeff Moden
Change is inevitable... Change for the better is not.
June 13, 2006 at 11:22 pm
Oh, yeah... almost forgot... you can get a list of available collations using the following code...
SELECT *
FROM ::fn_helpcollations()
--Jeff Moden
Change is inevitable... Change for the better is not.
June 13, 2006 at 11:19 pm
Yes...
My recommendation (for U.S. installations) is to select a collation that is Dictionary Order, Case Insensitive (CI) and Accent Sensitive (AS). This will normally be done during installtion of the server...
--Jeff Moden
Change is inevitable... Change for the better is not.
June 13, 2006 at 11:18 pm
It's in Books Online under [Create Index] but here's a quick example for what you want to do...
CREATE UNIQUE NONCLUSTERED INDEX index_name
ON tablename (columnlist)
--Jeff Moden
Change is inevitable... Change for the better is not.
June 13, 2006 at 11:03 pm
No... you can query the SysObjects table directly although Microsoft recommends against doing that because they may change the table name (I believe they did in 2005).
--Jeff Moden
Change is inevitable... Change for the better is not.
June 13, 2006 at 10:58 pm
Make your code refer to a "linked server" and use a 4 part naming convention everywhere in your code. Then, you can just repoint the linked server at whatever box...
--Jeff Moden
Change is inevitable... Change for the better is not.
June 13, 2006 at 10:56 pm
Sometimes, as in your case, you have to ask "Why" someone can't use the answer provided because they haven't explained themselves correctly... I imagine you get that alot 
--Jeff Moden
Change is inevitable... Change for the better is not.
June 13, 2006 at 9:51 pm
If you don't know how many rows will be deleted, you can do something like this...
SET ROWCOUNT 5000 SELECT 1 --"Primes" the rowcount so the loop works WHILE @@ROWCOUNT...
--Jeff Moden
Change is inevitable... Change for the better is not.
June 13, 2006 at 6:55 pm
Shoot... I'm a little outside my league on this one... I'll tell you this, though... if you run this from a command prompt...
OSQL -L
... and it doesn't list the server...
--Jeff Moden
Change is inevitable... Change for the better is not.
June 13, 2006 at 6:40 pm
Hadn't thought about that... if the DB was NOT properly detached, the procedure for recovery is quite long. It's do-able, but ya gotta hold your mouth just right while you're...
--Jeff Moden
Change is inevitable... Change for the better is not.
June 13, 2006 at 6:12 pm
I've found that "UPDATE x WITH (ROWLOCK)" does very little in containing SQL Server's escalation of locks to rows instead of pages or extents. It sure doesn't hurt to have...
--Jeff Moden
Change is inevitable... Change for the better is not.
June 13, 2006 at 6:03 pm
Yep... knew that about the conversion and SN... like others, I normally avoid float because of it's binary limitations on accuracy. Because I avoid it, I didn't even think that...
--Jeff Moden
Change is inevitable... Change for the better is not.
June 13, 2006 at 7:05 am
Why? What's the problem with that method? The "other user should not come to know"...
--Jeff Moden
Change is inevitable... Change for the better is not.
June 12, 2006 at 10:23 pm
Does the MDF or LDF have the "Read Only" attribute set?
--Jeff Moden
Change is inevitable... Change for the better is not.
June 12, 2006 at 9:53 pm
Without having to first script the table creation, this would work... very well, very fast, and without any interference...
SELECT * INTO newtablename FROM oldtablename WITH (NOLOCK)
The only thing it...
--Jeff Moden
Change is inevitable... Change for the better is not.
June 12, 2006 at 9:45 pm
Viewing 15 posts - 58,126 through 58,140 (of 59,067 total)