Sitemap

Amicuk Programming Answers

Spliting a record into multiple rows

-0001-11-30   Views:1

Advertisement

Hi experts, need your help for your to frame a query for the below requirement Scenario 1 For a same store fetch the record with least priority (35) and check if the Servicearea begin date & Servicearea end date of that store is minimum for that grou

Hi experts, need your help for your to frame a query for the below requirement
Scenario 1
For a same store fetch the record with least priority (35) and check if the Servicearea begin date & Servicearea end date of that store is minimum for that group.
If minimum then select that record alone as shown below
Item      DC     Store     Serviceare Bgn Date     Service Area End date     Priority
9856698     1469     2952     3/5/2011     12/31/9999     100
9856698     3107     2952     12/10/2011     8/3/2012     35
Item      DC     Store     St Date     End date     Priority
9856698     3107     2952     12/10/2011     8/3/2012     35
Scenario 2
For a same store fetch the record with least priority (35) and check if the Servicearea begin date & Servicearea end date of that store is minimum for that group.
If not minimum split the records for that group as shown below and select the record which has the lowest priority(35) and with minimum startdate and end date range.
Item      DC     Store     Serviceare Bgn Date     Service Area End date     Priority
9856698     1469     2952     3/5/2011     12/31/9999     35
9856698     3107     2952     12/10/2011     8/3/2012      100
Item      DC     Store     St Date     End date     Priority
9856698     1469     2952     3/5/2011     12/9/2011     35
9856698     3107     2952     12/10/2011 8/3/2012     100
9856698     1469     2952     8/4/2012     12/31/9999     35

The replay answer
Advertisement
There is a seperate forum for SQL and PL/SQL.
You need to post this at :
PL/SQL
And mark this thread as answered if possible.

Go to See the other 3 answers

Spliting a record into multiple rows

Category:DefaultRelease time:-0001-11-30Views:130

Hi experts, need your help for your to frame a query for the below requirement Scenario 1 For a same store fetch the record with least priority (35) and check if the Servicearea begin date & Servicearea end date of that store is minimum for that grou[More]

How to Insert Record with multiple rows

Category:DefaultRelease time:-0001-11-30Views:130

Hello alls, i want to ask something... how to use insert record server behavior -  php myysql, to insert multiple rows from textfiled? thanks.It would have been more helpful if you had shown me your existing code. However, this shows the basic princi[More]

How to convert columns of record into multiple rows

Category:DefaultRelease time:-0001-11-30Views:130

Hi, I have the following data: Col1 Col2 Col3 Dat1 Dat2 Dat3 I would like to convert the above data into: Col1 Dat1 Dat2 Dat3 How can I achieve this beside using UNION? Appreciate advise urgently. Thanks and Regards, Shiau ChinSorry, I misread your r[More]

BAPI_CATIMESHEETMGR_INSERT - BAPI_CATIMESHEETMGR_INSERT - MULTIPLE ROWS

Category:DefaultRelease time:-0001-11-30Views:130

Hi to all, I'm using bapi BAPI_CATIMESHEETMGR_INSERT to insert hours in CAT2 Transaction (timesheet ) . The function seems to be working fine . The only thing that I don't understand is why it splits records on multiple rows.  For example I append re[More]

Multiple Rows into single IDoc in LSMW

Category:DefaultRelease time:-0001-11-30Views:130

Hi. I am using on_change_transfer_record for header record. have succesfully done this for header and item segment level records. but not able to done the same at IDoc control record level. My problem is, Multiple IDocs are created for single record.[More]

How to make RECORD for saving multiple rows for each employee..

Category:DefaultRelease time:-0001-11-30Views:130

Hi, How can I create a record for saving multiple rows for each employee... (parent child relationship) I have created all required fields, then created a record, and then created a page. in that page i dragged-n-dropped a scroll area on that page an[More]

Insert multiple rows into a same table from a single record

Category:DefaultRelease time:-0001-11-30Views:130

Hi All, I need to insert multiple rows into a same table from a single record. Here is what I am trying to do and I need your expertise. I am using Oracle 11g DataFile 1,"1001,2001,3001,4001" 2,"1002,2002,3002,4002" The data needs to b[More]

Convert one record row into multiple rows

Category:DefaultRelease time:-0001-11-30Views:130

Hi,    I have small requirement.I have selected one data base record into an internal table.Now internal table has 1 record i.e 1 row(ex: 10 columns). Now i will convert this single row record into multiple  records i.e 10 rows( 10 columns wil; be co[More]

Insert multiple rows of records into the database

Category:DefaultRelease time:-0001-11-30Views:130

The codes below allow me to insert a row of record into the database. How would I changed these to insert multiple rows at once? Please help! String sql = "INSERT INTO EMPLOYEES" + "(First_Name, Last_Name, Title, Phone) " + " VALU[More]

How to return to the first record of a multiple row cursor (Forms 6i)

Category:DefaultRelease time:-0001-11-30Views:130

Hi all, I had a bit of a search through here, but couldn't quite find the answer I'm after. I have a multiple row cursor, which I feed into a multi-row block in Forms 6i. I have the following code: OPEN CURSOR; LOOP    FETCH CURSOR INTO :FIELD1, :FIE[More]

Multiple record in one row..

Category:DefaultRelease time:2015-10-11Views:130

Hi experts, I want to merge multiple row from same table into one row... is it possible? if so then how?? Regards, SKPSure, it's possible create table scott.a as select 1 a, 2 b from dual      union all select 3 a, 4 b from dual      create table sco[More]

Hot
Dear All, While selling the fixed asset, carried out the following procedure. Is it correct? In India, we need to pay excise. Due to this, the asset which is required to be sold, needs to be created as a material. Following steps are carried out - a) [More]
I'm supposed to have a 35MPS internet plan. When I switched to the higher speed plan, I paid for the Verizon router and installation.  I have both a Mac and Windows 7 Laptops as well as an older netbook.  To say that the wireless connectivity sucks w [More]
I recently upgraded to Leopard and after the first attempt some of the programs didn't perform properly. Long story short, the Geniuses at the Mac store told me to do an archive install but I was unable to (not enough hard drive space) and had to do [More]
I have a family iMac and an iPhone with a single Apple ID. My young son just got a iTouch and I'm trying to decide whether to create a new Apple ID for him or share my Apple ID? Can we Facetime each other on our devices with the same Apple ID? Can we [More]
On my ipad I have an iCloud Back-up alert that will not disppear, I am unable to use the ipad as I press OK and it won't do anything, any ideas???Here is a similar thread: https://discussions.apple.com/thread/4408608?start=0&tstart=0 Try turning off [More]
How do I set the default currency in Discoverer Plus? The currency in currently defaulting to $. Where is the setting to alter this so we can have UK pounds instead? The data has been entered in GBP.Thank you Esther, but, following your steps, when I [More]
After downloading movies to my computer I can play them in quicktime player. I can download them to itunes, but when I put them on my ipod after converting them the sound doesn't play. I figured that the sound doesn't play because it says its "muxed& [More]
Hi, My requirement is that i need to compare the creation time of two of the jars and see which one of the jar is the latest. I did it using the following code i get the output in the form of strings so i cant compare them to find which one is the la [More]
In working with Keynote for the first time and trying to add sound to a slide, I have put a number of pieces onto the slide. I can no longer get any of them to work independently (they all play at once when playing the slide) and need to remove all o [More]
I've been trying to reset the battery gauge on my Thinkpad X301 (Windows 7). The reset function does run the battery down and then recharge it, but the test is never officially ended, even when left running for days. The Battery Maintenance windows r [More]