Rows Append (1 Viewer)

SjCc

Registered User.
Local time
Today, 06:51
Joined
Oct 5, 2017
Messages
67
Hellow there!!

I have a table with field name Sdate (Short date dd-mm-yyyy)
In the same table i have another field I_Months (Numeric field)

now what i want that if i select todays date i.e. 12 Dec 2019 and select 6 in I_Months field means i want 6 rows to added in new table with month name like this as SDate would be the first start month (Its a installment DB)

Dec 2019 1
Jan 2020 2

so on till

May 2020 6


Any help would be appreciated
 

theDBguy

I’m here to help
Staff member
Local time
Today, 06:51
Joined
Oct 29, 2018
Messages
13,733
Hi. I think you can use a Tally table with a Cartesian query to get what you want.
 

vba_php

Forum Troll
Local time
Today, 08:51
Joined
Oct 6, 2019
Messages
2,884
would a cartesian actually work, guy? I've not used them much, so I would guess you might be right.

sjcc,

you can obviously do this with code as well, or by running 6 different INSERT INTO queries, one after the other, either through code or thru the interface.
 

vba_php

Forum Troll
Local time
Today, 08:51
Joined
Oct 6, 2019
Messages
2,884
Have a look here and follow the link in there as well for an example idea/approach.
yeah that's what I thought, guy. I read your stuff and I don't know if that's what this man wants. he only wants 6 records from ONE table. cartesians multiple things to very high levels of output, depending on the size of the 2 inputs.

you might be right though. lets wait to see what return response he's got for us.
 

SjCc

Registered User.
Local time
Today, 06:51
Joined
Oct 5, 2017
Messages
67
Resolved after whole night wffort
 

vba_php

Forum Troll
Local time
Today, 08:51
Joined
Oct 6, 2019
Messages
2,884
Resolved after whole night wffort
sjCC,

It would do future browsers of this thread a lot of good if you posted the details of the answer you found.
 

Users who are viewing this thread

Top Bottom