I have a small program that I use to track my progress in reading books and stuff like goodreads to know how much I read per day. I created two tables for that, tbl_materials(material_id int, name …
Tag: sql
How to Update a column Before Select?
I am setting a stored procedure for select and I want to update the value of one column in the database Before doing the Select. This is what I tried but it’s not working. @roleID int and @query …
How to remove one or more instances of ‘?*’ in a string using REGEXP_REPLACE function in oracle?
I’m getting the characters ‘?*’ one to three times in a column called Line. I am required to remove these characters. How do I do it using Replace or REGEXP_REPLACE? SELECT Line, REGEXP_REPLACE(…
paging and sorting with Jpa returns only around 10% records from db
When I try to retrieve data from JpaRepository with Pageable request it only return 10% from all records. as example I had 68 records in MySQL database and pageble request only return first 10 records. when i try to get 2nd resultset it returns empty page content object. but if I request 100 records in one re…
Count Dimension Items that All Have the Same Value in Another Field
I have a table that looks like the following: business_id, employee_id, and status, which is either ‘active’ or ‘inactive’ I want to count the number of businesses where ALL of its employees are “…
SQlite Insert or replace conditional on each column value being bigger than it’s current value
I’m in a situation where I can have the same record appear several times. The trouble is that some of the fields may be missing, this is denoted by a value of -1 in that field. The value of the field …
Writing plsql exception errors to DMBS_OUTPUT and FND_FILE job log
I have a MERGE/UPDATE statement. I want to add exception handling such that if the update fails for any reason, write to DBMS_output and job log. I’ve come up with something – it compiles OK, but …
what is difference between ceiling and roundup server in sql server
What is difference between the Ceiling and Round functions in in SQL Server? I have some query and I get a totally different value in Round and Ceiling function.
How to perform following query in LINQ?
I have a SQL query need to do in LINQ. Can anyone helps in converting? SELECT * FROM profile WHERE ProfileId 1221 AND IsActive = 1 AND ProfileId NOT IN (SELECT ReportingPerson …
Loading data from CSV file to oracle table using sql loader
i want to load the data from CSV file to oracle table with this below condition. if the table is empty then only the data should be loaded into table otherwise data should not be loaded. is this …