Re: create/using type dynamically




"hitchhikar" <reachsonu@xxxxxxxxx> wrote in message
news:1141418779.293361.261830@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Ok Morgan..the busines case is like i hav gt 100 key. Each key has one
or more value. Each key is associated with its own table.
Now i am looping thru the keys in a proc .Now for a key, based on the
keytablename ,i want to create a type and then iteriatin thru all the
values of that key want to use dynamic SQL and FORALL to update that
table ..and thn go on fr scnd key n so on.
I dun want to hardcode the types as tomoro i can add more keys OR
rename a key's table name, which means ill hav to update my sql code
also (the proc is gettin an XML which contains all info of the keys).

So i think u get the idea now

Drop the IM speak or I'll resort to using Latin.

If you are renaming tables then you have a bigger problem. You didn't state
the business case you stated the solution. In engineering the hardest part
is identifying the problem with sufficient detail to work towards a
solution. Please state the business case or business problem you are trying
to solve. (not the engineering solution).
Jim


.



Relevant Pages

  • Re: Do UDFs slow down Stored Proc execution?
    ... Tuning the queries of course would be the correct thing to do. ... works beautifully from a business logic perspective. ... I have been plowing through the Microsoft SQL Server 2000 Performance ... I don't know if you actually want to see that proc. ...
    (microsoft.public.sqlserver.programming)
  • Re: Modelers / code generators
    ... > dynamic SQL versus stored procs. ... extensive calculations on a lot of data, often this is done better in the ... >> a proc with another one, requires you to remove the old proc, however that ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Identical database w/ identical stored procedures?
    ... scripting the proc out and running it on all your DB's how may db's are ... Running straigh sp's over dynamic sql is alway better ... Defragmentation leads to downtime...Downtime leads ... INDEXDEFRAG and DBCC DBREINDEX are the force...May the force be with ...
    (comp.databases.ms-sqlserver)
  • Get processhandle
    ... I need my module to loop around and check that the newly created ... PROCESS_GETINFO_ and if it returns 4 (specified process does not ... I know the new process has completed its business and ... In other words I'm trying to achieve the equivalent of a "status $proc" ...
    (comp.sys.tandem)
  • Re: Pass SQL function as stored procedure param?
    ... Build a dynamic SQL statement in the proc and execute via sp_executesql ... Build the SQL statement in your application rather than use a proc. ... WHERE ItemID = @ItemID ...
    (microsoft.public.sqlserver.programming)