Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 921119
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T18:49:23+00:00 2026-05-15T18:49:23+00:00

I have loaded .csv file into the dataset. The csv file(have afew hundreds lines)

  • 0

I have loaded .csv file into the dataset. The csv file(have afew hundreds lines) format is as follow;

"UCPTlogTime","UCPTpointName","UCPTvalue","UCPTunit"
2010-07-05T11:08:07.390+08:00,"Net/LON/wattnode1/VirtFb/nvoCurrent[0]","0.128767","Amperes"
2010-07-05T11:08:10.720+08:00,"Net/LON/wattnode1/VirtFb/nvoPower[0]","28.90336","Watts"
2010-07-05T11:08:11.680+08:00,"Net/LON/wattnode1/VirtFb/nvoCurrent[0]","0.128767","Amperes"
2010-07-05T11:08:18.830+08:00,"Net/LON/wattnode1/VirtFb/nvoPower[0]","34.48953","Watts"

As u can see, in the UCPTvalue column, two different type of datas are saved.
What i want to do is before updating the remote server with all those data, i want to seperate the Amperes data and Watts data in the individual column. Is there any C# code to create the new column in dataset and set it with the data from existing column?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T18:49:24+00:00Added an answer on May 15, 2026 at 6:49 pm

    I wouldn’t use datasets, myself. I’d bulk load it into a temp database table, then update the relevant tables for each UCPT unit type (in other words, do it all in a stored procedure).

    [edited for more detail]

    Create a new table called tmpUpdate.

    SQLBulkCopy the data into it.

    Then run a stored proc that does multiple updates using it, eg something like

    update liveTable set latestAmps=tempUpdate.UCPTvalue
    FROM liveAmpTable JOIN tempUpdate ON liveAmpTable.UCPTpointName=tempUpdate.UCPTpointName
    WHERE tempUpdate.UCPTunit='Amperes'
    
    update liveTable set latestWatts=tempUpdate.UCPTvalue
    FROM liveWattsTable JOIN tempUpdate ON liveWattsTable.UCPTpointName=tempUpdate.UCPTpointName
    WHERE tempUpdate.UCPTunit='Watts'
    
    truncate table tempUpdate --clear temp data
    

    This assumes only one user does the updating at the same time.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have data from a CSV file that's already loaded into memory. So I
I have CSV data loaded into a multidimensional array. In this way each row
I have an XML file loaded into a DOM document, I wish to iterate
Scenario: I have a huge .csv file (million of lines) . With sqlldr (SQL
I have loaded a huge CSV dataset -- Eclipse's Filtered Usage Data using PostgreSQL's
I have loaded image into a new, initialized Oracle ORDImage object and am processing
I have an EXE loaded into a byte array, and I am trying to
I am trying to import a large CSV file into a MySQL database. I
I have a datagrid in a WPF populated from a csv file. This is
I have a project where a client can import an excel file, csv, or

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.