Solved

How do we bcp using row_number()

Posted on 2011-03-07
2
355 Views
Last Modified: 2012-05-11
Since I have a table which has no unique key / PK, what is the best way for me to do bcp to just grab record which not being collected, I have  column in the table call date_time which has getdate() values, so usually our data has around 50 millions to copy for each month, so I'm thinking to run this bcp daily can I us row_number() here ?
0
Comment
Question by:motioneye
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 4

Accepted Solution

by:
Amgad_Consulting_Co earned 500 total points
ID: 35058279
Hi,

it will not be a good idea, can't you just add am extra column as a PK (bigint, autonumber) just to use to identify a row nothing more.
0
 

Author Closing Comment

by:motioneye
ID: 35136801
I have find out another solution which using date and time function in sql server
0

Featured Post

The Ultimate Checklist to Optimize Your Website

Websites are getting bigger and complicated by the day. Video, images, custom fonts are all great for showcasing your product/service. But the price to pay in terms of reduced page load times and ultimately, decreased sales, can lead to some difficult decisions about what to cut.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In the first part of this tutorial we will cover the prerequisites for installing SQL Server vNext on Linux.
A Stored Procedure in Microsoft SQL Server is a powerful feature that it can be used to execute the Data Manipulation Language (DML) or Data Definition Language (DDL). Depending on business requirements, a single Stored Procedure can return differe…
Using examples as well as descriptions, and references to Books Online, show the different Recovery Models available in SQL Server and explain, as well as show how full, differential and transaction log backups are performed
Viewers will learn how to use the UPDATE and DELETE statements to change or remove existing data from their tables. Make a table: Update a specific column given a specific row using the UPDATE statement: Remove a set of values using the DELETE s…

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question