Malachi
4Penny.net
Points: 7400

1/29/2022 8:36:41 AM

CHARINDEX/PATINDEX

* This article, and all our great SQL (General) documentation, Is available on the SQL (General) menu

I've used CHARINDEX for years, but came across a need to use a FILTER with a WILDCARD with CHARINDEX and found that it would not support it. 

Enter: PATINDEX. 

We'll use this article to put up tips on the uses of CHARINDEX and PATINDEX, for today this piece of code. The Task is to find 'INV12345678' in a notes field using wildcards and retrieve the invoice number for a report. 

4Penny.net
Version: All
Section: SQL Scripts
Table Definition Quick Links
All Tables
SOP Tables
RM Tables
GL Tables
POP Tables
HR Tables
PM Tables
UPR Tables
IV Tables
Olympic Tables
3