Parameterized Query Syntax

5 pts.
Tags:
Microsoft Excel
Parameters
Thank you Mr Hatmaker for sharing the "Parameterized Query with excel." I have watched the videos on youtube (beyond excel) describing the function and I have a few questions.
1-I am looking for the syntax for "contains". I am searching for the syntax to place in the criteria field that would return all cities that contain the text "al" ..something similar to: City LIKE '%al%' (I have tried Like '%'+[]+'%' and many others but nothing seems to work)
2- Can we change the SQL statement in the properties window.

Thanks in advance,
YulData


Software/Hardware used:
excel

Answer Wiki

Thanks. We'll let you know when a new response is added.

Hi YulData,

Sorry for the late response.  This question does not appear under my post. I only found it by accident through Google. But to answer your question, about a year late:

[1] Contains: The syntax for LIKE is shown in this video at about 2:00 minutes https://www.youtube.com/watch?v=P9cUYpXIKsU

[2] Change SQL: We can change the SQL statement in either of two places:

[2a] Connections Properties > Definition tab > Command Text

[2a] MS Query’s SQL button

Best wishes,

Craig

Discuss This Question:  

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following