I am a Microsoft MVP, a Pluralsight Author, a Xamarin Certified Mobile Developer for iOS and Android, and the leader of the Tech Valley .NET User Group.
One of our support people came to me with an interesting task. He needed to add rows from a SQL Server table to another table and populate a row number type of field. That field needed to be generated by his SQL statements and start with the next number after the highest value already in the table. And he couldn’t use an autoincrement field.
My first thought was to read the new values into a table variable with an column for that row number field. Then iterate over that table with a cursor and populate that column. That was a very bad thing and was quickly banished. So I thought about it a bit and sent him the following example.
To generate the row numbers from the merge table, we use the rank() function. Rank() returns the rank of each row within the partition of the result set. We specify the partition with the “over (order by n.name” clause. If you have multiple fields to make a row unique, you would need to specify each field in the over clause.
I have some code that uses Apple’s AppConnect API to query App store related things. I wrote a C# script that I run from LINQPad that gives me a weekly sta...
I needed to make a small change to an Android apop that we have in the Google Play store. I made the change, generated a new apk and we submitted to the ap...
I have a new course that was just published this week on Pluralsight, “Xamarin.Forms 5 Fundamentals”. It’s seven hours of tutorials and demos for the devel...
So Apple updated Xcode on my Macbook from 13.4.1 to 14. I wasn’t paying much attention to the prompts or even the version numbers. After doing so, I could n...
Comments