ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   editing a query (https://www.excelbanter.com/excel-worksheet-functions/171594-editing-query.html)

Texas Tonie[_2_]

editing a query
 
Hello,

I want to add a query criteria using the 'begins with' option.

I cannot get the syntax right. Choosing --- begins with [xxx] ----- does
not work.

what should it be?

Help much appreciated,

A struggling Texas Tonie

CLR

editing a query
 
This is from the Autofilter........maybe someting like it will work for
you...........

Criteria1:="=a*"

Vaya con Dios,
Chuck, CABGx3


"Texas Tonie" wrote in message
...
Hello,

I want to add a query criteria using the 'begins with' option.

I cannot get the syntax right. Choosing --- begins with [xxx] -----

does
not work.

what should it be?

Help much appreciated,

A struggling Texas Tonie




Ron Coderre

editing a query
 
Try something like this:

The below SQL selects names that begin with the letter A.

SELECT myTbl.Name
FROM myTbl
WHERE myTbl.Name LIKE 'A%'

Note: The Pct Symbol (%) is a wildcard

Is that something you can work with?
--------------------------

Regards,

Ron
Microsoft MVP (Excel)
(XL2003, Win XP)

"Texas Tonie" wrote in message
...
Hello,

I want to add a query criteria using the 'begins with' option.

I cannot get the syntax right. Choosing --- begins with [xxx] -----
does
not work.

what should it be?

Help much appreciated,

A struggling Texas Tonie





Texas Tonie[_2_]

editing a query
 

Like '%' + [parameter] + '%' works in SQL..........

"CLR" wrote:

This is from the Autofilter........maybe someting like it will work for
you...........

Criteria1:="=a*"

Vaya con Dios,
Chuck, CABGx3


"Texas Tonie" wrote in message
...
Hello,

I want to add a query criteria using the 'begins with' option.

I cannot get the syntax right. Choosing --- begins with [xxx] -----

does
not work.

what should it be?

Help much appreciated,

A struggling Texas Tonie





Texas Tonie[_2_]

editing a query
 
It turns out that

Like '%' + [parameter] + '%' works in SQL



"Ron Coderre" wrote:

Try something like this:

The below SQL selects names that begin with the letter A.

SELECT myTbl.Name
FROM myTbl
WHERE myTbl.Name LIKE 'A%'

Note: The Pct Symbol (%) is a wildcard

Is that something you can work with?
--------------------------

Regards,

Ron
Microsoft MVP (Excel)
(XL2003, Win XP)

"Texas Tonie" wrote in message
...
Hello,

I want to add a query criteria using the 'begins with' option.

I cannot get the syntax right. Choosing --- begins with [xxx] -----
does
not work.

what should it be?

Help much appreciated,

A struggling Texas Tonie







All times are GMT +1. The time now is 01:32 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com