In PL/SQL, I want to calculate the Shapiro-Wilk value of my selected data. Apparently, the function DBMS_STAT_FUNCS.normal_dist_fit is able to do it, but it takes a table name as a parameter, and not the result of a select. The values I am working with are numbers, selected after many inner joins. Here is a s…
Tag: oracle
SQL group two value in a same row
I have this query SELECT to_char(timestamp_arr,’Dy DD/MM/YYYY’) as timestamp_date ,to_char(timestamp_arr,’DD/MM/YYYY’) as link_date ,count(transport_uid) as value ,…
Row lumping, cycle dates
I want to look at the lead type and if that type is the same for that row then merge in those dates to fit within one row. I have the below table: Expected Results: How can I get my output to look like the expected results? I have tested withlead lag rank and case expression but nothing worthy of
How to handle umlaute like Ä Ö Ü in Coldfusion SQL query to insert into database?
I want to insert a string into my database with Coldfusion. However it contains umlauts like Ä, Ö and Ü (German). The umlauts are displayed different than they should in the database. For example I …
First date from second table where date is bigger than date in table first oracle
I want pull out the date from second table. My second table may have a over 100 dates to a unique record(A,B,C). I have I first Table : and the second table : I want to first table pull out the date first date from second table when date is bigger than the date1 from first table. The result must
Perform counting for lookup in SQL
I would like to perform lookup based on the number of Yes in Input. In ID No.1, Output1 is A because it is first Yes, Output2 is B because it is second Yes. In ID No.2, Output1 is blank because Input1 is n/a, subsequent output is based on number of Yes appeared. In ID No.3, it shows counting is skipped
SQL – joining 3 tables and choosing newest logged entry per id
I got rather complicated riddle to solve. So far I’m unlocky. I got 3 tables which I need to join to get the result. Most important is that I need highest h_id per p_id. h_id is uniqe entry in …
ORA-01422: exact fetch returns more than requested number of rows )shows for a trigger
I have tired to create a trigger like this, but it shows this error Answer This error indicates that your query SELECT DNAME INTO DeptName … returns more than one record, hence its result cannot be assigned to a scalar variable. The problem with your query is that you have an unecessary JOIN on purchase…
problem with script creating table via if clause
We are trying to build a script which automatically checks if a table is already created and if so the script should end. If the table is not created the script should create it. case if …
Conditionally use CASE…WHEN – Oracle SQL
I have two tables like so: tblOrders: OrderNo (pk), CurrentStepNo (fk) tblSteps: StepNo (pk), OrderNo (fk), StepName, StepType, StepStart, StepStop tblOrders contains tons of information about our …