Updating table from another table
To update multiple columns, you use a list comma-separated assignments.You supply the value in each column’s assignment in the form of a literal value, an expression, or a subquery.I think this is enough code to make sense of what I'm doing, but if more is needed just let me know and I can post it up as well.in the inner loop after a match is found - but reverting the order of the 2 loops) - but leaving the complexity order to O(n^2). However, you might want different grouping in the two pivot tables. Second, the SET clause specifies which column that you want to modify and the new values.You can avoid the circular reference by using an alias for avg(Currency Column) (as you did in your example) or by not using an alias at all.If the column names are the same in both tables, your query would be like this: insert into Doc Type Group Select Doc Grp_Id, Doc Grp_Sub Id, Doc Grp_Group Name, Doc Grp_PM, Doc Grp_Doc Type from Opendatasource( 'SQLOLEDB','Data Source=10.1; User ID=sa; Password=gchaturthi')
From msdn: Multiple-record append query: Remove "values" when you're appending a group of rows, and remove the extra parentheses.
As of now, the application runs perfectly and does exactly what I need it to, but the problem comes in when a large data set is reviewed.
If I am pulling records for one day or even maybe a week, it runs at a decent pace, but once you get a month of data or more, it takes a fairly long amount of time. Is there possibly a better way that I can code this?
In Step 1 of the Excel 2003 Wizard, you can select the first option, to create an independent pivot table.
Or, select the fourth option, for pivot tables that share the same pivot cache.