CSV + Dropdownlist column association - asp.net

Hullo to all! This question is more about a shortcut than anything:
Is there a simple, yet efficient way to associate column names to csv data?
Problem:
I need to associate column names (and bind them) to import the csv file correctly to my SQL Server database. I don't know before I see the csv what column of the csv will contain what data.
Example:
File 1 column order: Name, Address, Phone.
File 2 column order: Name, Phone, Address.
Hence, I need to be able to display the csv, and with the use of well-placed dropdownlists, show the remaining columns that need to be selected.
I need to create an interface that will allow for manual association of the csv column to the datatable column.
Solution: ?
I am caressing the idea of coding the stuff myself, but was asking myself whether or not an existing easier solution already existed, and Google wasn't much help on this one.
Any input from you guys would be infinitely appreciated as it would save me some precious time.

Other than just doing the import via SSIS or some other direct SQL item, I'm not aware of any better way of doing it.
All I would do in this case is show the list of columns for each field, and let the user select the mapping.

Related

export pivot table to R

I have a very large dataset to which I can only access by a pivot table in Excel.
I would like to access to the raw database to work with R.
I have tried several things:
To copy and paste in both, text and excel files, the pivot database and then import to R : It does not work. its shows only the filters that I have selected but not the totality of the database
to click on any cell of the pivot table to see the underlying data : It only shows the first 1000 entries. This is by far the best result that I have got, the only problem is that I get the first 1000 entries and I need all of them.
What I have been doing just until now is to select the variables that interest me, then, I copy them to a new sheet and finally I export to R. But I always forget a variable and its very expensive in time to redo all this procedure everyday.
Does anyone know how can I access to the totality of a database from a pivot table in Excel?
I hope I have been clear, do nto hesitate to ask for more information if needed.
Thank you in advanced

Allowing Users to create their own table of data

We want to allow our web users to define a timetable for themselves. However because the events are very varied the information may not be exactly the same so the column headings and number of columns vary. (We may be forced to define it in general terms - so we define the column headings and they enter the data.) They also need to be able to sort and filter. Import from spreadsheet would also be good as would printing or exporting.
We are using PHP & Laravel Framework.
Does anyone know of something that might help us do this quickly and efficiently?
Thank you

How to Combine multiple files in BizTalk?

I have multiple flatfiles (CSV) (with multiple records) where files will be received randomly. I have to combine them (records) with unique ID fields.
How can I combine them, if there is no common unique field for all files, and I don't know which one will be received first?
Here are some files examples:
In real there are 16 files.
Fields and records are much more then in this example.
I would avoid trying to do this purely in XSLT/BizTalk orchestrations/C# code. These are fairly simple flat files. Load them into SQL, and create a view to join your data up.
You can still use BizTalk to pickup/load the files. You can also still use BizTalk to execute the view or procedure that joins the data up and sends your final message.
There are a few questions that might help guide how this would work here:
When do you want to join the data together? What triggers that (a time of day, a certain number of messages received, a certain type of message, a particular record, etc)? How will BizTalk know when it's received enough/the right data to join?
What does a canonical version of this data look like? Does all of the data from all of these files truly get correlated into one entity (e.g. a "Trade" or a "Transfer" etc.)?
I'd probably start with defining my canonical entity, and then look towards the path of getting a "complete" picture of that canonical entity by using SQL for this kind of case.

copying information into repeating table component of infopath

I am trying to modify an existing infopath form that contains repeating table container.User enters the details in the table and form is used by another program for processing.
The current requirement is for user should be able to copy data from somewhere and directly paste into table. The user may copy data containing multiple rows and paste it.This source could be anywhere and also the user can still enter data manually row by row so a data connection is not feasible.
But the data gets truncated with only first row getting entered in form as there is only one row present in the form. I found out this was the behavior after googling. Is there a work around for this. Like overwriting paste function using code?
Thanks for any help.
I cannot comment so I will have to leave this as an answer please do not down vote since I am trying to help you out.
Not sure this is possible but try to create a field that allows the user to enter a number of rows. That way they could take a look at the number of rows in their excel spreadsheet and see that it's 32 (or whatever number). Then you could take that number of rows and have the form create a repeating table with the number of rows specified. That way they could paste in the number of rows they need to paste.
This would not be ideal of course but attempting something like this might be easier than overwriting a paste operation.

How to determine position of specific character/string in SQLite string column value?

I have values in a SQLite table* that contain a number of strings, of different lengths, joined by periods, something like this:
SomeApp.SomeNameSpace.InterestingString.NotInteresting
SomeApp.OtherNameSpace.WantThisOne.ReallyQuiteDull
SomeApp.OtherNameSpace.WantThisOne.AlsoDull
SomeApp.DifferentNameSpace.AlwaysWorthALook.LittleValue
I'd like to extract (in this case) the third period-delimited substring so I could write something like
SELECT interesting_string, COUNT(*)
FROM ( SELECT third_part_of_period_delimited_string(name) interesting_string )
GROUP BY interesting_string;
Obviously I can do this any number of ways programmatically; I'm wondering if there's any way to achieve this in a SQLite SELECT query?
* It's a SharpDevelop Profiler database, if anyone's curious
No.
You can, as you mention, work with the strings after you have selected them from the database. Or you can split them up into separate columns when they are stored.
If you do not have access to the code that is storing the data, you might want to consider reading the data in its entirety, splitting the strings and storing the split out tokens in separate columns in a new table. If the data is not too large, you might look at storing this table in a new memory database to give excellent performance.
Whether this is worthwhile depends on whether one pass to split the data strings can be made use of many times. If the data is constantly changing, then this scheme would probably not work well.

Resources