Total Page Preview:   000000021116

Like - Wildcard characters Search in Azure DocumentDB

In this article we will learn Like Search - wildcard charectore search - STARTSWITH or start charectore search - ENDWITH or end charectore search in azure documentdb.

Like or Wildcard charectore search:

The CONTAINS Method will Returns a Boolean indicating whether the first string expression contains the second.

Syntax

CONTAINS(<str_expr>, <str_expr>)

Example:

SELECT CONTAINS("brijesh", "h"), CONTAINS("brijesh", "p")

Result:
 
 [{"$1": true, "$2": false}]  
 
OUTPUT
 
 
Start With Search or STARTSWITH Method:
 
The STARTSWITH Method will Returns a Boolean indicating whether the first string expression starts with the second.
 

Syntax

STARTSWITH(<str_expr>, <str_expr>)

Example:

SELECT STARTSWITH("brijesh", "ri"), STARTSWITH("brijesh", "br")

Result:
 
 [{"$1": false, "$2": true}]  
 

OUTPUT

 
 
End With Search or ENDWITH Method:
 
The ENDWITH Method will Returns a Boolean indicating whether the first string expression ends with the second.
 

Syntax

ENDWITH(<str_expr>, <str_expr>)

Example:

SELECT ENDWITH("brijesh", "sh"), ENDWITH("brijesh", "es")

Result:
 
 [{"$1": true, "$2": false}]  
 

OUTPUT

 
 
 
Thanks,

Thank You

About Author

Brijesh Kumar

Database Developer

I have more then 6 years Experience in Microsoft Technologies - SQL Server Database, ETL Azure Cloud - Azure SQL Database, CosmosDB, Azure Data Factory, PowerBI, Web Job, Azure Function, Azure Storage, Web Apps, Powershall and Database Migration On-Premise to Azure Cloud.
LinkedIn : https://www.linkedin.com



Comments

Levering
09-Feb-2019
That is really interesting, You are a very skilled blogger. I've joined your feed and look forward to searching for more of your magnificent post. Also, I have shared your site in my social networks
Mein
12-Nov-2019
I blog often and I genuinely thank you for your content. Your article has truly peaked my interest. I'm going to book mark your blog and keep checking for new information about once a week. I subscribed to your RSS feed too.
Beebe
12-Nov-2019
Thanks designed for sharing such a nice thought, article is pleasant, thats why i have read it entirely
Weinberg
16-Nov-2019
Appreciation to my father who stated to me about this blog, this web site is in fact amazing.
Alfred
16-Nov-2019
Hey there I am so happy I found your web site, I really found you by error, while I was researching on Askjeeve for something else, Anyhow I am here now and would just like to say cheers for a fantastic post and a all round thrilling blog (I also love the theme/design), I don't have time to read through it all at the moment but I have saved it and also added in your RSS feeds, so when I have time I will be back to read much more, Please do keep up the awesome job.
Frazer
20-Nov-2019
Hello to every one, the contents existing at this web site are in fact awesome for people knowledge, well, keep up the nice work fellows.
Nowak
21-Nov-2019
Its like you learn my thoughts! You seem to grasp a lot about this, such as you wrote the e book in it or something. I believe that you can do with some p.c. to power the message home a little bit, however instead of that, this is fantastic blog. A great read. I will certainly be back.
Wenger
22-Nov-2019
Appreciating the dedication you put into your website and detailed information you offer. It's great to come across a blog every once in a while that isn't the same unwanted rehashed information. Fantastic read! I've bookmarked your site and I'm including your RSS feeds to my Google account.
Horrell
07-Dec-2019
Very quickly this website will be famous amid all blog viewers, due to it's fastidious articles
Sceusa
15-Sep-2020
Thanks for any other informative site. The place else may I am getting that type of info written in such a perfect manner? I have a challenge that I'm just now operating on, and I've been at the look out for such information.