Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

replacing data

Status
Not open for further replies.

dmaytum

Programmer
Mar 4, 2003
23
US
I have a table of customer data with a million rows. I also have a excel table of 1000 first names. I'd like to replace all 1 million first names of in the customer table with a name from the excel table. I guess a loop to replace the first thousand names, then go back to the beginning of the spreadsheet and replace the second thousand names... etc. I having trouble coming up with a way to do this? Thanks.
 
What would be the driving force behind the substitution? On basis of WHAT logic do you want to replace WHICH value in WHICH record with a value from Excel?

Explain more clearly what it is that you want to do...



Ties Blom
Information analyst
tbl@shimano-eu.com
 
Row 1 would be replaced by row 1 of the spreadsheet. Row 2 by row 2..., row 1000 by row 1000, then row 1001 by row 1 of the spreadsheet, 1002 by row 2, etc. Now that I've thought about a little more, I'm thinking of using a sequence generator to number the rows and just recycling the 1000 rows. Thanks for replying. I appreciate it.
 
Okay, perhaps you could work out something using a sequence generator combined with the MOD function, like:

IIF(MOD(SEQ,1000)=0,1000,MOD(SEQ,1000))

and use this value for a lookup to the excel data?

Ties Blom
Information analyst
tbl@shimano-eu.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top