AIR-CT5760-100-K9
Hi, We have configured 802.11ac for 5GHz Antenna but we do not have any client which supports 802.11ac for now. We have only windows7 PC which supports only 802.11b/g/n. Please let me know how do i test 802.11ac and confirm if it is working. Is it possible to test it with any third party plugin which can be installed on Win machine and test it?
Regards
MAC
Hi MAC,
Then you have to get a USB wireless adapter that will support 11ac. You should be able to find different products in the market
Here is one product (I haven't test it myself, but should work)
http://support.linksys.com/en-apac/support/adapters/AE6000
On your 5760 802.11a/n/ac band you have to set the channel-width to 80MHz to support 11ac. Here is the CLI commands to do that.
WLC5760(config)#ap dot11 5ghz shut
WLC5760(config)#ap dot11 5ghz rrm channel dca chan-width 80
WLC5760(config)#no ap dot11 5ghz shut
Once you do this, you can issue the following command to see the what channel AP assigned. You should see 4 channels assigned to 802.11ac support APs in your network
WLC5760#show ap dot11 5ghz summary
HTH
Rasika
*** Pls rate all useful responses ****
Similar Messages
-
Tracking RTU licenses on a AIR-CT5760-25-K9 controller
We purchased 2 Cisco AIR-CT5760-25-K9 Wireless LAN Controllers (we bought them as surplus used equipment)
We resold these 2 CT5760's to another reseller.
we were told that it currently has 0 active licenses and they want to return them
1.) Is it possible that the base 25 RTU licenses were transferred off the controller before this unit was sold as surplus?
2.) Could a reseller transfer the base 25 licenses from Our CT5760 to a 3850? (without authorization)
3) Is there any way to see the license history on a specific CT5760 controller?
I want to know what happened to the licenses that were on this controller.
Finally,
4) Can I easily replace the licenses? we want to bring these back up to 25 active licenses on both CT5760-25-K9's
Bruce Miller
Washington Equipment Brokers
[email protected]Hi Bruce,
I didnt go in to complete details ,getting confused.But here is what I know , License is transferable only between same type of devices. This comes as help when one device is dead and you receive an RMA. 5760 has RTU based licensing which is Right to use. You can add any number of AP adder license up to the maximum capacity supported. You just need to activate or deactivate what ever number you want and then reload.
Regards
Dhiresh
**Please rate all helpful posts** -
To all,
I have a customer who purchased (1) AIR-WLC4404-100-K9 to support (57) 1130 APs. However, he only purchased (1) GLC-SX-MM. Is it possible to configure the WLC to support 57 APs with only (1) Gigibit LAN network connection? This wireless network will only be used by guest users to get to the Internet, so there is no voice or other applications.
Thanks in advance,
NelsonData throughput on a 54Mbps wireless link is ~24 megs. With 57 radios, that's 1.4 gigs. If you're filling up your a and g bands, that's a max of 2.8 gigs of access capacity.
Your 1 gig uplink is slightly oversubscribed, but almost certainly not enough to worry about. Cisco's design recommendations allow an 8:1 uplink oversubscription from the before you even start to get concerned. If you have reason to think that all of your APs are going to be talking at full rate for an extended period at the same time, you might add a second gbic, but that's not a likely scenario in most environments. -
AIR-CT5760 and Prime Insfratructure
hello
i need to add AIR-CT5760 into PI - can anyone share some usefull docs how to do this?
thanksYou should share details on which is the PI version you are using, as 5760 is not supported on al PI's currently.
Infact, only in PI 2.0. On how to add it from PI, you can check the procedure here :
http://www.cisco.com/c/en/us/td/docs/net_mgmt/prime/infrastructure/2-0/user/guide/prime_infra_ug/gettingstarted.html#wp1058081
-Thanks
Vinod
**Rating Encourages contributors, and its really free. ** -
External monitor will not sleep using 2012 MacBook Air and HDMI adapter
I am running a HP 27xi (27" display) using the apple thunderbolt to HDMI adapter, and using a HDMI cable.
ISSUE:
I run my 2012 macbook air in "clamshell mode", and solely use the 27" display, which works great. Problem, is when the macbook goes to put the display to sleep, or sleep for the laptop, the display starts to go into power save mode, then flips back on... goes back into power save mode, repeats forever. I called HP, and they said the HDMI signal is not being turned off, hence why the screen keeps going ON, then power save, then repeat. If I shutdown the laptop, then the monitor goes off just fine.
Anyone else ran into an issue with an external monitor NOT going to sleep when plugged into the HDMI adapter? Someone suggusted that I purchase a DVI-D adapter, and use that cable... but that sounds ridiculous. The HDMI adapter should absolutely work.
My temporary fix is to turn off the monitor everytime (if i remember) otherwise the display is in this never ending loop of trying to shut down.
And yes, the Macbook Air is 100% up to date with updates. DRIVING ME CRAZY!!!
JoeHello Joe,
I definitely understand your concern regarding your external display not going to sleep and endlessly looping into power save mode when your MacBook Air is asleep.
I found an article with steps to troubleshoot issues with displays. This article is for internal and external displays, so you can skip any steps referring to the internal display. The following steps specifically stands out to me for the situation you are experiencing:
Reset the system
You can reset the Mac's parameter RAM and SMC.
You can find the full article here:
Apple computers: Troubleshooting issues with video on internal or external displays
http://support.apple.com/kb/ht1573
Thank you for using Apple Support Communities.
Best,
Sheila M. -
Worst performance of AIR for Desktop on PC
Hi,
I've been using AIR for mostly developing Android projects for my clients recently. And so far it's been pretty good for that.
I have noticed before and specifically with my current project, which is also simple branded Android app for a client, the performence of AIR on Desktop is worst of all my Android devices. When testing the app on PC, (ctrl + enter in Flash Pro) when simple animations starts, AIR takes 100% CPU on all cores on my i5 Dell with Intel HD4000 and Nvidia GF630M.
I was expecting it to run supper smooth on PC, while surprisingly, the app performs smooth on almost 3 years old Samsung Galaxy S2, then Galaxy Tab2, then chinese tab, and lastly comes PC, performace wise. For mobile, I have set the app to use GPU, and while testing on PC, I have tried all the "Render mode" options, but performance is exactly same.
I am not using Stage3D/Starling. It's just classic Flash, with timeline animations, and AS3 document class to make it all interactive.
Is it a must to use Stage3D/Starling combo to get same performance as on mobile, even for classic timeline style apps?
I thought Flash was getting improved on PC the most, but it feels like other way around :/
// chall3ng3r //Yes, I have tried debug and regular test, no diffirence.
I have noticed that as three timeline animations stop one by one (they are not too big graphically, it's just a slot machine app), performance gets better. But, still not compareable to GSG2. I'm not using any filters, I did applied the motion-blur in Photoshop in alternate gfx, and just use that when in running state.
Edit: also, i've tried with latest beta build, and latest release build. it's same.
// chall3ng3r // -
100 percent charge but shows 7 hours of time remaining??
Hi,
My 10 day old macbook air shows 100 percent chraged but 7 hrs of battery remaining ; then after few mins 8 hrs goes on increasing initially till 12 or may be more then again starts decreasing. Is that normal behavior?????In saying "it can change frequently depending on what you are doing with your computer" I'd just add "take it with a huge grain of salt and pay more attention to the percentage of charge remaining. In the course of just a few minutes I've seen the silly thing tell me I having anywhere between 1 hour and 4 hours left. And during that time I was doing the same darn thing.
-
MacBook AIr usb ethernet slow when connected to second switch
Hi,
We have MacBook Airs with 100 Mbps Apple USB ethernet adapters.
We have managed Cisco switches for the LAN.
We experience fast speeds when a USB etherenet/MacBook Air is connected directly to the switch.
However... if we introduce a second switch between the MacBook AIr and the main Cisco switch we experience horiffic slowdowns for some (not all) network activity.
For example, we have IP phones with ethernet passthrough. They work great with iMacs and Thunderbok Macbook Airs. However, if we connect a MacBook AIr/etherenet adpater to the ethernet phone, we expereience a horrific slowdown when using Apple Remote Desktop Manage > Copy items... (and also on connectoins to an in-house database). It's probably 15 - 20x slower than when connected directly to the Cisco switch. Other network operatoins work at expected speeds an the Air.
It's not just connecting to IP phnones that causes this problem. If I use a Netgear 1000/100 switch on the desktop, set up as
MacBok Air USB ethernet > Netgear > Cisco
we have the same horrible slowdown for some network operations.
I purchased a 3rd party USB adpater, but had the same results.
Can anyone shed any light on this issue, please? Is there a setting onn teh CISCO switch that is causing the problem? Any know problmes with USB etherenet on MacBook air.
Many thanks,
b.RonAnnArbor wrote:
Is this a question? A complaint? Nothing any of us can do about that, and this is a well-documented and well-known issue.
It doesn't effect most MBA users who most likely use wireless for most of their transactions, and the times you need to use ethernet, you are right, it will run slower.
Just curious I have a pretty fast 5N wifi network. If I'm setting up a new MB Air from another laptop is it going to be faster through the ethernet adapter or the wifi network? -
CT5760 HA Pair not Forming?
We just received a pair of wireless controllers, AIR-CT-5760-K9 and AIR-CT5760-HA-K9.
I've wired them together with the StackWise cable, as we typically do with our 3850s (top left <-> bottom right, bottom left <-> top right, screws hand-tightenend). However, they're not seeing each other, stack ports show as "down" and have no neighbors.
I can't find any documentation on what, if any, additional configuration or commands are necessary for the two controllers to form an HA stack.
Looking at the documentation, it implies that we need to be running 3.3+. The boxes, including the HA SKU, shipped with 3.2. That can't be right, right?Okay... N+1 is supported on 3.2, if you want to run AP SSO, you need 3.3
N+1
http://www.cisco.com/en/US/docs/wireless/technology/5760_deploy/High_Availability.html
AP SSO
http://www.cisco.com/en/US/docs/wireless/controller/technotes/5700/software/release/ios_xe_33/5760_HA_DG_iosXE33.html
Thanks,
Scott
Help out other by using the rating system and marking answered questions as "Answered" -
MacBook Pro Slow Booting and Operating
Hi all, I've been searching around the forum all day reading similar entries and trying some of the proposed fixes, but unfortunately none of them have helped my situation.
Last night I was working on my machine as normal, running a program called Pro Tools for audio work, and it froze up on me. Eventually I had to force the program to quit and was able to restart and run with success. However, this morning when I started up the machine for a session I was taken back by how slowly it booted up. I was even more taken back by how slow the machine was operating once booted. This has never happened. It is even freezing momentarily as I type this with the colored wheel spinning.
So far I've made a backup with Time Machine, put preferences in another folder temporarily, repaired disk permissions, checked SMART status is GOOD, reset SMC, and I'm sure some other things I can't remember.
Activity monitor is good - shows CPU @ 80% idle, and RAM is 5.53GB Free of 8 GB.
Here is a log of my last boot. As I understand it this may help some of you more advanced users in identifying any causes. THANKS in advance for any advice!!!
Jul 6 17:52:27 localhost bootlog[44]: BOOT_TIME: 1404683531 0
Jul 6 17:52:33 localhost blued[17]: Apple Bluetooth daemon started
Jul 6 17:53:11 localhost /System/Library/CoreServices/loginwindow.app/Contents/MacOS/loginwindow[32]: Login Window Application Started
Jul 6 17:53:12 localhost configd[13]: bootp_session_transmit: bpf_write(en1) failed: Network is down (50)
Jul 6 17:53:12 localhost configd[13]: DHCP en1: INIT-REBOOT transmit failed
Jul 6 17:53:13 localhost configd[13]: network configuration changed.
Jul 6 17:53:13 localhost mDNSResponder[31]: mDNSResponder mDNSResponder-258.21 (May 26 2011 14:40:13) starting
Jul 6 17:53:18 localhost com.apple.usbmuxd[23]: usbmuxd-323.1 on Oct 3 2013 at 12:43:24, running 64 bit
Jul 6 17:53:19 localhost com.apple.SystemStarter[24]: PACESupport - launchd already started us
Jul 6 17:53:23 localhost configd[13]: network configuration changed.
Jul 6 17:53:44: --- last message repeated 1 time ---
Jul 6 17:53:44 localhost root[100]: /usr/libexec/ntpd-wrapper: scutil key State:/Network/Global/DNS not present after 30 seconds
Jul 6 17:53:46 localhost root[104]: sntp options: a=2 v=1 e=0.100 E=5.000 P=2147483647.000
Jul 6 17:53:46 localhost root[104]: d=15 c=5 x=0 op=1 l=/var/run/sntp.pid f= time.apple.com
Jul 6 17:53:46 localhost root[104]: sntp: getaddrinfo(hostname, ntp) failed with nodename nor servname provided, or not known
Jul 6 17:53:56 localhost loginwindow[32]: Login Window Started Security Agent
Jul 6 17:53:57 localhost WindowServer[83]: kCGErrorFailure: Set a breakpoint @ CGErrorBreakpoint() to catch errors as they are logged.
Jul 6 17:53:57 localhost com.apple.WindowServer[83]: Sun Jul 6 17:53:57 localhost WindowServer[83] <Error>: kCGErrorFailure: Set a breakpoint @ CGErrorBreakpoint() to catch errors as they are logged.
Jul 6 17:54:02 localhost warmd[22]: [fetcher_open_file:936] open("/var/db/dyld/dyld_shared_cache_x86_64") => -1 (errno: 2)
Jul 6 17:54:02 localhost warmd[22]: [fetcher_open_file:936] open("/var/db/dyld/dyld_shared_cache_i386") => -1 (errno: 2)
Jul 6 17:54:04 localhost SecurityAgent[128]: NSSecureTextFieldCell detected a field editor ((null)) that is not a NSTextView subclass designed to work with the cell. Ignoring...
Jul 6 17:54:04 localhost loginwindow[32]: Login Window - Returned from Security Agent
Jul 6 17:54:04 localhost loginwindow[32]: USER_PROCESS: 32 console
Jul 6 17:54:04 localhost com.apple.launchd.peruser.501[137] (com.spotify.webhelper): Unknown key: SpotifyPath
Jul 6 17:54:04 localhost com.apple.launchd.peruser.501[137] (com.apple.ReportCrash): Falling back to default Mach exception handler. Could not find: com.apple.ReportCrash.Self
Jul 6 17:55:38 localhost XProtectUpdater[21]: NSURLConnection error: Error Domain=NSURLErrorDomain Code=-1009 UserInfo=0x101f20420 "This computer’s Internet connection appears to be offline." Underlying Error=(Error Domain=kCFErrorDomainCFNetwork Code=-1009 UserInfo=0x101f7ad00 "This computer’s Internet connection appears to be offline.")
Jul 6 17:55:38 localhost com.apple.launchd[1] (com.apple.xprotectupdater[21]): Exited with exit code: 255
Jul 6 17:56:38 localhost com.apple.launchd.peruser.501[137] (com.apple.Kerberos.renew.plist[155]): Exited with exit code: 1
Jul 6 17:56:38 localhost com.apple.launchd.peruser.501[137] (com.apple.mrt.uiagent[154]): Exited with exit code: 255
Jul 6 17:56:48 localhost com.apple.launchd.peruser.501[137] ([email protected][158]): Exited with exit code: 1
Jul 6 17:57:54 localhost mdworker[147]: (Error) SyncInfo: Catalog changed during searchfs too many times -- falling back to fsw search /If you don't use Digidesign Pro Tools often you can dual boot when needed to run the software.
Possible it's the hard drive? If so any recommendations? SSD???
It's possible this is a sign of a failing drive. SSD would give your comuter a big boost. Check out the videos on how to install on this site.
This site is recommended here by many of the posters. You might look at upgrading your RAM if you only have 4GB installed.
http://eshop.macsales.com/installvideos/
Upgrade RAM
Open System Profiler > Hardware
Copy the Serial number and model identifier
Under Memory in System Profiler, you'll see how many slots and what is installed. You need matching pairs. Most likely you will have to replace RAM you have installed unless you have 4 slots and are only using 2 slots.
Go to this page:
http://support.apple.com/specs/
Copy the Serial number in the "Search Tech Specs" search box. This will take you to the info on your computer.
(Note: Apple specs often do not show how much you can add to older computers. Macsales has tested and found more RAM can be installed than indicated by Apple. If you are upgrading an older computer, I suggest checking with sales first to see how much more you can add.)
Before you do costly repairs on an old Mac compare it to the cost of a new MacBook Air. Apple recently dropped the prices on the MacBook Airs by $100. Best Buy has been offering additional discounts on the Air. Prices start around $850.
http://store.apple.com/us/buy-mac/macbook-air
If you do purchase a new computer, get 8GB RAM. RAM is soldered in and you can't upgrade later.
Check out Apple's Special Financing link.
http://store.apple.com/us/browse/finance/instant_credit -
How to use direct select and insert or load to speedup the process instead of cursur
Hi friends,
I have stored procedure .In SP i am using cursur to load data from Parent to several child table.
I have attached the script with this message.
And my problem is how to use direct select and insert or load to speedup the process instead of cursur.
Can any one please suggest me how to change this scripts pls.
USE [IconicMarketing]
GO
/****** Object: StoredProcedure [dbo].[SP_DMS_INVENTORY] Script Date: 3/6/2015 3:34:03 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
-- =============================================
-- Author: <ARUN,NAGARAJ>
-- Create date: <11/21/2014>
-- Description: <STORED PROCEDURE FOR DMS_INVENTORY>
-- =============================================
ALTER PROCEDURE [dbo].[SP_DMS_INVENTORY]
@Specific_Date varchar(20) ,
@DealerNum Varchar(6),
@Date_Daily varchar(50)
AS
BEGIN
SET NOCOUNT ON;
--==========================================================================
-- INVENTORY_CURSUR
--==========================================================================
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 varchar(10) ,
@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 bigint,
@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),
@Options1 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),
@myerror varchar(500),
@Inventoryid int,
@errornumber int,
@errorseverity varchar(500),
@errortable varchar(50),
@errorstate int,
@errorprocedure varchar(500),
@errorline varchar(50),
@errormessage varchar(1000),
@Invt_Id int,
@flatfile_createddate datetime,
@FtpDate date,
@Inv_cur varchar(1000),
@S_Year varchar(4),
@S_Month varchar(2),
@S_Date varchar(2),
@Date_Specfic varchar(50),
@Param_list nvarchar(max),
@Daily_Date Varchar(50);
--====================================================================================
--DECLARE CURSUR FOR SPECIFIC DATE (OR) DEALER-ID WITH SPECIFIC DATE (OR) CURRENT DATE
--====================================================================================
set @Date_Specfic = Substring(@Specific_Date,1,4) +'-'+Substring(@Specific_Date,5,2)+'-'+Substring(@Specific_Date,7,2);
set @Daily_Date = SUBSTRING(@Date_Daily,14,4) + '-' + SUBSTRING(@Date_Daily,18,2)+ '-' + SUBSTRING(@date_Daily,20,2)
IF @Daily_Date IS NOT NULL
BEGIN
Delete From [dbo].[DMS_INVENTORY_DETAILS]
Where DMSInventoryID in(select ID from [dbo].[DMS_INVENTORY] where CONVERT (date,FtpDate)=CONVERT (date,GETDATE()));
Delete From [dbo].[DMS_INVENTORY_AMOUNT]
Where DMSInventoryID in(select ID from [dbo].[DMS_INVENTORY] where CONVERT (date,FtpDate)=CONVERT (date,GETDATE()));
Delete From [dbo].[ICONIC_INVENTORY_VEHICLE]
Where DMSInventoryVehicleID in(select ID from [dbo].[DMS_INVENTORY] where CONVERT (date,FtpDate)=CONVERT (date,GETDATE()));
Delete From [dbo].[DMS_INVENTORY_VEHICLE]
Where DMSInventoryID in(select ID from [dbo].[DMS_INVENTORY] where CONVERT (date,FtpDate)=CONVERT (date,GETDATE()));
Delete From [dbo].[ICONIC_EQUITY_INVENTORY_COMPARE]
Where InventoryVehicleId in(select ID from [dbo].[DMS_INVENTORY] where CONVERT (date,FtpDate)=CONVERT (date,GETDATE()));
Delete From [dbo].[DMS_INVENTORY]
Where ID in(select ID from [dbo].[DMS_INVENTORY] where CONVERT (date,FtpDate)=CONVERT (date,GETDATE()));
DECLARE Inventory_Cursor CURSOR FOR
SELECT * from [dbo].[FLATFILE_INVENTORY] where
CONVERT (date,flatfile_createddate) = CONVERT (date,GETDATE()) order by flatfile_createddate;
END
Else
BEGIN
if (@Date_Specfic IS NOT NULL AND @DealerNum != '?????')
BEGIN
Delete From [dbo].[DMS_INVENTORY_DETAILS]
Where DMSInventoryID in(select ID from [dbo].[DMS_INVENTORY] where FtpDate=@Date_Specfic AND DMSDealerID='ACTEST' + @DealerNum);
Delete From [dbo].[DMS_INVENTORY_AMOUNT]
Where DMSInventoryID in(select ID from [dbo].[DMS_INVENTORY] where FtpDate=@Date_Specfic AND DMSDealerID='ACTEST' + @DealerNum);
Delete From [dbo].[ICONIC_INVENTORY_VEHICLE]
Where DMSInventoryVehicleID in(select ID from [dbo].[DMS_INVENTORY] where FtpDate=@Date_Specfic AND DMSDealerID='ACTEST' + @DealerNum);
Delete From [dbo].[DMS_INVENTORY_VEHICLE]
Where DMSInventoryID in(select ID from [dbo].[DMS_INVENTORY] where FtpDate=@Date_Specfic AND DMSDealerID='ACTEST' + @DealerNum);
Delete From [dbo].[ICONIC_EQUITY_INVENTORY_COMPARE]
Where InventoryVehicleId in(select ID from [dbo].[DMS_INVENTORY] where FtpDate=@Date_Specfic AND DMSDealerID='ACTEST' + @DealerNum);
Delete From [dbo].[DMS_INVENTORY]
Where ID in(select ID from [dbo].[DMS_INVENTORY] where FtpDate=@Date_Specfic AND DMSDealerID='ACTEST' + @DealerNum);
DECLARE Inventory_Cursor CURSOR FOR
SELECT * from [dbo].[FLATFILE_INVENTORY] where FtpDate=@Date_Specfic AND ACDealerID='ACTEST' + @DealerNum;
END
ELSE
BEGIN
Delete From [dbo].[DMS_INVENTORY_DETAILS]
Where DMSInventoryID in(select ID from [dbo].[DMS_INVENTORY] where FtpDate=@Date_Specfic);
Delete From [dbo].[DMS_INVENTORY_AMOUNT]
Where DMSInventoryID in(select ID from [dbo].[DMS_INVENTORY] where FtpDate=@Date_Specfic);
Delete From [dbo].[ICONIC_INVENTORY_VEHICLE]
Where DMSInventoryVehicleID in(select ID from [dbo].[DMS_INVENTORY] where FtpDate=@Date_Specfic);
Delete From [dbo].[DMS_INVENTORY_VEHICLE]
Where DMSInventoryID in(select ID from [dbo].[DMS_INVENTORY] where FtpDate=@Date_Specfic);
Delete From [dbo].[ICONIC_EQUITY_INVENTORY_COMPARE]
Where InventoryVehicleId in(select ID from [dbo].[DMS_INVENTORY] where FtpDate=@Date_Specfic);
Delete From [dbo].[DMS_INVENTORY]
Where ID in(select ID from [dbo].[DMS_INVENTORY] where FtpDate=@Date_Specfic);
DECLARE Inventory_Cursor CURSOR FOR
SELECT * from [dbo].[FLATFILE_INVENTORY] where FtpDate=@Date_Specfic;
END
END
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 ,
@Options1 ,
@Category ,
@Description ,
@Engine ,
@ModelType ,
@FTCode ,
@Wholesale ,
@Retail ,
@Draft ,
@flatfile_createddate,
@FtpDate;
WHILE @@FETCH_STATUS = 0
BEGIN
--==========================================================================
-- INSERT INTO INVENTORY (PARENT TABLE)
--==========================================================================
BEGIN TRY
INSERT INTO [dbo].[DMS_INVENTORY]
DMSDealerID,
StockNumber,
DMSType,
InventoryDate,
FtpDate
VALUES (@ClientDealerID,@StockNumber,@DMSType,@InventoryDate,@FtpDate);
END TRY
BEGIN CATCH
SELECT
@errornumber = ERROR_NUMBER(),
@errorseverity = ERROR_SEVERITY(),
@errortable = 'DMS_INVENTORY',
@errorstate = ERROR_STATE(),
@errorprocedure = ERROR_PROCEDURE(),
@errorline = ERROR_LINE(),
@errormessage = ERROR_MESSAGE();
--==========================================================================
-- INSERT ERRORS INTO DMSLOG_INVENTORY_ERROR
--==========================================================================
EXEC [SP_DMS_INVENTORY_ERROR] @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,@Options1,@Category,@Description,@Engine,@ModelType,@FTCode,@Wholesale,@Retail,@Draft,
@ERRORNUMBER,@ERRORSEVERITY,@ERRORTABLE,@ERRORSTATE,@ERRORPROCEDURE,@ERRORLINE,@errormessage,@FtpDate
END CATCH
-- PRINT @errornumber;
-- PRINT @errorseverity;
-- PRINT @errortable;
-- PRINT @errorprocedure;
-- PRINT @errorline;
-- PRINT @errormessage;
-- PRINT @errorstate;
set @myerror = @@ERROR;
-- This -- PRINT statement -- PRINTs 'Error = 0' because
-- @@ERROR is reset in the IF statement above.
-- PRINT N'Error = ' + @myerror;
set @Inventoryid = scope_identity();
-- PRINT @Inventoryid;
--==========================================================================
-- INSERT INTO DMS_INVENTORY_DETAILS (CHILD TABLE)
--==========================================================================
BEGIN TRY
INSERT INTO [dbo].[DMS_INVENTORY_DETAILS]
DMSInventoryID,
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,
FtpDate
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,
@FtpDate
END TRY
BEGIN CATCH
SELECT
@errornumber = ERROR_NUMBER(),
@errorseverity = ERROR_SEVERITY(),
@errorstate = ERROR_STATE(),
@errortable = 'DMS_INVENTORY_DETAILS',
@errorprocedure = ERROR_PROCEDURE(),
@errorline = ERROR_LINE(),
@errormessage = ERROR_MESSAGE();
--==========================================================================
-- INSERT ERRORS INTO DMSLOG_INVENTORY_ERROR
--==========================================================================
EXECUTE [SP_DMS_INVENTORY_ERROR] @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,@Options1,@Category,@Description,@Engine,@ModelType,@FTCode,@Wholesale,@Retail,@Draft,
@ERRORNUMBER,@ERRORSEVERITY,@ERRORTABLE,@ERRORSTATE,@ERRORPROCEDURE,@ERRORLINE,@errormessage,@FtpDate
END CATCH
--==========================================================================
-- INSERT INTO DMS_INVENTORY_AMOUNT (CHILD TABLE)
--==========================================================================
BEGIN TRY
INSERT INTO [dbo].[DMS_INVENTORY_AMOUNT]
DMSInventoryID,
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,
FtpDate
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,
@FtpDate
END TRY
BEGIN CATCH
SELECT
@errornumber = ERROR_NUMBER(),
@errorseverity = ERROR_SEVERITY(),
@errortable = 'DMS_INVENTORY_AMOUNT',
@errorstate = ERROR_STATE(),
@errorprocedure = ERROR_PROCEDURE(),
@errorline = ERROR_LINE(),
@errormessage = ERROR_MESSAGE();
--==========================================================================
-- INSERT ERRORS INTO DMSLOG_INVENTORY_ERROR
--==========================================================================
EXEC [SP_DMS_INVENTORY_ERROR] @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,@Options1,@Category,@Description,@Engine,@ModelType,@FTCode,@Wholesale,@Retail,@Draft,
@ERRORNUMBER,@ERRORSEVERITY,@ERRORTABLE,@ERRORSTATE,@ERRORPROCEDURE,@ERRORLINE,@errormessage,@FtpDate
END CATCH
--==========================================================================
-- INSERT INTO DMS_INVENTORY_VEHICLE (CHILD TABLE)
--==========================================================================
BEGIN TRY
INSERT INTO [dbo].[DMS_INVENTORY_VEHICLE]
DMSInventoryID,
InteriorColorCode,
ExteriorColorCode,
Air,
ModelDesc,
VehicleType,
VehicleVIN,
VehicleYear,
VehicleMake,
VehicleModel,
VehicleModelCode,
VehicleTrim,
VehicleSubTrimLevel,
Classification,
TypeCode,
VehicleMileage,
FtpDate,
EngineCylinderCount
VALUES (
@InventoryID,
@InteriorColorCode,
@ExteriorColorCode,
@Air,
@ModelDesc,
@VehicleType,
@VehicleVIN,
@VehicleYear,
@VehicleMake,
@VehicleModel,
@VehicleModelCode,
@VehicleTrim,
@VehicleSubTrimLevel,
@Classification,
@TypeCode,
@VehicleMileage,
@FtpDate,
@EngineCylinderCount
END TRY
BEGIN CATCH
SELECT
@errornumber = ERROR_NUMBER(),
@errorseverity = ERROR_SEVERITY(),
@errortable = 'DMS_INVENTORY_VEHICLE',
@errorstate = ERROR_STATE(),
@errorprocedure = ERROR_PROCEDURE(),
@errorline = ERROR_LINE(),
@errormessage = ERROR_MESSAGE();
--==========================================================================
-- INSERT ERRORS INTO DMSLOG_INVENTORY_ERROR
--==========================================================================
EXEC [SP_DMS_INVENTORY_ERROR] @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,@Options1,@Category,@Description,@Engine,@ModelType,@FTCode,@Wholesale,@Retail,@Draft,
@ERRORNUMBER,@ERRORSEVERITY,@ERRORTABLE,@ERRORSTATE,@ERRORPROCEDURE,@ERRORLINE,@errormessage,@FtpDate
END CATCH
--==========================================================================
-- MOVE CURSUR 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 ,
@Options1 ,
@Category ,
@Description ,
@Engine ,
@ModelType ,
@FTCode ,
@Wholesale ,
@Retail ,
@Draft ,
@flatfile_createddate,
@FtpDate;
END
CLOSE Inventory_Cursor;
DEALLOCATE Inventory_Cursor;
SET ANSI_PADDING OFF
END
Arunraj KumarThank you.
And another question if the data is already there in the child table if i try to load alone it must delete the old data in the child tablee and need to get load the new data and
How to do this ?
Arunraj Kumar
You can do that with an IF EXISTS condition
IF EXISTS (SELECT 1
FROM YourChildTable c
INNER JOIn @temptable t
ON c.Bkey1 = t.Bkey1
AND c.Bkey2 = t.Bkey2
DELETE t
FROM YourChildTable c
INNER JOIn @temptable t
ON c.Bkey1 = t.Bkey1
AND c.Bkey2 = t.Bkey2
INSERT INTO YourChildTable
where Bkey1,Bkey2 etc forms the business key of the table
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 -
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 -
I cant not control wlc 5760 (every thing CLI & GUI)
After wlc 5760 reload (because of some problems.)
I don't know this message. and I can not control wlc 5760 in CLI console.
Please help me.
%Error opening tftp://255.255.255.255/network-confg (Timed out)
%Error opening tftp://255.255.255.255/cisconet.cfg (Timed out)
%Error opening tftp://255.255.255.255/nx-5760-wlc01-confg (Timed out)
.... again & again
I try to booting. but I can't.
I want to know : method 5760 Factory default or normal booting mode.
+ log
FIPS: Flash Key Check : Begin
FIPS: Flash Key Check : End, Not Found,FIPS Mode Not Enabled
This product contains cryptographic features and is subject to United
States and local country laws governing import, export, transfer and
use. Delivery of Cisco cryptographic products does not imply
third-party authority to import, export, distribute or use encryption.
Importers, exporters, distributors and users are responsible for
compliance with U.S. and local country laws. By using this product you
agree to comply with applicable laws and regulations. If you are unable
to comply with U.S. and local laws, return this product immediately.
A summary of U.S. laws governing Cisco cryptographic products may be found at:
http://www.cisco.com/wwl/export/crypto/tool/stqrg.html
If you require further assistance please contact us by sending email to
[email protected].
cisco AIR-CT5760 (i686) processor with 10485760K bytes of physical memory.
Processor board ID FOC1746V2AK
2048K bytes of non-volatile configuration memory.
10485760K bytes of physical memory.
255000K bytes of Crash Files at crashinfo:.
3612840K bytes of Flash at flash:.
0K bytes of Dummy USB Flash at usbflash0:.
0K bytes of at webui:.
Base Ethernet MAC Address : 1c:1d:86:24:10:80
Motherboard Assembly Number : 73-14448-04
Motherboard Serial Number : FOC174577NZ
Model Revision Number : A0
Model Number : AIR-CT5760
System Serial Number : FOC1746V2AK
%Error opening tftp://255.255.255.255/network-confg (Timed out)
%Error opening tftp://255.255.255.255/cisconet.cfg (Timed out)
%Error opening tftp://255.255.255.255/nx-5760-wlc01-confg (Timed out)
%Error opening tftp://255.255.255.255/network-confg (Timed out)
%Error opening tftp://255.255.255.255/nx-5760-.cfg (Timed out)
%Error opening tftp://255.255.255.255/cisconet.cfg (Timed out)
%Error opening tftp://255.255.255.255/nx-5760-wlc01-confg (Timed out)
%Error opening tftp://255.255.255.255/nx-5760-.cfg (Timed out)
%Error opening tftp://255.255.255.255/network-confg (Timed out)
%Error opening tftp://255.255.255.255/cisconet.cfg (Timed out)
%Error opening tftp://255.255.255.255/nx-5760-wlc01-confg (Timed out)
%Error opening tftp://255.255.255.255/nx-5760-.cfg (Timed out)
%Error opening tftp://255.255.255.255/network-confg (Timed out)
%Error opening tftp://255.255.255.255/cisconet.cfg (Timed out)
%Error opening tftp://255.255.255.255/nx-5760-wlc01-confg (Timed out)I have same problem when i upgraded Cisco 3850 Switch to latest IOS. I have lost access to the console.
can someone please help.
Thanks -
Hi there, I have a late 2006 iMac running lion 10.7.5 and was wondering if I now can upgrade to mavericks. The app store show 10.6.8 and later but everywhere else I read tells me I need an iMac made in 2007 or later. Is this true or can I upgrade.
FYI....Apple recently dropped the prices on the new MacBook Airs by $100. Best Buy has been offering additional discounts on the Air. Prices start around $850.
-
Default username and password for WLC 5508 series
Hi ,
please let me know the default username and password for the below WLC device
Model :
AIR-CT5508-100-K9
Image : AIR-CT5500-K9-7-0-230-0.aes
Regards
LernerPassword Recovery in WLC versions 5.1 and later
If you forget your password in WLC version 5.1 and later, you can use the CLI from the serial console of the controller in order to configure a new user name and password.
After the controller boots up, enter the Restore-Password command at the user prompt. This command is only accepted for the initial user login and becomes disabled after a user logs in. You are prompted to enter a new username/password, which can then be used to log into the controller and modify settings.
Maybe you are looking for
-
Here's my situation: when I'm at home I use my MBP with an 23" ACD (alu) and keep the MBP screen closed. I used this combo for over 6 months with a 15" MBP 2ghz core duo with absolutely no problems, including taking the MBP with me and using it by it
-
Placing a Low Level DB Function for Time Offset
Would any one be able to point me to any documentation on the Oracle 10g R2 release that might help me understand if there is a way to modify datetime query parameters and datetime query results at a low level in the DB? R12 of Oracle Apps does not h
-
Calculate a daily average in pivot table view
I am new to biee 11g and would appreciate any assistance with the following. I have a pivot table view which includes a hierarchy column and a single measure, units. The pivot is filtered based on date that is prompted. I need to include a column in
-
Custom JAAS Login Module 9.0.4 configuration problems
Hello, We have created a custom JAAS Login Module on OC4J 9.0.4 and are having some sort of configuration problem We always get this error: Caused by: javax.security.auth.login.LoginException: Login Failure: all modules ignored at javax.security
-
Year to Date Report (excluding current month)
Hello, I need a formula to pick data from 01/01/2010 to the end of the previous month. I'm familiar with using Today-1 etc but require a formula that enables me to run the report at any time during the month without changing the parameters. Thanks, J