Skip to content
Advertisement

Tag: oracle10g

AM/PM Conversion For Date Time

I’ve a very basic requirement that I did earlier but for now unable to resolve it. I’ve a table in database that stores in and out time as the following format: 8/18/2019 8:00:00 AM So what I want …

how to solve this query using union

Display id and name for salesmen along with id and category of products in a single table. Indicate the source of the row in result by adding an additional column TYPE with possible values as ‘S’ (Salesman) and ‘P’ (Product). Display all rows. I don’t how to add column “type” without using alter actual tables are Salesman Table Product Table

How does order by clause works if two values are equal?

This is my NEWSPAPER table. When i run this query It gives this output But in Kevin Loney’s Oracle 10g Complete Reference the output is like this Please help me understand how is it happening? Answer In relational databases, tables are sets and are unordered. The order by clause is used primarily for output purposes (and a few other cases

Deleting duplicates rows from oracle

I am using oracle database.I want to use duplicate rows from a table except one,which means that I want to delete all rows but atleast one row should be there. I have a table Now i want to delete duplicate rows but at least one row should be there. i had used this to find number of employees that are

How to calculate the slope in SQL

I have some data in a sql database and I’d like to calculate the slope. The data has this layout: I’d like the final output to look like this by creating a new table using SQL: To complicate things, not all Keywords have 3 dates worth of data, some have only 2 for instance. The simpler the SQL the better

Trigger created with compilation errors

I wrote this trigger to discount the top client in the database by 10% when a new purchase is made: However when i execute this statement i receive this message: Can someone please tell me what I am doing wrong? Thanks, Alex. UPDATE – Errors: Solution: Answer I don’t have your tables to hand so I can’t guarantee that I’ve

Advertisement