Skip to content
Advertisement

Tag: function

SQL date scenario for getting previous month’s data to-date on the 1st of month, then drop last month

I’m trying to recreate an existing View in Snowflake (originally in SQL Server). I need to get last month’s data which is easy enough, but here’s the scenario: On 3-1-21, it should retrieve 2-1-21 to 3-1-21, but then starting on 3-2-21, it should only show 3-1-21 to-date, as our month end reporting goes out on the 1st of the month,

SQL Server Grouped Number Generation

I need a way in a SQL Server query to generate grouped numbers when the data switches from one specific data value to another. Based on the first two columns below and how they are ordered, how can the query generate the numbers in the third column? When the Type column changes from Prim to anything else, all the records

NetSuite ODBC Limitations

I’m trying to find out if anyone is aware of any list of the limitations of NetSuite’s ODBC SuiteAnalytics Connect Service being used through OpenQuery? I’ve been running into many problems with some of my more complex queries failing for no apparent reason, and I finally started narrowing it down to some sort of strange limitations that I wasn’t expecting

ORA-06553: PLS-801:Internal Error [55018]

I want to make a function call like SELECT URUN_GETIR(‘test1’) FROM DUAL; but i got ORA-06553: PLS-801: Internal Error [55018]. I tried ORA-06553: PLS-801: internal error [55018] when testing function returning ROWTYPE this like for ex URUN_GETIR(‘test1’).KULUSERNAME but getting same error. It didn’t work for me.Thanks in advance. My db table : My plsql function code : Answer You can

Advertisement