Viewing 15 posts - 5,266 through 5,280 (of 7,419 total)
You could check for ascii 0 in a the column like so:
WHERE
col1 LIKE '%' + CHAR(0) + '%'
January 16, 2015 at 3:18 pm
TheSQLGuru (1/16/2015)
Where ltrim(rtrim(col1)) = ''
I see this code ALL THE TIME at clients. Can someone tell me why both would be needed?? 😎
Why would either be "needed"? Just...
January 16, 2015 at 3:16 pm
halifaxdal (1/16/2015)
Lowell (1/16/2015)
halifaxdal (1/16/2015)
no way i know of to ignore errors, you have to explicitly use LEFT functions in the SELECT or something to work around this issue.
based on your...
January 16, 2015 at 3:11 pm
ALTER TABLE dbo.person_test2
ADD CONSTRAINT CK_ext
CHECK ( Pext LIKE REPLICATE('[0-9]', LEN(Pext)) )
January 16, 2015 at 3:06 pm
You really shouldn't need full securityadmin just to grant EXECUTE on a proc(s):
GRANT EXECUTE TO user1 WITH GRANT OPTION
January 16, 2015 at 3:01 pm
FILLFACTOR directs SQL on how full to make each page of data. 96% leaves 4% -- roughly 300 bytes -- free on each page to allow for new rows...
January 16, 2015 at 12:34 pm
Technically it should be left at 0, as that's more secure.
January 15, 2015 at 3:46 pm
The ROLLBACK could indeed cause an error if a transaction wasn't active at the time. Here's how to correct that:
IF XACT_STATE() <> 0
BEGIN
ROLLBACK;
END;
January 15, 2015 at 3:46 pm
You can use a PK or simply a UNIQUE constraint or index. For example:
CREATE UNIQUE CLUSTERED INDEX Student_Classes__CL
ON dbo.Student_Classes ( Student_ID, Class_ID ) WITH...
January 15, 2015 at 3:43 pm
T_Peters (1/14/2015)
January 14, 2015 at 4:28 pm
Or even another view. A view could also explicitly reference objects in a different db.
January 14, 2015 at 4:24 pm
Were the backups using compression before and are did not use compression last time for some odd reason?
January 14, 2015 at 4:21 pm
The complexity of the plan is also a factor in how much SQL weights keeping a plan in cache (by assigning more complex plans higher initial values).
Also, I believe ad-hoc...
January 14, 2015 at 4:01 pm
curious_sqldba (1/13/2015)
ScottPletcher (1/13/2015)
DECLARE @BatchSize int
DECLARE @RowRount int
DECLARE @TableRowCount int
DECLARE @TableRowLimit int
SET @BatchSize = 10000
SELECT @TableRowCount = COUNT(*)
FROM PtActs WITH (NOLOCK)
SET @TableRowLimit...
January 13, 2015 at 1:59 pm
RHJ (1/13/2015)
January 13, 2015 at 1:56 pm
Viewing 15 posts - 5,266 through 5,280 (of 7,419 total)