Skip to content
Advertisement

Tag: tsql

SQL Syntax – Section in MERGE Statement

It’s been a while since I’ve worked in a T-SQL environment. I previously worked for Google, and, of course, they had their own special flavor of SQL. Now that I’m back, I’m reading back up on my T-SQL features. I understand the MERGE statement (at least, I think I do!), but I was looking at examples, and I saw one

How to accurately pull minimum date of each time a payment method was changed

I need to get the minimum date for each time a payment method changes between the method id, account number, or routing number. I’m bouncing between a cursor and between windows functions. Doing the method below seems to work fine, but when i use this method with a larger dataset, with different pay ids involved, it doesn’t seem to be

Advertisement