Script to perform http(s) post
Post data as coming from an HTML FORM with METHOD=POST to an url and retrieve the result. The procedure uses WinHttp.WinHttpRequest.5.1
2006-01-24 (first published: 2005-01-27)
1,718 reads
Post data as coming from an HTML FORM with METHOD=POST to an url and retrieve the result. The procedure uses WinHttp.WinHttpRequest.5.1
2006-01-24 (first published: 2005-01-27)
1,718 reads
This is BASE64 Encoding/Decoding in a T-SQL procedure. This code is provided as is, and is free to use and modify. Version 2 June 2005
2006-01-23 (first published: 2004-11-17)
4,778 reads
This VBA script was written for MS Word. It formats the text and sets default colors for keywords. SQL 2005's Management Studio now does this by default but the previous Query Analyzer did not offer this functionality. This is useful if you prefer to print and review code from time to time (not recommended for […]
2006-01-23 (first published: 2006-01-11)
466 reads
If you backup your databases to a disk file, you should make sure that these disk files are then being archived to tape. Without this, your ability to recover the database is compromised in the event of a disaster. This script will examine the "archive" flag on all of the backup files to make sure […]
2006-01-22 (first published: 2005-03-25)
301 reads
The following script deletes files in the specified folder, older than specified no of days and outputs the details to the specified file location. I use this VB script to delete some old backup files those can't be deleted with the regular maintenance plans. All you need to do is to supply the backup folder […]
2006-01-20 (first published: 2006-01-11)
1,748 reads
Calculates the next business day based upon the work weeklength, number of days from the start date and a list of holiday dates kept in a table called HolidayDate.Created this script for determining the next banking day from 2 days after a request for wiring funds. Can be used for things like calculating shipping dates […]
2006-01-19 (first published: 2005-07-16)
1,522 reads
Populate @list variable with account(s) to script. Save output to recreate:Login, Password,Default DB,Server Roles,DB Access,DB Roles,DB Object PermissionsDB level permissions are scripted in all databases. Can recreate a single login, or accepts comma delimted list of logins.NOTE:Stored procedures are created in Master, but are deleted
2006-01-19 (first published: 2005-10-19)
1,749 reads
This is a T-SQL script that uses OLE, ADO, Jet4 ISAM, and Linked Server to create and populate an Excel Workbook (XLS) file from T-SQL query. If the Excel Worksheet exists, the query will append to the "table". The code is designed to be used by SQL Agent and to append to the step output […]
2006-01-18 (first published: 2003-04-24)
13,477 reads
This VB script allows you to search DTS packages for keywords, etc. It is also useful for quickly locating what server a given package is on. This is very useful for debugging. Example - you want to know the name of every DTS package the touches a certain table. The text files generated contain the […]
2006-01-18 (first published: 2005-12-07)
5,992 reads
This funciont return a date without end-of-week , it is useful to calculate a new date for any payment!YOU CALL with 'dias_uteis(getdate(), 5)' and will get five useful days after today
2006-01-17 (first published: 2005-12-22)
87 reads
SQL Server 2025 introduces native support for vector data types and external AI models....
By Steve Jones
Fear is fueled by a lack of imagination. The antidote to fear is not...
The slidedeck and the SQL scripts for the session Indexing for Dummies can be...
I'm building ETL packages in SSIS. My data comes from an OLE DB Source...
Comments posted to this topic are about the item Building AI Governance and Policies-...
Why is sql doing a full scan VS seeking on the index? I've included...
The DBCC CHECKIDENT command is used when working with identity values. I have a table with 10 rows in it that looks like this:
TravelLogID CityID StartDate EndDate 1 1 2025-01-11 2025-01-16 2 2 2025-01-11 2025-01-16 3 3 2025-01-11 2025-01-16 4 4 2025-01-11 2025-01-16 5 5 2025-01-11 2025-01-16 6 6 2025-01-11 2025-01-16 7 7 2025-01-11 2025-01-16 8 8 2025-01-11 2025-01-16 9 9 2025-01-11 2025-01-16 10 10 2025-01-11 2025-01-16The docs for DBCC CHECKIDENT say this if I run with only the table parameter: "If the current identity value for a table is less than the maximum identity value stored in the identity column, it is reset using the maximum value in the identity column. " I run this code:
DELETE dbo.TravelLog WHERE TravelLogID >= 9 GO DBCC CHECKIDENT(TravelLog, RESEED) GO INSERT dbo.TravelLog ( CityID, StartDate, EndDate ) VALUES (4, '2025-09-14', '2025-09-17') GOWhat is the identity value for the new row inserted by the insert statement above? See possible answers