Re: sql query which has got 3 dynamic parameters
- From: Vic <vikrantp@xxxxxxxxx>
- Date: Sat, 23 Feb 2008 15:05:17 -0800 (PST)
On Feb 23, 12:56 pm, Ed Murphy <emurph...@xxxxxxxxxxxx> wrote:
Vic wrote:
We have another set of tables like
'TestData6061' or 'TestData606' etc where we have some data.
This sounds badly designed. Assuming that these tables look something
like this:
[TestData6061]
CustomerID | FirstName | LastName | TestResult
-----------+-----------+----------+-----------
1 | Winona | Lord | BTN
2 | Billie | Keister | XRC
3 | Daren | Koster | RNC
4 | Valentine | Perkins | FNG
5 | Aleta | Geyer | RWC
[TestData6062]
CustomerID | FirstName | LastName | TestResult
-----------+-----------+----------+-----------
6 | Bronte | Dunlap | SSC
7 | Sinclair | Basmanoff| RRE
8 | Monty | Siegrist | RBN
9 | Suzie | Bailey | NNN
10 | Shantel | Powers | BNM
they should be replaced with a single table like this:
[TestData]
TestID | CustomerID | FirstName | LastName | TestResult
-------+------------+-----------+----------+-----------
0601 | 1 | Winona | Lord | BTN
0601 | 2 | Billie | Keister | XRC
0601 | 3 | Daren | Koster | RNC
0601 | 4 | Valentine | Perkins | FNG
0601 | 5 | Aleta | Geyer | RWC
0602 | 6 | Bronte | Dunlap | SSC
0602 | 7 | Sinclair | Basmanoff| RRE
0602 | 8 | Monty | Siegrist | RBN
0602 | 9 | Suzie | Bailey | NNN
0602 | 10 | Shantel | Powers | BNM
So for running the reports we basically want to
pass that 'accounting', 'fundstructures' etc and not hard code it.
This is the confusing bit. What sort of procedure do you have that is
equally able to operate on 'accounting' and 'fundstructures' and several
other things? Unlike TestData0601 and TestData0602, they don't sound
like they have similar structures.
Are you doing a lot of SELECT * stuff? If so, then that's another thing
that may be good to revise.
So basically we have 2 tables as I mentioned 'SchemaFields' which
looks like this (gets populated by a perl script which parses some
data )
SchemaID Object Object Field Field Field Field
Class Type Name Number DataType Requirement
136 accou Accntg Record 1 genString Mandatory
nting Param Class
eters
136 accou Accntg Record 1 genString Mandatory
nting Param Action 2 ub1
Optional
eters
And then we have our 'TestData6061', TestData606, TestData607 tables
where test data is residing. It'll have test cases with actions as
'New', 'Update' and 'Delete'The idea is to map the above 6 columns
(other than SchemaID) with the data in the test data bases to find out
the coverage for each object and run report which will show a matrix
of
Object Class, ObjectType and New/Update/Delete (from TestData tables)
for these object classes n object types
So while running reports we just want a sql query (either plain select
statement or a stored/procedure, function etc) which is of the form
EXECUTE <StoredProcedure/Function> 'TestData6061', 'accounting', 133
TestData6061 and 133 is obtained from the dropdown list on the report
but the main issue is to iterate through all the object classes which
is 'accounting', 'fundstructures', 'calendar' etc and thats what the
issue is. Doest that make sense?
.
- Follow-Ups:
- Re: sql query which has got 3 dynamic parameters
- From: Ed Murphy
- Re: sql query which has got 3 dynamic parameters
- From: Erland Sommarskog
- Re: sql query which has got 3 dynamic parameters
- References:
- sql query which has got 3 dynamic parameters
- From: Vic
- Re: sql query which has got 3 dynamic parameters
- From: Vic
- Re: sql query which has got 3 dynamic parameters
- From: Erland Sommarskog
- Re: sql query which has got 3 dynamic parameters
- From: Vic
- Re: sql query which has got 3 dynamic parameters
- From: Erland Sommarskog
- Re: sql query which has got 3 dynamic parameters
- From: Vic
- Re: sql query which has got 3 dynamic parameters
- From: Ed Murphy
- sql query which has got 3 dynamic parameters
- Prev by Date: Re: sql query which has got 3 dynamic parameters
- Next by Date: Re: sql query which has got 3 dynamic parameters
- Previous by thread: Re: sql query which has got 3 dynamic parameters
- Next by thread: Re: sql query which has got 3 dynamic parameters
- Index(es):
Relevant Pages
|