M
mw4 via AccessMonster.com
I have a need (unfortunately) to take a relational database and query out
flat file output.
Let's say I have two tables:
tblAssets
AssetID--number
AssetDescription--text
etc...
tblPayments
PayID--number
AssetID--number
PayDate--Date
PayAmount--Currency
PayAccount--Number
Each asset can have multiple payments, traditional one to many.
I have a need to query the two tables to get an Excel output as such:
It would look like this if every asset only had one payment:
AssetID--AssetDescription--PayID--PayDate--PayAmount--PayAccount
If any ONE asset had two payments, it would look like this:
AssetID--AssetDescription--PayID--PayDate--PayAmount--PayAccount--PayID2--
PayDate2--PayAmount2--PayAccount2
If any ONE asset had three payments, it would look like this:
AssetID--AssetDescription--PayID--PayDate--PayAmount--PayAccount--PayID2--
PayDate2--PayAmount2--PayAccount2--PayID3--PayDate3--PayAmount3--PayAccount3
You get the idea.
I need a starting point for this query and then I can get it into Excel no
problem.
It's stumping me.
flat file output.
Let's say I have two tables:
tblAssets
AssetID--number
AssetDescription--text
etc...
tblPayments
PayID--number
AssetID--number
PayDate--Date
PayAmount--Currency
PayAccount--Number
Each asset can have multiple payments, traditional one to many.
I have a need to query the two tables to get an Excel output as such:
It would look like this if every asset only had one payment:
AssetID--AssetDescription--PayID--PayDate--PayAmount--PayAccount
If any ONE asset had two payments, it would look like this:
AssetID--AssetDescription--PayID--PayDate--PayAmount--PayAccount--PayID2--
PayDate2--PayAmount2--PayAccount2
If any ONE asset had three payments, it would look like this:
AssetID--AssetDescription--PayID--PayDate--PayAmount--PayAccount--PayID2--
PayDate2--PayAmount2--PayAccount2--PayID3--PayDate3--PayAmount3--PayAccount3
You get the idea.
I need a starting point for this query and then I can get it into Excel no
problem.
It's stumping me.