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
Before moving to an area (SC) that doesn't have Verizon Internet,  I registered my domains and have been receiving and sending my verizon.net mail with no problems since November 2014.  However,  since Thursday 3/26/15, email clients on my Samsung An [More]
I have my MEGA180 on order but I already have some important questions: 1) This unit provides dual vga outputs. If I install my own AGP 8x card, will the VGA2 output still work? I read in the manual that installing an AGP card will disable VGA1 (defa [More]
Hi, there is a Weekly payroll area, Now after the payroll run every week -  I need to get all the wage types starting with '7' for the pernr s. For this i first find out the date (current date - 7 days)  and then pass it to FM : HRAR_GET_PAYROLL_PERI [More]
A week ago, Mail started opening Internet Explorer when I clicked on hyperlink within an email. Prior to this, it was opening Safari, which is what I wanted. I've looked everywhere I can think of in the OS and application to see if I can find a way t [More]
So here it is again- the end of my 2 year contract. I have had many versions of the iPhone since they launched in 2007 and instead of upgrading from my iPhone 4 to the lackluster iPhone 4S, I am deciding to shake it up. I am going to go the route of [More]
Here we go.....I am working on an assessment at Uni. I have written the following code. It compiles with no errors.....it starts to run (ie it asks for the 2 file names to impliment the equi-join) but it doesnt seem to pass a return value. The progra [More]
Can anyone help me out regarding why records are disappearing from query(BEx) when any attribute of XYZ_SALES is added.Hi Sridhar, Please check if there is any Restriction in BEX Query where you are excluding all records with 0MAT_SALES = #. Also if [More]
Ok, under...  Go > Computer > Macintosh HD > Users > Shared > There is a file called... NavAPvc.log What is this file and can I trash it??? I am trying to clean up my system as it has not been running well lately... Hanging and Crashing a l [More]
Hi I am using Adobe Captivate 5.5 in order to create a module from a PPT.  Current method we are using is that we are copying objects from PPT  and pasting them in Adobe Captivate 4. We are then converting the Adobe Captivate 4 project into Adobe Cap [More]
When I click on a playlist on the ipod it shows the name of the song playing, but I would like to have the album name shown first then the name of the song. Is there a way of doing this? I found that I can change all the columns in itune but the name [More]