I am trying to have some product recommendations in my website. I have this table that i have generated but need to keep a limited amount of entries. The table consists of these columns (filling with …
using update in trigger
I have trigger on delete I want to delete policeman but when I delete him all other policeman that he is their boss will have null in their boss field so I used this code create or replace trigger …
Laravel Query. Obtain in Eloquent only totals > 0
I have this query: public static function totalByAgent(int $agentId) { return PropertyListing::select( DB::raw(‘SUM(property_listing.rental) as rental’), DB::raw(‘SUM(…
Replace Database field based on 2 different Table Conditions
I need to update the table based on email matching condition and need to know SQL query that can solve this problem. I have 2 tables “old_data” and “new_data” Old_data contains around 60,000 records …
DoCmd.OpenReport and ORDER BY in the report
I have a report Email in MS Access and it is now reporting all the sales of the real state. In the report we have the ID, Address, Suburb, Sale Price, Land, Beds, Valuation and Selling Agency. The …
avoid duplication when joining tables without unique id using foreign keys
I’m facing this issue where I don’t really know how to handle duplicate rows when joining two tables. I have two tables I’d like to join Value_x table : ID Campaign Value_x foo …
SQL – Getting Index of delimiter found in the variable and substring based on the index
I need to get the last occurrence of symbol found in multiple same symbol. SELECT Charindex(‘|’, ‘abc||xyz’) This will result 4, but i need to get the index of the last ‘|’ which is index of 5. Then …
java.sql.SQLException: Unrecognized SQL type -102 while connecting to Oracle Database from Apache Spark
I’m trying to load a remote Oracle Database table on to Apache Spark shell. This is how I started the spark-shell. ./spark-shell –driver-class-path ../jars/ojdbc6.jar –jars ../jars/ojdbc6.jar –…
How to get the department name in this tutorial sql query?
Following the tutorial on SQL here I want to query the number of employees per department together with the department name. I tried the following query in that tutorial: SELECT count(*), dept_name …
how remove special character and digits from a string but ignore white spaces
i tried to remove special characters and numeric number from string of sentence but it should ignore white spaces if there is a more than one it should replace with one SQL developer,oracle 11g …