What does the... & "*"... represent in the following statement?

SELECT [UK Table].[Business Name], [UK Table].[Business Type], [UK Table].Address, [UK Table].City, [UK Table].Country, [UK Table].[Telephone Number], [UK Table].[Website Address], [UK Table].[Email Address]
FROM [UK Table]
WHERE (([UK Table].[Business Name] Like Forms!frmNz!txtBusinessName & "*") Or (Forms!frmNz!txtBusinessName Is Null)) And (([UK Table].[Business Type] Like Forms!frmNz!txtBusinessType & "*") Or (Forms!frmNz!txtBusinessType Is Null)) And (([UK Table].Address Like Forms!frmNz!txtAddress & "*") Or (Forms!frmNz!txtAddress Is Null)) And (([UK Table].City Like Forms!frmNz!txtCity & "*") Or (Forms!frmNz!txtCity Is Null)) And (([UK Table].Country Like Forms!frmNz!txtCountry & "*") Or (Forms!frmNz!txtCountry Is Null)) And (([UK Table].[Telephone Number] Like Forms!frmNz!txtTelephoneNumber & "*") Or (Forms!frmNz!txtTelephoneNumber Is Null)) And (([UK Table].[Website Address] Like Forms!frmNz!txtWebsiteAddress & "*") Or (Forms!frmNz!txtWebsiteAddress Is Null)) And (([UK Table].[Email Address] Like Forms!frmNz!txtEmailAddress & "*") Or (Forms!frmNz!txtEmailAddress Is Null));

I have used this query but fail to know what the & "*" part means. What does it do? What does it mean?

Comments

  • : I have used this query but fail to know what the & "*" part means.
    : What does it do? What does it mean?


    just like a file-search, its a wildcard for pattern matching

    Like "a*" - returns all records that start with letter [a]
    Like "*a" - returns all recs that end with [a]
    Like "*a*" - return all recs that contain an [a] in the field
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

In this Discussion