I want to write an oracle query to fetch data from table based on values(where clause) from an excel sheet. The excel sheet contains 3500+ values and i have to get data for all those 3500+ values from my database.
Related
I have data in the firebase datastore and I am using Stream Collections to BigQuery extension to export data into big query.
This export creates a view and a table named tablename_raw_latest and tablename_raw_changelog in the big query which stores firestore table data in a column named data in the string format with other columns.
The schema for the table in big query is as here:
table schema
I want to apply a search index on this tablename_raw_changelog table on a particular field of data, but I can not as the data is stored in a string format.
I am following this document for the search index in big query: search in big query
Is there a way to implement a search index in this case or any alternative for this?
How to insert or export txt file's comma seperated data into sql database using c#. Values available in the text file should be inserted in the specific columns of the sql table
I am creating an application which will upload data from Excel to SQL Server using ASP.NET. I know how to upload Excel data using SqlBulkCopy. But I am trying to upload some extra data for the table column (addeddate, addedby...etc) which is not present in the Excel sheet.
I get this error:
The given ColumnName '18-01-2016 17:24:07' does not match up with any column in data source.
You can try below solution to insert constant values like addeddate, addedby...etc.
SELECT
EXCEL_COL1,
EXCEL_COL2,
'newconstantvalue' as CustomCol
FROM
ExcelSheet1
Then
bulkCopy.ColumnMappings.Add("Table_COL3", "CustomCol");
Please refer the article for more detail.
I want to compare name of columns of an Excel file with name of fields of a table in SQL database while importing data from Excel file. And then I can map my database filed name with Excel file column name.
I have a spreadsheet in my local machine with columns(employee number and salary). I need to update employee table with this value. Mismatched rows has to be tabled in browser.
Using file upload control in visual studio .net I'm uploading excel sheet. When clicking on the button I need unmatched rows.
I think we can achieve this by using datasets to bring database values and compare with sheet, but what is the best way to compare?
Thanks
This is how we do it:
First, you should have atleast a 'comparison column' in each of your datasets (ie. Excel Sheet and Database table).
You will create 2 objects to hold the data for the excel sheet and the table records.
You will then populate them.
Next is where you will have a little magic. You will have to make a choice of which of the two is you primary dataset.
What next? .... loop through items.
Pseudo:
DataSet ds1 = .....;
DataSet ds2 = .....;
foreach record(r) in ds1 Table
foreach record(s) in ds2 Table
if record r = record s
store this as matched record and break
else
store this as mismached record (may need some more logic here)
endloop
endloop
Unfortunately I do not have a copy/paste function/method to do this but can provide guidance.
Hope this gives you a starting point.