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 8738031
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T10:39:21+00:00 2026-06-13T10:39:21+00:00

I have the following data i want to upload: (Pair) (Date) (Time) (Bid) (Ask)

  • 0

I have the following data i want to upload:

(Pair)    (Date)    (Time)       (Bid)   (Ask)
EurUsd  01/01/2012  18:04:01    1.55037 1.55137
EurUsd  01/01/2012  18:04:20    1.55018 1.55118
EurUsd  01/01/2012  18:04:22    1.55031 1.55131
EurUsd  01/01/2012  18:04:36    1.55045 1.55145
EurUsd  01/01/2012  18:04:40    1.55058 1.55158
EurUsd  01/01/2012  18:04:40    1.5508  1.5518

GbpUsd  01/01/2012  18:06:11    1.55097 1.55197
GbpUsd  01/01/2012  18:06:22    1.55117 1.55217
GbpUsd  01/01/2012  18:06:24    1.55128 1.55228
GbpUsd  01/01/2012  18:06:38    1.55098 1.55198

The data types are as follows: Nchar(6), Date, Time, Decimal, Decimal.

Unfortunately i cant guarantee that the rows will be unique on a minute basis. I will also be adding data to this table on a Daily basis & other Pairs.

Question 1). What is the best way to set up a PK for the above data. Im assuming i should just set up a new column called “Id”, of type BigInt, and set its “Is Identity” to Yes? Then set the PK to be “Id”?

Question 2). Clustered Index, based on “Pair”,”Date”, “Time”?

Question 3). Im assuming that if i set up an “Id” column in the table, i would need to have ColumnMapping on any sqlbulkcopy operation i was using to upload the data? Or is it not possible to load data into the column once its “Is Identity” property is set?

Thanks for your time.

  • 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-13T10:39:22+00:00Added an answer on June 13, 2026 at 10:39 am

    1.To setup a PK I suggest you can use the GUID(uniqueidentifier) and use NEWSEQUENTIALID() to populate the data automatically in your table.(This will become clustered index key)

    2.I guess there is no need of clustered index on the set of (“Pair”,”Date”, “Time”) columns.If you use any of these columns frequently in your where clause then I prefer non-clustered index on those columns.

    3.When it comes to sqlbulkcopy – you can map the only columns which you want to insert data in the table.

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

Sidebar

Related Questions

I have following data in my table. alt text http://img26.imageshack.us/img26/3746/productfield.png I want to extract
I have the following data. I want to take veh variable, starting with its
I have the following data: a=c(1:10) b=c(16:25) c=c(24:33) wa=c(3,7,3,3,3,3,3,3,3,1) wb=c(3,2,3,3,3,3,3,3,3,8) wc=c(4,1,4,4,4,4,4,4,4,1) z=data.frame(a,b,c,wa,wb,wc) I want
Have the following select giving me the data I want, but I want to
I have following data frames > head(elo) date elo 1 1921-12-18 1597 2 1922-05-14
I want to upload a file using multipart form data and have problems with
I have following data: Dictionary<string,string> dctParameters = new Dictionary(){ {a,var1},{b,var2},{c,var3},.... } I want to
I have the following dummy code: dt<-data.frame(country=letters[1:20],val=rnorm(20),siz=rnorm(20)) qplot(x=country,y=val,data=dt,geom=point,size=siz) Now I want to increase the
I have following data structure (simplified): A giant list of the class TestClass public
I have following data to save in database using php my data is :

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.