Duplicate rows showing up in a table on the UI
Hi All,
We have a VO that returns 6 rows in a table on the UI. The rows become editable when a checkbox(a column in the table) is selected.
On running it, sometimes we are getting 12 rows on the UI such that the first 6 rows are shown again in the table in the same order.
When changes are made to this table and saved, only 6 rows are saved in the database table. Also, if 1 row is selected and the duplicate row of this row is not selected, then if we go to some other page and come back, the row that was selected earlier, will be unselected. If both the rows of same values are selected, only then the changes will be saved.
The VO query has 2 tables. Checked data in both of these tables and executed the query too, but did not find any data issue. Also, we are having an order by clause in the query and the data in the table is not showing up in order.
This is not occurring consistently but occurring for long durations.
Can anybody fix this?
Thanks,
Sakshi
Do you still have the "Music Video" Smart Playlist in iTunes? If you right click on a video file, which normally shows up under "Movies" you can pick the video type of Movie, Music Video, or TV Show. When you select "Music Video" the video file drops out of the Movies section and if the Music Video playlist is present will show up there.
You might have deleted that playlist so it wouldn't be on the iPod either.
So create a Smart Playlist where the rule is Video Kind IS Music Video...
Patrick
Similar Messages
-
Is there a way to determine which rows are inserted in JDT1 table by the system automatically?
Hi,
Is there a way to determine which rows are inserted in JDT1 table by the system automatically? Example, many GLs which are mapped in GL Account Determination, like Foreign Exchange Gain / Loss, Rounding Account, etc. are inserted by the system automatically in the Journal Entry on various scenarios, like during Incoming Payment, etc.
Which SQL query can give me those rows? Basically the WHERE condition should be based on which column or multiple columns in JDT1 table?
Thanks.Hi Rajesh,
I'm not entirely sure but I think the TransId is the same in the header that belongs to the transaction.
OINV.TransId = JDT1.TransId
Best regards,
Pedro Magueija -
Rich Tree Table Drop duplicate Row Keys (from different Rich Tables)
Hello.
My scenario looks like this:
Two tables (lets say productTable, and taskTable) as drag sources.
One Tree Table ( that should have the productTable items as a parent node, and the childNodes would be taskTable items), as a drop target..
In my test case, I was able to drag a row from a table, and drop it in a Tree Table. I could also program my drop listener in such a way that I could create child nodes. In my case I will only have 1 child node.
- Parent Node 1
- Child Node 1
- Child node 2
- Child node 3
- Parent Node 2
-Child node 4
Example of my Tables
Products
prod1
prod2
prod3
Tasks
Task1
Task2
Task3
Task4
If I drag prod1 to the tree table, and then drag task1, to the treetable (on top of the prod1), I can't release the task1. The component will not accept this draggable item. If I drag any other task, other than task1, I can successfully insert this tag as a child node. I think it has something to do with the Row key. I'm using the dataFlavor as:
<af:dataFlavor flavorClass="org.apache.myfaces.trinidad.model.RowKeySet"
discriminant="ProductTaskModel"/>
I think it has something to do with the row key, because if I drag prod2 to the treeTable and then try to put task2 in prod2 I get the same problem. I'm guessing that adf faces rc is generating the same row key for prod and task, and the tree table does not accept the same row key on top of the same row key.
prod1 - rk=1
prod2 - rk=2
prod3 - rk=3
task1 - rk=1
task2 - rk=2
task3 - rk=3
Does anyone think it has something to do with this ?
If it does, how can I generate different row keys ?
Thanks a lot,
JohnHi,
thanks for the testcase. I can reproduce the behavior. I found 2 minor issues in your code that I replied to you in a mail. I'll file a bug against the behavior. Should it turn out not to be a bug but a required coding change then I'll update this post
Frank -
Hi,
i have share point list like below
ID name AdminEmail Useremail URl DueDate UploadSatus
1 ppp [email protected] [email protected] url some date uploaded
2 yyy [email protected] [email protected] url somedate empty
3 xxx [email protected] [email protected] url somedate empty
4 jjj [email protected] [email protected] url somedate emp
AdminEmail and UserEmail are lookup column
i using query the list using caml query
inside of foreach i am checking two condition like below
one is upload status in not empty
i need to send to mail to admin user this part i have done my adding all list items which have datatable apply group by working fine
in send condition i am checking difference between DueDate And current date value
if the value is =1 or -1
if the value is i
thank
i am getting the
table like below
ID name AdminEmail Useremail URl DueDate Upload
2 yyy [email protected] [email protected] url somedate empty
3 xxx [email protected] [email protected] url somedate empty
4 jjj [email protected] [email protected] url somedate empty
my issue is here how can i get the dynamic table rows which are same values of AdminEmail and user email one set and distintict rows are another set
sets which are same emails are same
3 xxx [email protected] [email protected] url somedate empty
4 jjj [email protected] [email protected] url somedate empty
set 2
2 yyy [email protected] [email protected] url somedate empty
how can i get this separate this can any one tell i need to send mail only one time to user [adim and user] .planing to aviod duplicate mail
Srinivasyour case better to use the two data tables to store the data
DataTable dt = list.Items.GetDataTable();
foreach (DataRow row in dt.Rows) -
Hi All,
Our system have been recently upgraded to OBI 10.1.3.3.
We are facing a problem with the multiselect prompts in the application. Now some of the columns used as sources of the multiselect Dashboard prompts have duplicate rows.
Any idea how to suppress the duplicates and display only the distinct records?
Thanks in advanceIf the values that you are using in your dashboard prompt are from tables that are considered 'Dimension' tables in the Business Layer, then you will be OK.
From what I understand, the Oracle BI server always does a select distinct when querying dimension only data. It's only when you combine data from Business Model fact tables, that it removes the DISTINCT from the SQL that is generated.
Hope this helps. -
How to Not Display Exact Duplicate Rows in Report
I have a report that displays many duplicate rows where all fields in several rows are exact duplicates. I would like to know how to make it so that the entire row does not show up if it is an exact duplicate of another row. Any ideas? Thanks.
I literally have been pulling my hair out for the past 3 days with the same issue. I'm new to SSRS. I created a new report where I basically only wanted to show order header info, but unfortunately, some of the info I need to show at the header
level is only kept at the detail level. So, when I linked the order header to the order detail (one to many) I got a duplicate row for every line that was in the order detail. I tried to group just by order number (thinking it would roll
all the dups up) but that didn't work. Doing a group on all the fields on the report did the trick.
I owe Mainiac007 a beer!!!! :) -
How to delete the source table rows once loaded in Destination Table in SSIS?
Data Base=kssdata
Tables= Userdetails having 1000 rows
Using SSIS:
Taking A
OLE DB Source----------------->OLE DB Destination
Am Taking 200 rows in Source table and loaded into Destination table once
Constraint: here once 200 rows are exported in destination table , that 200 rows are deleted in source table
repeat the task as source table all the records are loaded into Destination table
After that am taking another 200 rows in source table and loaded into Destination tableProvided you've a sequential primary key or audit timestamp (datetime/date) column in the table you can do an approach like this
1. Add a execute sql task connectng to source db with below statement
SELECT COUNT(*) FROM table
Store the result in a variable
2. Have another variable and set it to below expression
(@[User::CountVariable]/200) + (@[User::CountVariable]%200 >0? 1:0)
by setting EvaluatesExpression as true. Here CountVariable is variable created in previous step
3. Have a for loop container with below settings
InitExpression
@NewVariable = @CounterVariable
EvalExpression
@NewVariable > 0
AssignExpression
@NewVariable = @NewVariable - 1
3. Add a data flow task with OLEDB source and OLEDB Destination
4. Use source query as
SELECT TOP 200 columns...
FROM Table
ORDER BY [PK | AuditColumn]
Use PK or audit column depending which one is sequential
5. After data flow task have a execute sql task with statement as below
DELETE t
FROM (SELECT ROW_NUMBER() OVER (ORDER BY PK) AS Rn
FROM Table)t
WHERE Rn <= 200
This will make sure the 200 records gets deleted each time
Please Mark This As Answer if it solved your issue
Please Vote This As Helpful if it helps to solve your issue
Visakh
My Wiki User Page
My MSDN Page
My Personal Blog
My Facebook Page -
Duplicate entries in REGUH and REGUP table
Dear All
Whenever we make payment in SAP either through FBZ5 or APP or any other payment transactions, SAP updates 2 tables REGUH and REGUP tables.
I believe SAP allows to make full payment for given invoice only once.
We are seeing some duplicate entries in REGUH and REGUP table for the given Payment document and Invoice.
Does anybody faced similar kind of issue
Regards
Madhan DI have been facing same kind of problem but in REGUP table, in Payment programe I have make cheque formart in smartform and made Z copy of payment program ZRFFOUS_C, I have also not find out the solution yet, it might be the issue of Z programe or SAP. I am using the ECC5.
I have to control this issue during printing cheque and delete duplicate entry. but still REGUP table have the duplicate entry.
if you find some solution please share with me
Regards -
Duplicate Rows In Oracle Pipelined Table Functions
Hi fellow oracle users,
I am trying to create an Oracle piplined table function that contains duplicate records. Whenever I try to pipe the same record twice, the duplicate record does not show up in the resulting pipelined table.
Here's a sample piece of SQL:
/* Type declarations */
TYPE MY_RECORD IS RECORD(
MY_NUM INTEGER
TYPE MY_TABLE IS TABLE OF MY_RECORD;
/* Pipelined function declaration */
FUNCTION MY_FUNCTION RETURN MY_TABLE PIPELINED IS
V_RECORD MY_RECORD;
BEGIN
-- insert first record
V_RECORD.MY_NUM = 1;
PIPE ROW (V_RECORD);
-- insert second duplicate record
V_RECORD.MY_NUM = 1;
PIPE ROW (V_RECORD);
-- return piplined table
RETURN;
END;
/* Statement to query pipelined function */
SELECT * FROM TABLE( MY_FUNCTION ); -- for some reason this only returns one record instead of two
I am trying to get the duplicate row to show up in the select statement. Any help would be greatly appreciated.Can you provide actual output from an SQL*Plus prompt trying this? I don't see the same behavior
SQL> SELECT * FROM V$VERSION;
BANNER
Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bi
PL/SQL Release 10.2.0.4.0 - Production
CORE 10.2.0.4.0 Production
TNS for 64-bit Windows: Version 10.2.0.4.0 - Production
NLSRTL Version 10.2.0.4.0 - Production
SQL> CREATE TYPE MY_RECORD IS OBJECT(MY_NUM INTEGER);
2 /
Type created.
SQL> CREATE TYPE MY_TABLE IS TABLE OF MY_RECORD;
2 /
Type created.
SQL> CREATE OR REPLACE FUNCTION MY_FUNCTION
2 RETURN MY_TABLE
3 PIPELINED
4 AS
5 V_RECORD MY_RECORD;
6 BEGIN
7 V_RECORD.MY_NUM := 1;
8 PIPE ROW(V_RECORD);
9
10 V_RECORD.MY_NUM := 1;
11 PIPE ROW(V_RECORD);
12
13 RETURN;
14 END;
15 /
Function created.
SQL> SELECT * FROM TABLE(MY_FUNCTION);
MY_NUM
1
1 -
I have five tables(A,B,C,D,E), and I am trying to check for duplicate rows in all the tables, I tried using inner join, but the first three join did not return any table. is there another way.the tables only have two columns , the email(different values)
and authour (which is the same person in the table)
when i tried
select * from TABLE A
INNER JOIN TABLE B
ON TABLEA. EMAIL = TABLEB.EMAIL
INNER JOIN TABLEC
ON TABLEA.EMAIL=TABLEC.EMAIL
it came back with no result, the other way I am thinking is to unioun all all the tables and try to use count and group by ,but this will only show me the duplicates and not the authours
please any other wayit came back with no result, the other way I am thinking is to unioun all all the tables and try to use count and group by (but I could not insert my result in a new table)
please any other way
I dont understand your point here...Are you trying the below?
Create Table T1(name varchar(50),Email Varchar(50))
Insert into T1 Values('SQL','[email protected]'),('.NET','[email protected]')
Create Table T2(name varchar(50),Email Varchar(50))
Insert into T2 Values('Server','[email protected]'),('BizTalk','[email protected]')
Create Table T3(name varchar(50),Email Varchar(50))
Insert into T2 Values('Sql','[email protected]'),('server','[email protected]')
;With cte as
(Select * From T1
Union All
Select * From T2
Union All
Select * From T3)
Select name,email, count(1) From cte Group by name , email having count(1)>1
Drop table T1,T2,T3
I was able to insert the union product in a table, and i used this
SELECT EMAIL,AUTHOR,COUNT(EMAIL) AS AMOUNT FROM ALLEMAIL
GROUP BY AUTHOR,EMAIL
ORDER BY AMOUNT DESC, email desc
but its showing the email and the count but its appearing like the duplicate is only associated with one authour -
Identifying and reporting Duplicate rows from table
I want to fetch all the duplicate row from the table and need to report all of it.
I am trying to run the below query but and not getting the expected output. Please help me.
Query
SELECT * FROM ADDT_RPT_REQ A WHERE
TRIM(A.EMAIL_ADDR) IN
(SELECT TRIM(EMAIL_ADDR) FROM ADDT_RPT_REQ B
WHERE TRIM(B.EMAIL_ADDR) = TRIM(A.EMAIL_ADDR)
AND A.ph_num IN
(SELECT PH_NUM FROM ADDT_RPT_REQ B
WHERE TRIM(A.PH_NUM ) = TRIM(B.PH_NUM)
There are in all 7 columns in the table where id is Unique Id.
The expected output is something like.
FST_NAME LAST_NAME EMAIL_ADDR WORK_PH_NUM ROW_ID LAST_UPD BU_ID
VALERIE HALL [email protected] 7819370177 2-21N-4312 31-AUG-04 0-R9NH
VALERIE HALL [email protected] 7819373737 2-21N-4327 29-JAN-04 0-R9NH
VALERIE HALL [email protected] 6034272034 2-21N-4309 04-APR-03 0-R9NH
VALERIE HALL [email protected] 7819373737 2-21N-4317 04-APR-03 0-R9NH
VALERIE HALL [email protected] 8563748820 2-21N-4329 31-AUG-04 0-R9NH
VALERIE HALL [email protected] 7819373737 2-21N-4319 04-APR-03 0-R9NH
VALERIE HALL [email protected] 7819373737 2-21N-4326 04-APR-03 0-R9NH
VALERIE HALL [email protected] 7819373737 2-21N-4324 04-APR-03 0-R9NH
VALERIE HALL [email protected] 8604237395 2-21N-4330 31-AUG-04 0-R9NH
VALERIE HALL [email protected] 7819373731 2-21N-4314 31-AUG-04 0-R9NH
VALERIE HALLORAN [email protected] 6194771101 2-21N-4331 31-OCT-05 0-R9NH
VALERIE HALL [email protected] 7819373737 2-21N-4316 04-APR-03 0-R9NH
VALERIE HALL [email protected] 7819373737 2-21N-4321 04-APR-03 0-R9NH
VALERIE HALL [email protected] 7819373737 7-1W4N-293 15-MAY-04 0-R9NH
VALERIE HALL [email protected] 2032341604 2-21N-4307 31-AUG-04 0-R9NH
VALERIE HALL [email protected] 7819373737 2-21N-4325 04-APR-03 0-R9NH
VALERIE HALL [email protected] 7819373737 2-21N-4315 29-JAN-03 0-R9NH
VALERIE HALL [email protected] 7819373737 7-1W4N-291 15-MAY-04 0-R9NH
VALERIE HALLORAN [email protected] 6194771101 2-21N-4332 31-OCT-05 0-R9NH
VALERIE HALL [email protected] 6038885349 2-21N-4310 31-AUG-04 0-R9NH
VALERIE HALL [email protected] 7819373737324 2-21N-4328 31-AUG-04 0-R9NH
VALERIE HALL [email protected] 7819370177324 2-21N-4313 31-AUG-04 0-R9NHHi again!
Try that:
SELECT rowid, fst_name, last_name, email_addr, work_ph_num, row_id, last_upd, bu_id
FROM ADDT_RPT_REQ A
WHERE rowid > (SELECT MIN(rowid)
FROM ADDT_RPT_REQ B
WHERE B.fst_name = A.fst_name
AND B.last_name = A.last_name
AND B.email_addr = A.email_addr
AND B.work_ph_num = A.work_ph_num
AND B.row_id = A.row_id
AND B.last_upd = A.last_upd
AND B.bu_id = A.bu_id);This query should show you all duplicate rows. Use the rowid and DELETE to get rid of these rows.
DELETE FROM addt_rpt_req A
WHERE rowid IN (SELECT rowid
FROM (SELECT rowid, row_number() OVER (PARTITION BY fst_name, last_name, email_addr, work_ph_num, row_id, last_upd, bu_id
ORDER BY row_id) dup
FROM addt_rpt_req)
WHERE dup > 1);Yours sincerely
Florian W.
Edited by: Florian W. on 17.06.2009 14:17 -
Merge two rows & show in a single row in table results
Hi, I need to merge 2 rows having 3 columns in a single row in table view
The cols are currently shown as :
Project NO-------(Current_Month) Revenue----------(Prior_Month) Revenue
123123 10000
20000
Revenue is a single column with revenue for diffreent Period.
10000 is for May
20000 is for April
Project NO for both are same, just the periods are different. if I am not displaying Period i need to merge the 2 rows & show as
Project NO-------(Current_Month) Revenue----------(Prior_Month) Revenue
123123 10000 20000
Please let me know how we can acheive this??
thanx
Pankaj123123 is the project number..
the above is not getting displayed properly....as the blank spaces are removed...
Please consider this -
I have a master table and i need to import the rows into the parent and child table.
Master table name is Flatfile_Inventory
Parent Table name is INVENTORY
Child Tables name are INVENTORY_AMOUNT,INVENTORY_DETAILS,INVENTORY_VEHICLE,
Error details will be goes to LOG_INVENTORY_ERROR
I have 4 duplicate rows in the Flatfile_Inventory which i have already inserted in the Parent and child table.
Again when i run the query using stored procedure,
its tells that all the 4 rows are duplicate and will move to the Log_Inventory_Error.
I need is if i have the duplicate rows in the flatfile_Inventory when i start inserting into the parent and child table the already inserted row have the unique ID i
must identify it and delete that row in the both parent and chlid table.And latest row must get inserted into the Parent and child table from Flatfile_Inventory.
Please help me to write the query i have attached the Full stored procedure Script..
Arunraj KumarHi Santhosh,
This is my Script.
-- =============================================
-- Stored Procedure for FLATFILE_INVENTORY
-- =============================================
-- Drop stored procedure if it already exists
DROP PROCEDURE SP_Flatfile_Inventory
GO
CREATE PROCEDURE SP_Flatfile_Inventory
AS
--USE IconicMarketing
GO
DECLARE
@FileType varchar(50) ,
@ACDealerID varchar(50) ,
@ClientDealerID varchar(50) ,
@DMSType varchar(50) ,
@StockNumber varchar(50) ,
@InventoryDate datetime ,
@StockType varchar(100) ,
@DMSStatus varchar(50) ,
@InvoicePrice numeric(18, 2) ,
@CostPack varchar(50) ,
@SalesCost numeric(18, 2) ,
@HoldbackAmount numeric(18, 2) ,
@ListPrice numeric(18, 2) ,
@MSRP varchar(max) ,
@LotLocation varchar(50) ,
@TagLine varchar(max) ,
@Certification varchar(max) ,
@CertificationNumber varchar(max) ,
@VehicleVIN varchar(50) ,
@VehicleYear bigint ,
@VehicleMake varchar(50) ,
@VehicleModel varchar(50) ,
@VehicleModelCode varchar(50) ,
@VehicleTrim varchar(50) ,
@VehicleSubTrimLevel varchar(max) ,
@Classification varchar(max) ,
@TypeCode varchar(100) ,
@VehicleMileage bigint ,
@EngineCylinderCount bigint ,
@TransmissionType varchar(50) ,
@VehicleExteriorColor varchar(50) ,
@VehicleInteriorColor varchar(50) ,
@CreatedDate datetime ,
@LastModifiedDate datetime ,
@ModifiedFlag varchar(max) ,
@InteriorColorCode varchar(50) ,
@ExteriorColorCode varchar(50) ,
@PackageCode varchar(50) ,
@CodedCost varchar(50) ,
@Air varchar(100) ,
@OrderType varchar(max) ,
@AgeDays bigint ,
@OutstandingRO varchar(50) ,
@DlrAccessoryRetail varchar(50) ,
@DlrAccessoryCost varchar(max) ,
@DlrAccessoryDesc varchar(max) ,
@ModelDesc varchar(50) ,
@Memo1 varchar(1000) ,
@Memo2 varchar(max) ,
@Weight varchar(max) ,
@FloorPlan numeric(18, 2) ,
@Purchaser varchar(max) ,
@PurchasedFrom varchar(max) ,
@InternetPrice varchar(50) ,
@InventoryAcctDollar numeric(18, 2) ,
@VehicleType varchar(50) ,
@DealerAccessoryCode varchar(50) ,
@AllInventoryAcctDollar numeric(18, 2) ,
@BestPrice varchar(50) ,
@InStock bigint ,
@AccountingMake varchar(50) ,
@GasDiesel varchar(max) ,
@BookValue varchar(10) ,
@FactoryAccessoryDescription varchar(max) ,
@TotalReturn varchar(10) ,
@TotalCost varchar(10) ,
@SS varchar(max) ,
@VehicleBody varchar(max) ,
@StandardEquipment varchar(max) ,
@Account varchar(max) ,
@CalculatedPrice varchar(10) ,
@OriginalCost varchar(10) ,
@AccessoryCore varchar(10) ,
@OtherDollar varchar(10) ,
@PrimaryBookValue varchar(10) ,
@AmountDue varchar(10) ,
@LicenseFee varchar(10) ,
@ICompany varchar(max) ,
@InvenAcct varchar(max) ,
@Field23 varchar(max) ,
@Field24 varchar(max) ,
@SalesCode varchar(max) ,
@BaseRetail varchar(10) ,
@BaseInvAmt varchar(10) ,
@CommPrice varchar(10) ,
@Price1 varchar(10) ,
@Price2 varchar(10) ,
@StickerPrice varchar(10) ,
@TotInvAmt varchar(10) ,
@OptRetail varchar(max) ,
@OptInvAmt varchar(10) ,
@OptCost varchar(10) ,
@Options varchar(max) ,
@Category varchar(max) ,
@Description varchar(max) ,
@Engine varchar(max) ,
@ModelType varchar(max) ,
@FTCode varchar(max) ,
@Wholesale varchar(max) ,
@Retail varchar(max) ,
@Draft varchar(max) ,
@Inventoryid int;
DECLARE Inventory_Cursor CURSOR FOR
SELECT * from [dbo].[FLATFILE_INVENTORY];
OPEN Inventory_Cursor
FETCH NEXT FROM Inventory_Cursor
INTO @FileType ,
@ACDealerID ,
@ClientDealerID ,
@DMSType ,
@StockNumber ,
@InventoryDate ,
@StockType ,
@DMSStatus ,
@InvoicePrice ,
@CostPack ,
@SalesCost ,
@HoldbackAmount ,
@ListPrice ,
@MSRP ,
@LotLocation ,
@TagLine ,
@Certification ,
@CertificationNumber ,
@VehicleVIN ,
@VehicleYear ,
@VehicleMake ,
@VehicleModel ,
@VehicleModelCode ,
@VehicleTrim ,
@VehicleSubTrimLevel ,
@Classification ,
@TypeCode ,
@VehicleMileage ,
@EngineCylinderCount ,
@TransmissionType ,
@VehicleExteriorColor ,
@VehicleInteriorColor ,
@CreatedDate ,
@LastModifiedDate ,
@ModifiedFlag ,
@InteriorColorCode ,
@ExteriorColorCode ,
@PackageCode ,
@CodedCost ,
@Air ,
@OrderType ,
@AgeDays ,
@OutstandingRO ,
@DlrAccessoryRetail ,
@DlrAccessoryCost ,
@DlrAccessoryDesc ,
@ModelDesc ,
@Memo1 ,
@Memo2 ,
@Weight ,
@FloorPlan ,
@Purchaser ,
@PurchasedFrom ,
@InternetPrice ,
@InventoryAcctDollar ,
@VehicleType ,
@DealerAccessoryCode ,
@AllInventoryAcctDollar ,
@BestPrice ,
@InStock ,
@AccountingMake ,
@GasDiesel ,
@BookValue ,
@FactoryAccessoryDescription ,
@TotalReturn ,
@TotalCost ,
@SS ,
@VehicleBody ,
@StandardEquipment ,
@Account ,
@CalculatedPrice ,
@OriginalCost ,
@AccessoryCore ,
@OtherDollar ,
@PrimaryBookValue ,
@AmountDue ,
@LicenseFee ,
@ICompany ,
@InvenAcct ,
@Field23 ,
@Field24 ,
@SalesCode ,
@BaseRetail ,
@BaseInvAmt ,
@CommPrice ,
@Price1 ,
@Price2 ,
@StickerPrice ,
@TotInvAmt ,
@OptRetail ,
@OptInvAmt ,
@OptCost ,
@Options ,
@Category ,
@Description ,
@Engine ,
@ModelType ,
@FTCode ,
@Wholesale ,
@Retail ,
@Draft ;
WHILE @@FETCH_STATUS = 0
BEGIN
PRINT @VehicleVIN ;
-- ****************** insert into Inventory Table ***********
INSERT INTO INVENTORY
IconicDealerID,
StockNumber,
DMSType,
InventoryDate
VALUES (@ClientDealerID,@StockNumber,@DMSType,@InventoryDate);
set @Inventoryid = scope_identity();
PRINT @Inventoryid;
--Insert into Inventory_Details Table
INSERT INTO [INVENTORY_DETAILS]
InventoryID,
StockType,
DMSStatus,
LotLocation,
TagLine,
Certification,
CertificationNumber,
CreatedDate,
LastModifiedDate,
ModifiedFlag,
PackageCode,
OrderType,
AgeDays,
OutstandingRO,
Memo1,
Memo2,
Purchaser,
PurchasedFrom,
DealerAccessoryCode,
InStock,
AccountingMake,
SS,
Account,
AccessoryCore,
ICompany,
InvenAcct,
Field23,
Field24,
SalesCode,
Draft,
FTCode
VALUES (
@InventoryID,
@StockType,
@DMSStatus,
@LotLocation,
@TagLine,
@Certification,
@CertificationNumber,
@CreatedDate,
@LastModifiedDate,
@ModifiedFlag,
@PackageCode,
@OrderType,
@AgeDays,
@OutstandingRO,
@Memo1,
@Memo2,
@Purchaser,
@PurchasedFrom,
@DealerAccessoryCode,
@InStock,
@AccountingMake,
@SS,
@Account,
@AccessoryCore,
@ICompany,
@InvenAcct,
@Field23,
@Field24,
@SalesCode,
@Draft,
@FTCode
--Insert into Inventory_Amount Table
INSERT INTO [dbo].[INVENTORY_AMOUNT]
InventoryID,
AllInventoryAcctDollar,
OtherDollar,
PrimaryBookValue,
AmountDue,
LicenseFee,
CalculatedPrice,
OriginalCost,
BookValue,
TotalReturn,
TotalCost,
DlrAccessoryRetail,
DlrAccessoryCost,
DlrAccessoryDesc,
InternetPrice,
InventoryAcctDollar,
BestPrice,
Weight,
FloorPlan,
CodedCost,
InvoicePrice,
CostPack,
SalesCost,
HoldbackAmount,
ListPrice,
MSRP,
BaseRetail,
BaseInvAmt,
CommPrice,
Price1,
Price2,
StickerPrice,
TotInvAmt,
OptRetail,
OptInvAmt,
OptCost,
Wholesale,
Retail
VALUES (
@InventoryID,
@AllInventoryAcctDollar,
@OtherDollar,
@PrimaryBookValue,
@AmountDue,
@LicenseFee,
@CalculatedPrice,
@OriginalCost,
@BookValue,
@TotalReturn,
@TotalCost,
@DlrAccessoryRetail,
@DlrAccessoryCost,
@DlrAccessoryDesc,
@InternetPrice,
@InventoryAcctDollar,
@BestPrice,
@Weight,
@FloorPlan,
@CodedCost,
@InvoicePrice,
@CostPack,
@SalesCost,
@HoldbackAmount,
@ListPrice,
@MSRP,
@BaseRetail,
@BaseInvAmt,
@CommPrice,
@Price1,
@Price2,
@StickerPrice,
@TotInvAmt,
@OptRetail,
@OptInvAmt,
@OptCost,
@Wholesale,
@Retail
--Insert into Inventory_Vehicle Table
INSERT INTO [dbo].[INVENTORY_VEHICLE]
InventoryID,
InteriorColorCode,
ExteriorColorCode,
Air,
ModelDesc,
VehicleType,
VehicleVIN,
VehicleYear,
VehicleMake,
VehicleModel,
VehicleModelCode,
VehicleTrim,
VehicleSubTrimLevel,
Classification,
TypeCode,
VehicleMileage
VALUES (
@InventoryID,
@InteriorColorCode,
@ExteriorColorCode,
@Air,
@ModelDesc,
@VehicleType,
@VehicleVIN,
@VehicleYear,
@VehicleMake,
@VehicleModel,
@VehicleModelCode,
@VehicleTrim,
@VehicleSubTrimLevel,
@Classification,
@TypeCode,
@VehicleMileage
-- Move cursor to Next record
FETCH NEXT FROM Inventory_Cursor
INTO @FileType ,
@ACDealerID ,
@ClientDealerID ,
@DMSType ,
@StockNumber ,
@InventoryDate ,
@StockType ,
@DMSStatus ,
@InvoicePrice ,
@CostPack ,
@SalesCost ,
@HoldbackAmount ,
@ListPrice ,
@MSRP ,
@LotLocation ,
@TagLine ,
@Certification ,
@CertificationNumber ,
@VehicleVIN ,
@VehicleYear ,
@VehicleMake ,
@VehicleModel ,
@VehicleModelCode ,
@VehicleTrim ,
@VehicleSubTrimLevel ,
@Classification ,
@TypeCode ,
@VehicleMileage ,
@EngineCylinderCount ,
@TransmissionType ,
@VehicleExteriorColor ,
@VehicleInteriorColor ,
@CreatedDate ,
@LastModifiedDate ,
@ModifiedFlag ,
@InteriorColorCode ,
@ExteriorColorCode ,
@PackageCode ,
@CodedCost ,
@Air ,
@OrderType ,
@AgeDays ,
@OutstandingRO ,
@DlrAccessoryRetail ,
@DlrAccessoryCost ,
@DlrAccessoryDesc ,
@ModelDesc ,
@Memo1 ,
@Memo2 ,
@Weight ,
@FloorPlan ,
@Purchaser ,
@PurchasedFrom ,
@InternetPrice ,
@InventoryAcctDollar ,
@VehicleType ,
@DealerAccessoryCode ,
@AllInventoryAcctDollar ,
@BestPrice ,
@InStock ,
@AccountingMake ,
@GasDiesel ,
@BookValue ,
@FactoryAccessoryDescription ,
@TotalReturn ,
@TotalCost ,
@SS ,
@VehicleBody ,
@StandardEquipment ,
@Account ,
@CalculatedPrice ,
@OriginalCost ,
@AccessoryCore ,
@OtherDollar ,
@PrimaryBookValue ,
@AmountDue ,
@LicenseFee ,
@ICompany ,
@InvenAcct ,
@Field23 ,
@Field24 ,
@SalesCode ,
@BaseRetail ,
@BaseInvAmt ,
@CommPrice ,
@Price1 ,
@Price2 ,
@StickerPrice ,
@TotInvAmt ,
@OptRetail ,
@OptInvAmt ,
@OptCost ,
@Options ,
@Category ,
@Description ,
@Engine ,
@ModelType ,
@FTCode ,
@Wholesale ,
@Retail ,
@Draft ;
END
CLOSE Inventory_Cursor;
DEALLOCATE Inventory_Cursor;
GO
SET ANSI_PADDING OFF
GO
Arunraj Kumar -
how to show employee names in descending order but 3rd row is fixed and always top on the table ?
for example employee names is A,B,C, D, E
and output is C,E,D,B,ASince you are posting in the design forum, the short answer is - you don't. Rows in a table have no inherent order that you can rely on and the "position" of rows is a visual characteristic that should be implemented by the application that displays
this information or by the query that is used to generate the resultset.
So the next question is how one accomplishes this particular order within a select statement. That is a tsql question which, for future reference, is best posted to the tsql forum. In addition, many of the questions or issues that you will face
have been discussed in the forums - often many, many times. The first thing you should do when faced with an issue is to simply search the forums and leverage the the knowledge that has already been discussed. In doing so you are quite likely to
see suggestions or related issues that you should consider in your search for a solution.
Now, to answer the question - you need to formulate a order by clause that forces the rows to be sorted in the manner you desire. Effectively you have 2 levels of sorting. The first level divides your rows into 2 groups. Group 1 consists
of rows where name = E and Group 2 is everything else. Following that you then need to sort the rows in each group by name in descending order. Something like:
order by case name when E then 1 else 2 end, name desc -
How to get duplicate rows in a large table
I have a table which consists of 26 columns and 2 milion records..while doing validation i suspect there are duplicate records in that table...
Is there any way to check duplicate rows in a table?I went through link..in all the messages query is for 2 or 3 columns...but my scenario is i have 26 columns ...and i suspect there is duplicate row inserting .for which value is same for all 26 columns .how should i do .?
do i need to do group by all 26 columns and do having count(*) ...26 times?
Maybe you are looking for
-
Hi experts, here is the scenario: A customer returns a prdouct he received from vendor on account of quality defects. What is the standard process followed by industry for this return scenario both in customer and vendor R/3 systems? Does customer se
-
How to append a line in alv grid display
Hi experts! I have to append a new line into my existing alv and then save it in the database. can you help me out with that. thanks
-
NO tab for apps on sync screen
I have downloaded some apps to my library. They are all in my library, but i have no apps tab on my sync screen so I can not get them out of my computer to my ipod. How can I get the apps tab on my sync screen?
-
Oracle Daignostic Logging Vs Log4j logging
Which type of logging is advisable/best for Oracle SOA applications? Oracle Daignostic Logging (ODL) or Log4j logging ? Thanks Sree
-
I can't attach .mdf operating system error:5
Hi everyone, I searched this error in form and internet but none of them solve my problem. I have windows 7 ultimate edition and ms sql server 2005 management studio & sql server express 2005. I have an mdf file when i try to attach it to sql server