Skip to content
Advertisement

Tag: sql

Creating dynamic table in JSP

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. Answer

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 this inline select Current Index Missing Index

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 this error? Thanks Answer Your python is generating the following query string…

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 both by campaign and sales_channel.

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. How can I write ORM for the same? SQL query is

Oracle Like Operator in Where condition and decode

I’m trying to write a PL-SQL query to return records from multiple table and using decode to allow null value comparison, The result is returning only where DeptName is exactly matching to the database values, but I want a query to return something e.Department like ‘%DeptName%’ Answer No need for anything other than boolean logic: If you want a NULL

Add Column in a table [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers. This question does not appear to be about programming within the scope defined in the help center. Closed last year. Improve this question Am trying to add a column in the table salesperson. And it is showing error. Pls help. I am using the latest

Advertisement