Вопрос

I'm writing a program for my client in C# Winform. And the client gave this excel sheet.

Process

I have a table that used to calculate BULK amount of alcohol by "DIP" and "SLIDE". In excel I need to select the specific DIP and SLIDE to get the BULK. I need to do the same thing in the database.

I exported a table from excel to MySQL table. excel sheet table in database

I can get the BULK amount by this query

SELECT SLIDE 0.8 FROM tbl_vat_01_alcohol_esa WHERE DIP = 212;

Requirement

I need to get the DIP and/or SLIDE when I enter BULK amount. I wanna know how to do it? or Is it possible to do that kind of work in this table? or do I need to change the table structure or something.

OR

How to access the excel sheet from C# winform. I mean, If I make a form that contain 3 textbox for DIP, SLIDE and BULK. When I enter DIP and SLIDE I get BULK and when I enter BULK I get DIP and SLIDE...

Is it possible? If it is, How to achieve that? OR Is there any other method.

I'm new to StackExchange and Database!

Это было полезно?

Решение

what you have is a cross-table you need to uncross it.

create a table with three columns bulk,dip,and slide, put each cell of the excel table into a row of this table.

then you can query like

select bulk from bdstable where slide=0.8 and dip=212

Лицензировано под: CC-BY-SA с атрибуция
Не связан с dba.stackexchange
scroll top