I have an old program I wrote in .NET that pulls data from an old #SQLServer database, exports it to an Excel file then uploads it to a partner via SFTP. I'm trying to re-write it in #python so it is a bit more automated. One step is for it to run a stored procedure, and while the stored procedure does seem to run (can see it in SQL Server Profiler), it doesn't generate the temporary table that later steps require. https://cseiler.freeshell.org/PublicPostGetData.html
1/2 (see thread for updates)
@botvolution Right now, I'm thinking "Well, I really didn't change anything. It's all just formatting, style, and logging that I changed as I was just trying to see where it was going wrong." But I must have changed something that counted. At this point, I'm really leaning towards wrong parameters being passed.
@botvolution OK, cutting and pasting the code https://cseiler.freeshell.org/PublicPostGetData2.html and replacing with the correct connection strings works. This means that it was working at that time, and points me to the parameters I was passing to the sp.🙄 I know I was playing with the dates as the live database I want to be data since 2020, but the test database is a snap shot from ten years ago, so I was having to change 2020 to 2010 manually, and might have missed that. Dumb.
I'm using the spatial data type in SQL Server to get "closest neighbor" results. I really want to remove #SQLServer from the stack if I can though. Anybody try #PostGIS for #PostgreSQL? Opinions? Suggestions?
@kedare SQL Server is a genuine product. I would prefer T-SQL over Postgres’ PL anytime, also tables as clustered indexes, Indexed Views, TVPs, optional Schemabinding and Columnstore are really great. While PostgreSQL is extremely feature-rich, it sometimes feels overwhelming to deal with it, especially configuration and tuning is relatively complex. Also, pgAdmin isn’t great.
However, licensing SQL Server is an issue for SMB or solo-devs. It’s simply unaffordable. Sad that Microsoft doesn’t make the Web Edition generally available for an affordable price, especially now that SQL Server runs in an Ubuntu Docker container.
I'm feeling pretty good right now. We had an ultra-successful test run of failing all of our #SQLServer instances from the LAX LZ to the OR AZ in AWS. TBH, I just want to be done with all of this because next week we're having a cool onsite, and after that, there's lots of cool work to be done.