Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 18
Default InStr used in SQL query

Thanks. That's what I need.

On Fri, 18 Jul 2003 23:18:57 +0100, Mike NG
wrote:

On Fri, 18 Jul 2003 at 02:50:55, dchow (dchow )
wrote:
WHERE (InStr(TaxID, ""PST"") < 0)

If I changed it to
WHERE (Right(TaxID, 3) = ""PST"")

Change your SQL to

WHERE TaxId LIKE '%PST%'

Well that's what standard SQL is anyway. If that doesn't work, then it
may be * instead of % - I say this because the Like keyword in an If
statements expects *
e.g. If TaxId like '*PST*' Then


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Use InStr function in formula? Lee Hunter Excel Worksheet Functions 8 May 8th 23 03:45 AM
is there an equal fxn for 'InStr' in excel. Not Find or Search Clausius Excel Worksheet Functions 3 May 1st 23 03:41 AM
Excel 2007 / MS Query - editing existing query to another sheet Hotpepperz Excel Discussion (Misc queries) 0 June 13th 08 06:53 PM
Help with VBA InStr() function EagleOne Excel Discussion (Misc queries) 10 April 12th 07 02:47 PM
Where is the Instr() function in Excel 2003? chem21 Excel Discussion (Misc queries) 3 October 9th 06 03:49 PM


All times are GMT +1. The time now is 06:44 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"