![]() | |
![]() |
| | Thread Tools | Display Modes |
#21
| |||
| |||
|
|
As mentioned by Ed, yes there are multiple tables which have many identical columns and they have a few extra columns specific to the type (say accounting with have its few unique columns same with fundstructures and other tables in TestData6061). I don't think they can be merged into a single table, I might be wrong, not sure |
#22
| |||
| |||
|
|
Vic (vikra... (AT) gmail (DOT) com) writes: As mentioned by Ed, yes there are multiple tables which have many identical columns and they have a few extra columns specific to the type (say accounting with have its few unique columns same with fundstructures and other tables in TestData6061). I don't think they can be merged into a single table, I might be wrong, not sure What may be the best idea is to construct a view over the common columns: CREATE VIEW testcases AS SELECT testcase = 'accounting', [01-RecordClass], [02-RecordAction], ... FROM accounting UNION ALL SELECT 'fundstructures', [01-RecordClass], [02-RecordAction], ... FROM fundstructures UNION ALL ... This presumes that you don't have too many of these tables, as SQL Server only manages 256 tables in one query. You would probably have to define dynamically from that file produced by the Perl script. But from there you could work with the view with static queries. -- Erland Sommarskog, SQL Server MVP, esq... (AT) sommarskog (DOT) se Books Online for SQL Server 2005 athttp://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books... Books Online for SQL Server 2000 athttp://www.microsoft.com/sql/prodinfo/previousversions/books.mspx |
![]() |
| Thread Tools | |
| Display Modes | |
| |