Click here to Skip to main content
15,914,162 members
Home / Discussions / Database
   

Database

 
AnswerRe: Creating Records based on Quant Field Pin
Mycroft Holmes12-Nov-09 11:35
professionalMycroft Holmes12-Nov-09 11:35 
GeneralRe: Creating Records based on Quant Field Pin
David Skelly12-Nov-09 22:41
David Skelly12-Nov-09 22:41 
GeneralRe: Creating Records based on Quant Field Pin
Mycroft Holmes12-Nov-09 23:05
professionalMycroft Holmes12-Nov-09 23:05 
AnswerRe: Creating Records based on Quant Field Pin
Niladri_Biswas12-Nov-09 16:16
Niladri_Biswas12-Nov-09 16:16 
AnswerRe: Creating Records based on Quant Field Pin
David Skelly12-Nov-09 22:38
David Skelly12-Nov-09 22:38 
GeneralRe: Creating Records based on Quant Field Pin
David Skelly13-Nov-09 0:15
David Skelly13-Nov-09 0:15 
GeneralRe: Creating Records based on Quant Field Pin
ffowler13-Nov-09 1:50
ffowler13-Nov-09 1:50 
GeneralRe: Creating Records based on Quant Field Pin
David Skelly13-Nov-09 2:31
David Skelly13-Nov-09 2:31 
Others may have a better suggestion, but I would select customer, widget, quantity and then use a cursor to fetch each row in turn. Then, for each row I would have a loop which repeats q times (where q is the quantity value for that row) and do an insert into the target table inside the loop. Does that make sense?

I'm not sure how you are planning to make each of the new rows unique in the target table, but at the simplest you could stick an identity column on there to handle the uniqueness. It seems a slightly odd requirement but I guess there is a reason behind it.

Sorry, no code because I don't use cursors that often, so I'm a bit rusty on the exact syntax. But Google is your friend when it comes to things like that.
GeneralRe: Creating Records based on Quant Field Pin
ffowler13-Nov-09 2:50
ffowler13-Nov-09 2:50 
QuestionProblem with Datepart Pin
Vimalsoft(Pty) Ltd12-Nov-09 3:10
professionalVimalsoft(Pty) Ltd12-Nov-09 3:10 
AnswerRe: Problem with Datepart Pin
J4amieC12-Nov-09 3:52
J4amieC12-Nov-09 3:52 
AnswerRe: Problem with Datepart Pin
Not Active12-Nov-09 5:36
mentorNot Active12-Nov-09 5:36 
GeneralRe: Problem with Datepart Pin
David Skelly12-Nov-09 5:42
David Skelly12-Nov-09 5:42 
GeneralRe: Problem with Datepart Pin
Not Active12-Nov-09 5:44
mentorNot Active12-Nov-09 5:44 
AnswerRe: Problem with Datepart Pin
David Skelly12-Nov-09 5:42
David Skelly12-Nov-09 5:42 
GeneralRe: Problem with Datepart Pin
Vimalsoft(Pty) Ltd12-Nov-09 22:52
professionalVimalsoft(Pty) Ltd12-Nov-09 22:52 
QuestionChanging a column to IDENTITY Pin
garfield18511-Nov-09 22:34
garfield18511-Nov-09 22:34 
AnswerRe: Changing a column to IDENTITY Pin
Niladri_Biswas12-Nov-09 1:16
Niladri_Biswas12-Nov-09 1:16 
GeneralRe: Changing a column to IDENTITY Pin
garfield18512-Nov-09 2:41
garfield18512-Nov-09 2:41 
GeneralRe: Changing a column to IDENTITY Pin
WoutL12-Nov-09 3:05
WoutL12-Nov-09 3:05 
GeneralRe: Changing a column to IDENTITY Pin
Niladri_Biswas12-Nov-09 3:22
Niladri_Biswas12-Nov-09 3:22 
QuestionSqlConnection or what??????? i need help Pin
Mohamed El-Wehishy11-Nov-09 9:36
Mohamed El-Wehishy11-Nov-09 9:36 
NewsFree Online SQL Server 2008 R2 Developer Training Available on MSDEV Pin
brucedkyle11-Nov-09 5:56
brucedkyle11-Nov-09 5:56 
QuestionAdvice Needed - Regarding Data Transfer Between Databases On Seperate Servers [modified] Pin
It_tech11-Nov-09 4:36
It_tech11-Nov-09 4:36 
AnswerRe: Advice Needed - Regarding Data Transfer Between Databases On Seperate Servers Pin
_Damian S_11-Nov-09 13:34
professional_Damian S_11-Nov-09 13:34 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.