C# Scripts

Azure Data Factory Tutorial

Real Time C# Scripts

File Operations

  1. Delete files older than N days from a folder
  2. Get the oldest file from a folder
  3. Get the latest file from a folder
  4. Copy all files from one folder to another
  5. Copy files and overwrite existing files
  6. Move files from one folder to another
  7. File.MoveTo does not work - file already exists
  8. Move and rename files with datetime in name
  9. Copy files and add datetime to filenames

Import Files (CSV or Text) to Database

  1. Insert file properties into SQL Server table
  2. Import text file to SQL Server table
  3. Import multiple text files to SQL Server
  4. Import files with dynamic columns
  5. Create SQL table dynamically from flat file
  6. Load data from flat files to SQL tables by file names
  7. Import multiple CSV files to SQL Server

Export from Database to Files (CSV or Text)

  1. Export data to text file
  2. Export stored procedure results to text file
  3. Combine multiple CSV files into one
  4. Export all tables to flat files
  5. Export all tables to Excel files with datetime
  6. Export large table to multiple Excel sheets

Excel to Files (CSV or Text)

  1. Convert each Excel sheet to CSV
  2. Create CSV per Excel file and load all sheets

CSV/Text to Excel

  1. Convert CSV/Text files to Excel
  2. Create and append Excel sheet from CSV
  3. Import multiple CSV files into separate Excel sheets
  4. Import data from multiple CSV/Text to single Excel sheet

Import to SQL Server from Excel

  1. Import Excel sheet to SQL Server
  2. Create table per Excel file and import all sheets
  3. Skip rows and import Excel data
  4. Import Excel files with single or multiple sheets
  5. Import data to tables by sheet names
  6. Create table for each Excel sheet and import data
  7. Import multiple Excel files to one SQL Server table
  8. Get Excel file info and import to SQL
  9. Import only matching columns to SQL
  10. Import Excel data with file and sheet names
  11. Read Excel cell value

Export to Excel from Database

  1. Export tables to Excel dynamically
  2. Export stored procedure result to Excel
  3. Export table/view records to Excel

Console Applications

  1. Why console window disappears without displaying output
  2. Difference between Console.Write and Console.WriteLine

Read/Write to Database

  1. Save SQL query results to a variable
  2. Use variables in SqlCommand to insert data

String Operations

  1. Remove last character from string
  2. Remove extension from file name
  3. Remove last X characters from string
  4. Remove character from string

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.