I created a function “ufngetFirstDateOfMonth” and “ufngetLastDateOfMonth” stored in Microsoft SQL Server 2008. My purpose is to send some date into the function and it will return the first date of …
How can I apply aggregate functions to data extracted from JSON in Google BigQuery?
I am extracting JSON data out of a BigQuery column using JSON_EXTRACT. Now I want to extract lists of values and run aggregate functions (like AVG) against them. Testing the JsonPath expression ….
Oracle Apex column link from LOV values
Can you please advise if below is even possible. Using Oracle 11g and APEX 4.2.6. I have a data grid that brings all tasks from a master table. But show the task name via a LOV. I am trying to add …
Concatenate and use in where clause oracle plsql
I have to concatenate two fields and use concatenated field in where clause but it gives me invalid identifier. How to solve this query. select i.FIRST_NAME || ‘ – ‘ || i.LAST_NAME as NAME, i.* from …
Oracle Error PLS-00323: subprogram or cursor is declared in a package specification and must be defined in the package body
Can someone help me put my pl/sql procedure in a package? I’ve tried and I’m struggling with it: This is what I have, for my package specification: This is my package body where im running into the problems: if anyone could help me fix the errors i’d appreciate it: Answer Your header and bod…
How to give comments in SQL
I am working in SQL. What is the complete explanation for using comments in SQL, with some example code? Answer MySQL Server supports three comment styles: From a # character to the end of the line. From a — sequence to the end of the line. In MySQL, the “– ” (double-dash) comment style requires t…
What’s the proper index for querying structures in arrays in Postgres jsonb?
I’m experimenting with keeping values like the following in a Postgres jsonb field in Postgres 9.4: I’m executing queries like: How would I create an index on that data for queries like the above to utilize? Does this sound reasonable design for a few million rows that each contain ~10 events in t…
Incorrect syntax near the keyword ‘Table’ C# SQL [closed]
Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers. Want to improve this question? Update the question so it’s on-topic for Stack Overflow. Closed 7 years ago. Improve this question Hello I’m trying to figure out why i have this error Incorrect …
sqlite count of distinct occurrences
What is the best way of writing a sqlite query that will count the occurrences of colC after selecting distinct colA’s ? SELECT colA, colB, colC FROM myTable WHERE colA IN (‘121’, ‘122’,’123′,’124′,’…
MySQL/MariaDB – order by inside subquery
I used the following query with MySQL 5.5 (or previous versions) for years without any problems: SELECT t2.Code from (select Country.Code from Country order by Country.Code desc ) AS t2; The order …