Best answer

How to retrieve all rows matching a specific parameter in a MS SQL database column with Zapier?


Userlevel 2

I’m using a Zap to retrieve data from our MS SQL database. I need the zap to retrieve every row that match a certain parameter in a specific column. For instance, I need every row that has invoice # 3511151 in the invoice # column of the table. Is this possible?

icon

Best answer by SamB 9 May 2024, 16:28

View original

82 replies

Userlevel 1

I’ve figured out quite a simple workaround for this.

Firstly you need to run a Find Row via Custom Query in SQL Server statement that selects the key of each of the elements in your list. So if you imagine your table called FOOD is like this:

 

and you want to loop through all the elements that are type ‘Hot’

Run a SQL Select that looks like this:

select replace((stuff((select ',' + str(id) FROM Food where type = ‘Hot’ FOR XML PATH('')),1,1,'')), ' ', '') as ID

That will return a single element with the value ‘2,3’

You then use Create a Loop from Text that loops through each id in the results from above in turn with the sub loop elements able to reference each Key (Id) value in turn so you can update, or read or whatever using other SQL functions.

Userlevel 6
Badge +3

Hi @BudgetCoinz 

 

I added your vote for this feature request, we’ll update via email once available. Thanks!

Userlevel 1

Hi we would like to vote to enable multiple rows. It’s really stupid to not allow for multiple rows. 

Userlevel 1

Please add too

Userlevel 7
Badge +11

I’m sorry that workaround didn’t do the trick here, @aydinflyp :(

We’ll be sure to email you as soon as this feature request has been implemented! :)

Userlevel 1

Please add my vote.  This is much needed! 

Userlevel 6
Badge +3

Hi @kinship 

 

I’ve added your vote for this feature request, we’ll update you via email once available. Thanks!

I cannot believe this has been open for 3 years! It is so obvious and critical a need. Please add my email to the list.

S Gibbs

Userlevel 7
Badge +12

Hi @involved, I’ve added you as an interested user on the feature request 🙂 Thanks!

Please add my vote as well via the email xxx@xxxx.com. 
 

This post has been edited by a moderator to remove personal information. Please remember that this is a public forum and to remove any sensitive information prior to posting. 

Userlevel 7
Badge +12

Hi, @Harris!

 

Thanks for your reply and for letting us know why this addition would be helpful for you - I’ve added you as an interested user on the feature request. 

Please add another vote for me. 

Please add me to the vote. 

And please add me as anther vote for this.  Typical application would be to sync/add multiple contacts information from a MySQL db with a Contacts service.

Add me to this request please.
I kind of understand why you are not implementing this. It's costing you zaps… right? I mean it's super easy to implement

Hi, @Harris!

 

Thanks for your reply and for letting us know why this addition would be helpful for you - I’ve added you as an interested user on the feature request. 

Could you please do the same for me as well? We would use the feature to retrieve all our customers that have birthdays that particular day and add them to a email list for that day!

Userlevel 1

Please add me as well. 

 

Its essential for pulling multiple row for reports, so yes please 

Please add my vote as well and kindly let us know if there is any progress.

Get my vote in as well please!

Please add my upvote as well, this would be a great feature. Thanks!

Add me to that list!! we are working where we will need this function! Thank you

Userlevel 6
Badge +3

Hi @bisevo guy 

 

I’ve added you to this feature request. Thanks!

Userlevel 7
Badge +8

Hi @Sankon - you have been added as an interested user!

Userlevel 3
Badge +6

Hey @Zeeptin and @LoganH24, I hope you’re doing well!

I’ve just added you both as interested users on the feature request. :)

Userlevel 7
Badge +11

Sure thing @zappier! I’ve added your vote to that feature request now. :slight_smile:

Reply