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

  • Home
  • SEARCH
  • 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 7998909
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T15:20:58+00:00 2026-06-04T15:20:58+00:00

I am currently trying to use a bulk insert from a temporary table with

  • 0

I am currently trying to use a bulk insert from a temporary table with information from a CSV and then add the details of this table into a current one (without having to drop the proper table as it contains information already) I have currently got this:

Please ignore the table being dropped at the start, this was for testing purposes. Now I am kind of at a stump as to what I would need to do next, would I simply want to use an update table and state the column names and use a FROM statement.

DROP TABLE #Currencies


CREATE TABLE #Currencies(
suffix nvarchar(50) NULL,
name nvarchar(50) NULL,
iso nvarchar(50) NULL)
GO

BULK INSERT #Currencies
FROM 'C:\Documents and Settings\ntaylor\Desktop\Currencies.csv'
WITH(
FIELDTERMINATOR = ',',
ROWTERMINATOR = '\n')
GO

ALTER TABLE #Currencies
ADD version_number int NOT NULL default 1,
[precision] int NULL,
cur_id  [uniqueidentifier] NOT NULL default newid(),
exchange_rate decimal(19,5) NULL,
[default] bit NULL
GO


UPDATE #Currencies
SET [precision] = 2, exchange_rate = 1, [default] = 0

ALTER TABLE tbl_ecom_currency
ALTER COLUMN suffix nvarchar(50)

INSERT INTO tbl_ecom_currency (suffix, name, iso, version_number, [precision], cur_id, exchange_rate, [default])
SELECT  suffix, name, iso, version_number, [precision], cur_id, exchange_rate, [default]
FROM #Currencies

After executing this Query I seem to have the issue that it’s creating all of the rows within the table but they don’t seem to be proper rows as they are not there when i click edit top 200 rows however it seems to work when I choose to select top 1000 rows, but it creates them every single time so I have 1000+ rows now opposed to 150+

  • 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-06-04T15:20:59+00:00Added an answer on June 4, 2026 at 3:20 pm

    I have managed to find a working method for this, using the following code I was able to execute it fine.

    DROP TABLE #Currencies
    
    
    CREATE TABLE #Currencies(
    prefix nvarchar(50) NULL,
    name nvarchar(50) NULL,
    iso nvarchar(50) NULL)
    GO
    
    BULK INSERT #Currencies
    FROM 'C:\Documents and Settings\ntaylor\Desktop\Currencies.csv'
    WITH(
    FIELDTERMINATOR = ',',
    ROWTERMINATOR = '\n')
    GO
    
    ALTER TABLE #Currencies
    ADD version_number int NOT NULL default 1,
    [precision] int NULL,
    cur_id  [uniqueidentifier] NOT NULL default newid(),
    exchange_rate decimal(19,5) NULL,
    created datetime NULL,
    [default] bit NULL
    GO
    
    
    UPDATE #Currencies
    SET [precision] = 2, exchange_rate = 1, [default] = 0, created = GetDate()
    GO
    
    ALTER TABLE tbl_ecom_currency
    ALTER COLUMN prefix nvarchar(50)
    GO
    
    
    INSERT INTO tbl_ecom_currency (prefix, name, iso, version_number, [precision], cur_id, exchange_rate, [default], created)
    SELECT  prefix, name, iso, version_number, [precision], cur_id, exchange_rate, [default], created
    FROM #Currencies
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to do bulk insert into a table: use SalesDWH go BULK
I am currently trying to use this gem http://github.com/pengwynn/linkedin . Everything works fine (i.e.
This is the reciprocal to this question . Currently, I am trying to use
Does anyone know if its possible to use Bulk insert from following code: FORALL
I'm currently trying to use ASP.Net Profiles to store additional user information about users
I am currently trying to use JavaMail to get emails from IMAP servers (Gmail
I am currently trying to use SSIS to export a large dataset into an
I'm currently trying to use Howard Hinnant's unique_ptr implementation , and am running into
I am trying to insert a .csv file into SQL Server 2008 R2. The
I'm currently trying to use Boost Python to export a class, and then use

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.