Skip to content

How to select a row who has a substring

I have and data like : ID term score 1 enthusiastic 0.986 2 excellence 0.984 3 loves 0.984 4 inspirational 0.984 5 proud 0.68 6 love 0.90 7 so proud 0.71 8 so so proud 0.90 I want to get a score …

SQL NOT IN or NOT EXISTS statement inefficient

Background I have two tables – one is updated each day with new data (failed deadline) and one is continually added and deleted from dependent on the other (live table). The way it works is that if …

Sql Subselect ORA-00918

This is my Sql: SELECT t.RUFNAME, count(v_anschrift.rufname) as Anrufe FROM v_termin, ( SELECT RUFNAME FROM V_Anschrift WHERE V_ANSCHRIFT.SPERRKZ = 0 AND …

SQL Server select parts, fill with 0 no result

I have the following tables Location (Id, locationName) Inventory (productid, qty, locationid) With the following data, I need to query to show all locations per productid, even when not in …

Return opposite transaction value rows

I have this table structure and I want a query that needs to be returning opposite side columns values. If I pass parameter with value Overtime then it should return following rows The logic is against each transaction if the selected Account is on Debit side it should print the Credit side accounts and if th…