Dear All,
I have 2 tables tblauxdaily and tblagentdata, tblauxdaily is updated daily with yesterdays stats via SS import,(I currently do this by exporting out of lucent to a excel file and then import in, is it possible to import directly out of lucent using VBA) What I need to do is update tblagentdata with all new names that appear in tblauxdaily, the names need to go in tblagentdata as the users windows login (NT - JSmith - InitalSurname)
I was going to use this as an expression to get the users login.
this would give me JSmith from John Smith. This is where I get totally clueless, I then need to update tblagentdata with all new agents, by entering the results of the expression into the tbl, I then also need to enter the agents full name in another field in tblAgentData
tblagentData fields
NT Login
Agent Name
tblAuxData fields
Agent Name
These are the fields I am sure will enable the update but I cannot get it to work. I thought I may need to put the result of 1 query into a temp table and then transfer to the tblAgentData afterwards or can I do it all with 1 query.
Any help/code/suggestions would be greatly appreciated.
Hope this is of use, Rob.![[yoda] [yoda] [yoda]](/data/assets/smilies/yoda.gif)
I have 2 tables tblauxdaily and tblagentdata, tblauxdaily is updated daily with yesterdays stats via SS import,(I currently do this by exporting out of lucent to a excel file and then import in, is it possible to import directly out of lucent using VBA) What I need to do is update tblagentdata with all new names that appear in tblauxdaily, the names need to go in tblagentdata as the users windows login (NT - JSmith - InitalSurname)
I was going to use this as an expression to get the users login.
Code:
Left(Left([Agent Name],InStr(1,[Agent Name]," ")),1) & Mid([Agent Name],InStr(1,[Agent Name]," ")+1)
tblagentData fields
NT Login
Agent Name
tblAuxData fields
Agent Name
These are the fields I am sure will enable the update but I cannot get it to work. I thought I may need to put the result of 1 query into a temp table and then transfer to the tblAgentData afterwards or can I do it all with 1 query.
Any help/code/suggestions would be greatly appreciated.
Hope this is of use, Rob.
![[yoda] [yoda] [yoda]](/data/assets/smilies/yoda.gif)