Technical Article

DTS-Less and Jobless Approach to Table Freshness

How about getting the data when the table data is first queried?  The following script checks to see if the specified table (@MyTable) has been updated today.  If so, just return the data found.  If not, then get the data from a "fresher source".  Great for ASP that performs table reporting and needs "baked daily" […]

You rated this post out of 5. Change rating

2002-04-23

1,554 reads

Technical Article

List Network Share Directories Quickly

Need a quick way to list shared folders?  Do it in one call.  Great for ASP page popups and user drop-down lists.Let's say that you want to display a list of projects, just call usp_GET_ProjectFolder and VIOLA! Only works with 2k; however, can be ported to ss7 if the udf is ported to a proc […]

You rated this post out of 5. Change rating

2002-04-22

347 reads

Technical Article

Send True SMTP Mail using CDOSys instead of CDONTS

SQL Server 2000 and Windows 2000 Only.Microsoft suggest using CDOSys rather than CDONTS.  CDOSys stands for Collaboration Data Objects for Windows 2000 Subsystems.  Below is a script that allows you do do just that.  NO EXCHANGE REQUIRED!!  Sample sends the user HTML Mail!Be sure to change @ServerIPAddr to your SMTP server.

You rated this post out of 5. Change rating

2002-04-22

1,901 reads

Technical Article

sp_CHARINDEX

Here's a stored procedure version of udf_CharIndex for SQL Server 7.Sample Usage: DECLARE @iPos INT DECLARE @nRet INT EXECUTE @nRet = sp_CharIndex 'W', 'Hello World', @nPos = @iPos OUTPUT IF @iPos > 0   PRINT 'found' ELSE   Print 'not found' PRINT @iPos  --Only uses on character.

You rated this post out of 5. Change rating

2002-04-22

537 reads

Technical Article

View/Edit ASP Script from From SQL Server 7.0/2000

Ever want to display (and edit) ASP code from the original .asp file?  (like PHP's PHPInfo() function).To setup:  * Just create a .asp with SQL Server connectivity.  * Change @IISHostNameWWWPath to match your servername      -OR-     if SQL Server is on the same machine, use the next     line instead. (see […]

You rated this post out of 5. Change rating

2002-04-22

529 reads

Technical Article

Write Reports from SQL to Disk (Even HTML!)

Ever need to write reports out to a folder? I have found that creating output files are SA-WEET! (and easy too) The sample script uses BCP to create an HTML file.This process works well for reports that need to be generated nightly and take too long to run in real time.  Use an SMTP mail […]

You rated this post out of 5. Change rating

2002-04-18

4,334 reads

Blogs

Advice I Like: Apologies

By

How to apologize: quickly, specifically, sincerely. Don’t ruin an apology with an excuse –...

Build a Serverless Todo App With AWS, Pulumi, and Python

By

Try this step-by-step guide to build and deploy a scalable serverless app that’s accessible...

Master SQL Subqueries with This Free Course

By

Want to boost your SQL game? Check out this free course, SQL Subqueries: Real-World...

Read the latest Blogs

Forums

Temp table security

By Brandie Tarvin

So, I have an interesting situation that I need a double-check on. One of...

Hello sqlserer centrel

By queens

I am new here and will like to learn as days goes

Searching a Form (using "Find") after an Access to SQL Migration

By delboy

I have completed a successful migration of an access database to SQL Express. Most...

Visit the forum

Question of the Day

Escaping Like I

I have this data in a SQL Server 2022 table:

PlayerIDPlayerNamePlayerStatus
1The \%ChampActive
2The ChampActive
3The_ChampionActive
4The__ChampionActive
5The\_ChampActive
How many rows are returned by this code in SQL Server 2022?
select PlayerName from player
where playername like 'The\_C%' escape '\'
 

See possible answers