Re: sql query which has got 3 dynamic parameters



Vic (vikrantp@xxxxxxxxx) writes:
what exactly you mean by unclean data? I am not sure about that.
basically accounting, fundstructures, transaction contain a set of
records which are of type 'New', Update and Delete. Basically I don't
really care about the columns that are present in those tables all I
am interested in is how many test cases (count) I have for say
'accounting'-> 'AccountingParameters' for 'New', 'Update' and Delete.
I want to know the same thing (New, Update and Delete count) for all
the object classes (i.e. accounting, calendar, transaction ...) and
Object Types (each object class would have a bunch of object types
like accounting-> accountingparameters, accounting-
financialaccounting, accounting->lockdownpool)

Well, if you don't care, and want to explain to us what you are working,
then I start to wonder why we should care. We are asking all these
questions to help you to find a good solution, but we never get the
information we need.

Maybe it makes sense to you to have tables of which the names indicate
they are very different entities, but nevertheless have a set of columns
in common. But to me that sounds like a very odd thing. I reckon that
this is about testing something. But what you test, and why you have
these columns, I don't know.

I tried to execute the cursor as mentioned above and it produces the
results I want but they are shown as different data sets in different
tables. I want to run that one exec statement with middle parameter as
dynamic and want to have an output which is a single table. Is that
possible to do in sql?

You could insert data into a temp table in that cursor and then select
from the temp table in the end.


--
Erland Sommarskog, SQL Server MVP, esquel@xxxxxxxxxxxxx

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx
.



Relevant Pages

  • Re: sql query which has got 3 dynamic parameters
    ... basically accounting, fundstructures, transaction contain a set of ... Object Types (each object class would have a bunch of object types ... Well, if you don't care, and want to explain to us what you are working, ...
    (comp.databases.ms-sqlserver)
  • Re: Renumbering MS db ID?
    ... I'm not an Access user, but as far as the notion that 'there is no need to ... MS Access or MS SQL Server? ... There is no need to care what the ... > guarrantees that and it is the only purpose autonumber is used for. ...
    (microsoft.public.data.ado)
  • Re: Renumbering MS db ID?
    ... I'm not an Access user, but as far as the notion that 'there is no need to ... MS Access or MS SQL Server? ... There is no need to care what the ... > guarrantees that and it is the only purpose autonumber is used for. ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: Renumbering MS db ID?
    ... I'm not an Access user, but as far as the notion that 'there is no need to ... MS Access or MS SQL Server? ... There is no need to care what the ... > guarrantees that and it is the only purpose autonumber is used for. ...
    (microsoft.public.vb.database.ado)
  • AVAILABILITY LIST OF MY CONSULTANTS
    ... organizational and Techno Functional skills. ... Profit Center Accounting Product Costing. ... Services, SQL Server 2000 /2005, Crystal Reports, SQL Server Reports ...
    (rec.games.chess.politics)