I’m trying to do electronic grade book in Java. I want to insert values of Marks and Description into rows But when I try to add Description to row, it looks like this: Is there any way I can also add description to the 3rd row? I tried many solutions and any of the solution I tried didn’t work. A…
sp_BlitzCache and missing index but index columns are already there
I have this recommendation as a missing index on a table for a stored procedure that is ran from the script tool sp_BlitzCache. However I have an index on the columns TeamId, PlayerId, and Active already. Shouldn’t this be used instead and not duplicate indexes with the same columns? The query must be t…
Using oracle apex dynamic action to set a date time value that is concatenated
I have a date value in one page item and i have a time value in another. i want to concat the date with the time and set it to another item using a dynamic action. Structure as below P_DATE = ’01-01-2021′ (item is a date with format mask dd-mm-yyyy) P_TIME = ’08:30 AM’ (item is date wi…
when using a case statement to aggregate fields in redshift, is it more performant to replace binary fields with 1s and 0s?
For example, which of the following calculations should perform faster? or For the sake of this example, assume that when fieldA is not null, fieldB will always equal 1. fieldB can also equal 1 if fieldA is null, which is why I use the case statement. Answer The two queries do not do the same thing, unless fi…
Python Cx_Oracle select query binding a tupled list with WHERE IN clause
Due to Oracle’s 1000 “IN” clause limit, one workaround is to use list tuples. I am attempting this in Python but cant seem to bind the list tuple correctly. My code: This gives me error: cx_Oracle.NotSupportedError: Python value of type tuple not supported. Whats the possible workaround for …
If null value in a Column A, then how to return the value of column B, and if also B is null, then how to move to the value of C
Have a table in Google Big Query with date, id and store columns where the goal is to keep track how many stores a customer has visited: I wish to create a SQL query which checks for date in first column (A_date). If it has a date (is not null) then keep the date If it is null then check
Aggregation with required columns in GROUP BY clause in postgresSQL
DB-Fiddle Expected Result: To get the expected result I tried to go wiht this query: However, it gives me error: column s.sales_channe” must appear in the GROUP BY clause. The problem is when I add the sales_channel to the GROUP BY clause I am not able to ge the expected result because then it groups bo…
How to use variable column name in filter in Django ORM?
I have two tables BloodBank(id, name, phone, address) and BloodStock(id, a_pos, b_pos, a_neg, b_neg, bloodbank_id). I want to fetch all the columns from two tables where the variable column name (say bloodgroup) which have values like a_pos or a_neg… like that and their value should be greater than 0. H…
How to get a value from previous and next row for each row in BigQuery?
I have a table in BigQuery with the following fields (and many others but not relevent): ID Timestamp For example: ID Timestamp 1 2021-04-26 14:57:24.292 UTC 4 2019-09-23 19:07:45.002 UTC 1 2020-…
TSQL: Given a set of IDs, obtain all headers such that the set is included in the header’s children
I am looking for a query that would return all Order ID’s that contain a set of productIDs, but might include more products. Data structure: CREATE TABLE dbo.Order(OrderID int, OrderDesc nvarchar(100))…