Best answer

MS SQL Find Multiple Rows on the Same Table


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 Danvers 8 June 2020, 17:23

View original

68 replies

Userlevel 5
Badge +3

Hi @IanKerry 

 

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

Please add me to the list of requestors as well.  Any idea how many requests it takes to get a feature added?  I’m a potential customer working through my use case and without this feature, I don’t see moving forward.  We are querying a MySQL database and attempting to write new/updated records to rows of a SmartSheet.

Userlevel 5
Badge +3

Hi @kinship 

 

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

Userlevel 1

Please add my vote.  This is much needed! 

Userlevel 5
Badge +3

Hi @Jim Case 

 

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

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?

Hi @Danvers 

Is there any progress on this?

Please add my vote.   It’s crazy that it’ll only update one row at a time, it almost renders the app useless!!

Userlevel 5
Badge +3

Hi @dubbs 

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

One more vote from me on that please.

Thanks

Userlevel 5
Badge +3

Hi @MFav,

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

 

One more vote from me

Userlevel 5
Badge +3

Hi @alkakandilli 

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

Userlevel 1
Badge

Add me to … seems silly that this request has been in queue for over 2 years.  You’ve enabled a custom SELECT from SQL, but you only allow inserting 1 record.  I’m not even sure how this is helpful.

Userlevel 5
Badge +3

Hi @saintbrian 

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

Please add me to the vote. 

Userlevel 5
Badge +3

Hi @BackwoodsMag 

I’ve added your vote for this feature request, and we’ll  notify you via email once an update is readily available. Thanks.

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 7
Badge +11

Thank you so much for reaching out here, @Mark B! 😁

We really appreciate you sharing this workaround. I’m sure there are lots of folks in Community that will use it for their Zaps! 🙌

Reply