hello, ive got a problem im wondering if any1 can help me with...
im trying to achieve data to be displayed in either a query or a table in a certain way... atm im using a huge peice of code to sort the data and insert it into a temp table (which still doesnt workk 100% yet) to achieve what im going to ask.. im finding it hard to discribe what im trying to achieve but here goes...
basicaly i have two tables..
first table1 is
-------------------------------------------------------
|username|project1ref|project2ref|project3ref|project4ref|p1startdate|p1enddate| etc etc
table2 is like
-----------------------------------------------------------------
|projectref|projectname|other details etc
i need something to look at the two tables, and either produce a query or table, with this structure
---------------------------------------------------------------
|username|projectname|week|TrueFalse|
the username and the project name are self explanitory. its the week and true or false bit thats getting me
i need it to create a list basicaly but starting from a predefined date test if project 1 would be active on that date and if it is then input true in the truefalse column, then for the same project on the next row move forward 1 week, put that week in the date column and then again test if that project is active that week,
need it to do this 27 times so, basicaly i get 27 dates 1 week apart for project1 testing each time if its active that week.. then once thats done, move onto project2 for that user, then project 3 and so on, THEN do the same for the next user and so on
end up with what could be called a kind of gantt type list, but not
the reason im asking is im wondering id their isnt any easier more efficient way to achieve this, as the code im writing is getting kinda long winded...
any pointers in the right direction much appeicated
scoobs
im trying to achieve data to be displayed in either a query or a table in a certain way... atm im using a huge peice of code to sort the data and insert it into a temp table (which still doesnt workk 100% yet) to achieve what im going to ask.. im finding it hard to discribe what im trying to achieve but here goes...
basicaly i have two tables..
first table1 is
-------------------------------------------------------
|username|project1ref|project2ref|project3ref|project4ref|p1startdate|p1enddate| etc etc
table2 is like
-----------------------------------------------------------------
|projectref|projectname|other details etc
i need something to look at the two tables, and either produce a query or table, with this structure
---------------------------------------------------------------
|username|projectname|week|TrueFalse|
the username and the project name are self explanitory. its the week and true or false bit thats getting me
i need it to create a list basicaly but starting from a predefined date test if project 1 would be active on that date and if it is then input true in the truefalse column, then for the same project on the next row move forward 1 week, put that week in the date column and then again test if that project is active that week,
need it to do this 27 times so, basicaly i get 27 dates 1 week apart for project1 testing each time if its active that week.. then once thats done, move onto project2 for that user, then project 3 and so on, THEN do the same for the next user and so on
end up with what could be called a kind of gantt type list, but not
the reason im asking is im wondering id their isnt any easier more efficient way to achieve this, as the code im writing is getting kinda long winded...
any pointers in the right direction much appeicated
scoobs