Viewing 15 posts - 43,726 through 43,740 (of 49,571 total)
Sure. This is the classic example
CREATE PROCEDURE AllOrSearch (
@SomeCode VARCHAR(30) = NULL
)
AS
IF @ID is null
SELECT * FROM SomeTable
ELSE
SELECT * FROM SomeTable WHERE SomeColumn = @SomeCode
If on...
October 16, 2008 at 12:12 pm
If it's an identity, why are the users allowed to enter a number? With identities, SQL allocates the numbers, not the client app. Also, with an identity, if a row...
October 16, 2008 at 12:05 pm
Have a look at uniqueidentifier with the newsequentialguid default. It may do what you want with no modifications at all.
October 16, 2008 at 11:55 am
Marcia Q (10/16/2008)
October 16, 2008 at 11:33 am
The maint plan that checks ingegrity runs checkDB. There's no need for a manual job if the maint plan's doing it
October 16, 2008 at 11:30 am
DBADave (10/16/2008)
October 16, 2008 at 11:29 am
What you're considering isn't possible unless you have access to the source code of the SQL engine itself. There's no procedure that's called to insert rows into a table. Even...
October 16, 2008 at 8:06 am
Since you're reading all rows and all columns from the table (select * with no where clause), there is no way to get that particular query faster. It has...
October 16, 2008 at 8:02 am
This is a SQL Server site, not a MySQL site. You may have better luck at somewhere like dbforums
October 16, 2008 at 7:58 am
Reuse of a number has nothing to do with indexes. I'm guessing it's an identity column. Is that so?
Why do you want to be able to reuse numbers that have...
October 16, 2008 at 7:55 am
Well, if someone's shrunk your TempDB database down, it's certainly going to have an effect. Fix that and see if it makes a difference.
There's a lot of paralleling going on...
October 16, 2008 at 7:47 am
though, is there a ROWID function in Sql Server?
Not directly, no. The closest is the identity column and the ROW_NUMBER function, though neither is a direct replacement.
You can't easily get...
October 16, 2008 at 2:49 am
There's a chapter on it in "Inside SQL Server 2005: T-SQL Querying"
October 16, 2008 at 2:38 am
krayknot (10/16/2008)
BACKUP LOG WITH TRUNCATE_ONLY
Noting, of course, that Backup log will break the log chain. It will no be possible to restore to a...
October 16, 2008 at 1:55 am
Viewing 15 posts - 43,726 through 43,740 (of 49,571 total)