dzirkelb1
Posts: 1321 Joined: 10/5/2004 From: Cedar Rapids, Iowa Status: offline
|
RE: File Upload .csv file directly to database - 1/24/2005 14:51:49
The column headers have to be defined...currently, what happens is the user clicks a button on their form, and it automatically emails it to me in a .xls file. I then run a update query (link the xls file...save it in same spot everytime), and everything is done. Is it possible to run the update query from an asp page like I have set up? I should be able to simply copy / paste my code on my access database into an update query that pulls it from the linked xls file...couldn't I? Spose one of the real speedbumps I have on this is how do I make an asp script run while loading a page? Meaning, I want the file to be uploaded..upon uploading the file, they are taken to an asp page (after file is uploaded). At that time, I want the following sql code to run:
INSERT INTO tblMasterEvaluations ( RouteNumber, EvalDate, EvalCode, StoreID, AutoDate, DayOfWeek, [Time], AutoTime, DayPart, Rep, Period, CostOfProduct, CarryOutDriveThru, D1InsectsAndPests, D1RudeBehavior, D1MainEntreeTemperature, D1EntreeOrdered, D1EntreeTemp, D1OtherChicken, D1TotalPointsDocked, DCustomerDealBreakerComments, C1ParkingLot, C1Landscaping, C1TrashContainers, C1Sidewalks, C1Dumpsters, C1TotalPointsDocked, C2Doors, C2ExteriorLighting, C2DtMenuboard, C2Windows, C2DTSpeaker, C2TotalPointsDocked, C3Stocked, C3Clean, C3Odor, C3TotalPointsDocked, C4Clean, C4Caution, C5Ceiling, C5Pictures, C5Decor, C5Walls, C5LightFixtures, C4andC5TotalPointsDocked, C6Counters, C6Menuboards, C6DisplayCases, C6SelfServiceArea, C6Menus, C6AdvertisingMaterials, C7Tables, C7Booths, C7Seats, C7TrashContainers, C8SuppliesStored, C6andC7andC8TotalPointsDocked, CleanlinessPointsPossible, CTotalPointsEarned, CCleanlinessComments, H1FriendlyGreeting, H1GreetingDTWindow, H2AppreciativeClosing, H3Smile, H3Eyecontact, H3FocusedAttention, H1andH2andH3TotalPointsDocked, H4ProblemLAST, H4LASTExecuted, H4Listen, H4Apologize, H4Satisfy, H4Thank, H4HoldingCabinet, H5ProfessionalManner, HLASTBonus, H4andH5TotalPointsDocked, H6Uniforms, H6WellGroomed, H6NeatAndClean, H6PersonalHygiene, H6EmployeeWhoWaited, H6TotalPointsDocked, H7Upsize, H7UpsizeText, HTotalPointsEarned, HHospitalityComments, A1Brand, A1Other, A1ColdSide, A1Drink, A1Piece, A1HotSide, A1Bread, A1Buffet, A1TotalPointsDocked, A2Sides, A2Packaging, A2ChickenType, A2Napkins, A2ChickenPieces, A2Condiments, A3CorrectAmount, A3CorrectChange, A2andA3TotalPointsDocked, A4ConfirmOrder, A4TotalPointsDocked, ATotalPointsEarned, AAccuracyComments, M1Building, M1DTmenuboard, M1Lights, M1DTSpeaker, M1Signs, M1Grass, M1Advertising, M1ParkingLot, M1Sidewalks, M1DTLane, M1TotalPointsDocked, M2Floor, M2Walls, M2Ceiling, M2Lights, M2Doors, M3Entryway, M3Advertising, M3Menuboards, M3Menus, M4Restrooms, M5Tables, M5MusicVolume, M5Temperature, M5Seats, M5Booths, M2andM3andM4andM5TotalPointsDocked, M6BrixLevel, M6BrixLevelText, M6TypeOfDrink, M6Carbonation, M6TotalPointsDocked, MTotalPointsEarned, MMaintenanceComments, P1FreshMoistTender, P1AcceptableColor, P1WithoutExcessiveShortening, P1BreadedProperly, P1ProperTemperature, P1TotalPointsDocked, P2Temperature, P2Fresh, P2AcceptableAppearance, P2FilledProperly, P2ProperTemperature, P2HotSideItem, P2OtherText, P3Temperature, P3Fresh, P3AcceptableAppearance, P3FilledProperly, P3ProperTemperature, P3ColdSideItem, P3OtherText, P2andP3TotalPointsDocked, P4Temperature, P4Fresh, P4AcceptableAppearance, P4ProperTemperature, P4TotalPointsDocked, PTotalPointsEarned, PProductQualityComments, S1GreetedInTime, S2GreetedInTime, S2HoldTime, S1andS2TotalPointsDocked, S3CustomerService, S3OrderTimeMin, S3OrderTimeSec, S3WindowTimeMin, S3WindowTimeSec, S3TotalTimeMin, S3TotalTimeSec, S3Customers, S3TotalPointsDocked, STotalPointsEarned, SSpeedWithServiceComments, CGreeting, CClosing, TotalPointsEarned, RegularPercentage, DealBreakerPercentage, TotalPointsPossible, ActualScorePercentage )
SELECT tblOutputShopInformation.RouteNumber, tblOutputShopInformation.EvalDate, tblOutputShopInformation.EvalCode, tblOutputShopInformation.StoreID, tblOutputShopInformation.AutoDate, tblOutputShopInformation.DayOfWeek, tblOutputShopInformation.Time, tblOutputShopInformation.AutoTime, tblOutputShopInformation.DayPart, tblOutputShopInformation.Rep, tblOutputShopInformation.Period, tblOutputShopInformation.CostOfProduct, tblOutputShopInformation.CarryOutDriveThru, tblOutputShopInformation.D1InsectsAndPests, tblOutputShopInformation.D1RudeBehavior, tblOutputShopInformation.D1MainEntreeTemperature, tblOutputShopInformation.D1EntreeOrdered, tblOutputShopInformation.D1EntreeTemp, tblOutputShopInformation.D1OtherChicken, tblOutputShopInformation.D1TotalPointsDocked, tblOutputShopInformation.DCustomerDealBreakerComments, tblOutputShopInformation.C1ParkingLot, tblOutputShopInformation.C1Landscaping, tblOutputShopInformation.C1TrashContainers, tblOutputShopInformation.C1Sidewalks, tblOutputShopInformation.C1Dumpsters, tblOutputShopInformation.C1TotalPointsDocked, tblOutputShopInformation.C2Doors, tblOutputShopInformation.C2ExteriorLighting, tblOutputShopInformation.C2DtMenuboard, tblOutputShopInformation.C2Windows, tblOutputShopInformation.C2DTSpeaker, tblOutputShopInformation.C2TotalPointsDocked, tblOutputShopInformation.C3Stocked, tblOutputShopInformation.C3Clean, tblOutputShopInformation.C3Odor, tblOutputShopInformation.C3TotalPointsDocked, tblOutputShopInformation.C4Clean, tblOutputShopInformation.C4Caution, tblOutputShopInformation.C5Ceiling, tblOutputShopInformation.C5Pictures, tblOutputShopInformation.C5Decor, tblOutputShopInformation.C5Walls, tblOutputShopInformation.C5LightFixtures, tblOutputShopInformation.C4andC5TotalPointsDocked, tblOutputShopInformation.C6Counters, tblOutputShopInformation.C6Menuboards, tblOutputShopInformation.C6DisplayCases, tblOutputShopInformation.C6SelfServiceArea, tblOutputShopInformation.C6Menus, tblOutputShopInformation.C6AdvertisingMaterials, tblOutputShopInformation.C7Tables, tblOutputShopInformation.C7Booths, tblOutputShopInformation.C7Seats, tblOutputShopInformation.C7TrashContainers, tblOutputShopInformation.C8SuppliesStored, tblOutputShopInformation.C6andC7andC8TotalPointsDocked, tblOutputShopInformation.CleanlinessPointsPossible, tblOutputShopInformation.CTotalPointsEarned, tblOutputShopInformation.CCleanlinessComments, tblOutputShopInformation.H1FriendlyGreeting, tblOutputShopInformation.H1GreetingDTWindow, tblOutputShopInformation.H2AppreciativeClosing, tblOutputShopInformation.H3Smile, tblOutputShopInformation.H3Eyecontact, tblOutputShopInformation.H3FocusedAttention, tblOutputShopInformation.H1andH2andH3TotalPointsDocked, tblOutputShopInformation.H4ProblemLAST, tblOutputShopInformation.H4LASTExecuted, tblOutputShopInformation.H4Listen, tblOutputShopInformation.H4Apologize, tblOutputShopInformation.H4Satisfy, tblOutputShopInformation.H4Thank, tblOutputShopInformation.H4HoldingCabinet, tblOutputShopInformation.H5ProfessionalManner, tblOutputShopInformation.HLASTBonus, tblOutputShopInformation.H4andH5TotalPointsDocked, tblOutputShopInformation.H6Uniforms, tblOutputShopInformation.H6WellGroomed, tblOutputShopInformation.H6NeatAndClean, tblOutputShopInformation.H6PersonalHygiene, tblOutputShopInformation.H6EmployeeWhoWaited, tblOutputShopInformation.H6TotalPointsDocked, tblOutputShopInformation.H7Upsize, tblOutputShopInformation.H7UpsizeText, tblOutputShopInformation.HTotalPointsEarned, tblOutputShopInformation.HHospitalityComments, tblOutputShopInformation.A1Brand, tblOutputShopInformation.A1Other, tblOutputShopInformation.A1ColdSide, tblOutputShopInformation.A1Drink, tblOutputShopInformation.A1Piece, tblOutputShopInformation.A1HotSide, tblOutputShopInformation.A1Bread, tblOutputShopInformation.A1Buffet, tblOutputShopInformation.A1TotalPointsDocked, tblOutputShopInformation.A2Sides, tblOutputShopInformation.A2Packaging, tblOutputShopInformation.A2ChickenType, tblOutputShopInformation.A2Napkins, tblOutputShopInformation.A2ChickenPieces, tblOutputShopInformation.A2Condiments, tblOutputShopInformation.A3CorrectAmount, tblOutputShopInformation.A3CorrectChange, tblOutputShopInformation.A2andA3TotalPointsDocked, tblOutputShopInformation.A4ConfirmOrder, tblOutputShopInformation.A4TotalPointsDocked, tblOutputShopInformation.ATotalPointsEarned, tblOutputShopInformation.AAccuracyComments, tblOutputShopInformation.M1Building, tblOutputShopInformation.M1DTmenuboard, tblOutputShopInformation.M1Lights, tblOutputShopInformation.M1DTSpeaker, tblOutputShopInformation.M1Signs, tblOutputShopInformation.M1Grass, tblOutputShopInformation.M1Advertising, tblOutputShopInformation.M1ParkingLot, tblOutputShopInformation.M1Sidewalks, tblOutputShopInformation.M1DTLane, tblOutputShopInformation.M1TotalPointsDocked, tblOutputShopInformation.M2Floor, tblOutputShopInformation.M2Walls, tblOutputShopInformation.M2Ceiling, tblOutputShopInformation.M2Lights, tblOutputShopInformation.M2Doors, tblOutputShopInformation.M3Entryway, tblOutputShopInformation.M3Advertising, tblOutputShopInformation.M3Menuboards, tblOutputShopInformation.M3Menus, tblOutputShopInformation.M4Restrooms, tblOutputShopInformation.M5Tables, tblOutputShopInformation.M5MusicVolume, tblOutputShopInformation.M5Temperature, tblOutputShopInformation.M5Seats, tblOutputShopInformation.M5Booths, tblOutputShopInformation.M2andM3andM4andM5TotalPointsDocked, tblOutputShopInformation.M6BrixLevel, tblOutputShopInformation.M6BrixLevelText, tblOutputShopInformation.M6TypeOfDrink, tblOutputShopInformation.M6Carbonation, tblOutputShopInformation.M6TotalPointsDocked, tblOutputShopInformation.MTotalPointsEarned, tblOutputShopInformation.MMaintenanceComments, tblOutputShopInformation.P1FreshMoistTender, tblOutputShopInformation.P1AcceptableColor, tblOutputShopInformation.P1WithoutExcessiveShortening, tblOutputShopInformation.P1BreadedProperly, tblOutputShopInformation.P1ProperTemperature, tblOutputShopInformation.P1TotalPointsDocked, tblOutputShopInformation.P2Temperature, tblOutputShopInformation.P2Fresh, tblOutputShopInformation.P2AcceptableAppearance, tblOutputShopInformation.P2FilledProperly, tblOutputShopInformation.P2ProperTemperature, tblOutputShopInformation.P2HotSideItem, tblOutputShopInformation.P2OtherText, tblOutputShopInformation.P3Temperature, tblOutputShopInformation.P3Fresh, tblOutputShopInformation.P3AcceptableAppearance, tblOutputShopInformation.P3FilledProperly, tblOutputShopInformation.P3ProperTemperature, tblOutputShopInformation.P3ColdSideItem, tblOutputShopInformation.P3OtherText, tblOutputShopInformation.P2andP3TotalPointsDocked, tblOutputShopInformation.P4Temperature, tblOutputShopInformation.P4Fresh, tblOutputShopInformation.P4AcceptableAppearance, tblOutputShopInformation.P4ProperTemperature, tblOutputShopInformation.P4TotalPointsDocked, tblOutputShopInformation.PTotalPointsEarned, tblOutputShopInformation.PProductQualityComments, tblOutputShopInformation.S1GreetedInTime, tblOutputShopInformation.S2GreetedInTime, tblOutputShopInformation.S2HoldTime, tblOutputShopInformation.S1andS2TotalPointsDocked, tblOutputShopInformation.S3CustomerService, tblOutputShopInformation.S3OrderTimeMin, tblOutputShopInformation.S3OrderTimeSec, tblOutputShopInformation.S3WindowTimeMin, tblOutputShopInformation.S3WindowTimeSec, tblOutputShopInformation.S3TotalTimeMin, tblOutputShopInformation.S3TotalTimeSec, tblOutputShopInformation.S3Customers, tblOutputShopInformation.S3TotalPointsDocked, tblOutputShopInformation.STotalPointsEarned, tblOutputShopInformation.SSpeedWithServiceComments, tblOutputShopInformation.CGreeting, tblOutputShopInformation.CClosing, tblOutputShopInformation.TotalPointsEarned, tblOutputShopInformation.RegularPercentage, tblOutputShopInformation.DealBreakerPercentage, tblOutputShopInformation.TotalPointsPossible, tblOutputShopInformation.ActualScorePercentage
FROM tblOutputShopInformation;
AND [code] UPDATE [MASTER ROUTE TABLE 1998] INNER JOIN tblMasterEvaluations ON ([MASTER ROUTE TABLE 1998].RT1 = tblMasterEvaluations.RouteNumber) AND ([MASTER ROUTE TABLE 1998].[KFC ID] = tblMasterEvaluations.StoreID) SET tblMasterEvaluations.Period = [MASTER ROUTE TABLE 1998]![PERIOD/MONTH]; [/CODE] Is there a way to have two sql queries run upon loading one asp page?
|