Viewing 15 posts - 556 through 570 (of 1,131 total)
Already had the SQL statements for 2005 where transaction log space is excluded.
selectFilePageCnt, ReservedPageCnt, ( FilePageCnt - ReservedPageCnt)as FreePageCnt
,FileKb, ReservedKb, ( FileKb- ReservedKb)as FreeKb
,FileMb, ReservedMb, ( FileMb- ReservedMb)as FreeMb
,FileGb, ReservedGb,...
SQL = Scarcely Qualifies as a Language
December 2, 2007 at 6:25 am
I have a number of recommendation.
1. Do not attempt to join the result set of a stored procedure to another table. Instead combine the SQL from the stored procedure...
SQL = Scarcely Qualifies as a Language
December 1, 2007 at 8:07 am
Take a look at Celko's "SQL Programming Style" where applicable to your question is section 1.2.3 "Avoid Descriptive Prefixes".
Who is the person specifying this convention? If they do not...
SQL = Scarcely Qualifies as a Language
December 1, 2007 at 7:19 am
Here are some statments for SQL Server 2005.
IF OBJECT_ID('tempdb..#DatabaseUsers') is not null drop table #DatabaseUsers
create table #DatabaseUsers
(DatabaseNamesysname not null
,DatabaseUserNamesysname not null
,LoginNamesysname null
)
-- sys.database_principals.type is S = SQL user, U =...
SQL = Scarcely Qualifies as a Language
November 30, 2007 at 10:31 am
Writing to a file from SQL is not supported, so you will need to use one of the SQL Server add-on services.
How is the process to write the file being...
SQL = Scarcely Qualifies as a Language
November 21, 2007 at 8:01 pm
Defaults only will take affect if the columns are not included in the insert statement. When you include the columns in the insert statement that means you are also...
SQL = Scarcely Qualifies as a Language
November 19, 2007 at 10:09 am
Here is a solution with no cursors, no variable, no temporary tables, no functions, no identity/sequence columms, and no update statements. Just add a create view. Weekends are...
SQL = Scarcely Qualifies as a Language
November 16, 2007 at 3:53 pm
Regarding "Tip #6 - Triggers execute with the permissions of the user", this is not completely correct. Given the example with tables Contact and ContactHistory and a trigger on...
SQL = Scarcely Qualifies as a Language
November 13, 2007 at 7:49 am
Does table ACCPAC_FedEx_Middleware.dbo.tbl_ORDER have a unique clustered index ?
If not, then the table is a "heap" and the SQL Server algorithms to determine where to physically insert the row may...
SQL = Scarcely Qualifies as a Language
November 11, 2007 at 6:13 am
Here is a simple solution:
, DaysDelay as (CASE WHEN SubmitDate IS NULL OR Duedate IS NULL OR Duedate <= SubmitDate then 0
else DATEDIFF(dd,SubmitDate,Duedate) END )
, TotalFines as (FinePerDay *...
SQL = Scarcely Qualifies as a Language
November 11, 2007 at 5:57 am
Try using the "BULK INSERT" statement instead, which does support transaction. Be sure the login has the server level role bulkadmin.
SQL = Scarcely Qualifies as a Language
November 7, 2007 at 5:37 am
Per the SQL Standard, trailing spaces are ignored in comparision.
For substring, if the starting position is greater than the actual data length, then a zero length varchar is returned.
Based on...
SQL = Scarcely Qualifies as a Language
November 7, 2007 at 5:31 am
From "Alice in Wonderland"
Humpty Dumpty: When I use a word, it means just what I choose it to mean - neither more nor less.
Alice: The question is, whether you can...
SQL = Scarcely Qualifies as a Language
November 6, 2007 at 12:00 pm
A Worktable is a temporary table used internally by SQL Server, typically for sorting or for cursor results.
A TempTable is a temporary table defined by a user.
SQL = Scarcely Qualifies as a Language
November 5, 2007 at 2:58 pm
For DST, as there is a Windows Patch and there is no SQL Server patch, there is no SQL Server patch information to retrieve.
SQL = Scarcely Qualifies as a Language
November 2, 2007 at 11:22 am
Viewing 15 posts - 556 through 570 (of 1,131 total)