Thursday, June 26, 2014

SQL Query Help


yaa..but this is the only way my client needs it.


Tableb values will be changing on timely basis.


So we have to do it this way.


I know that we have to be using dynamic sql but am not gettting how to compare the ocndition form table2 with table1



To be honest I think this is beyond any help if this stays in the current form that it is. There's no relationships in the design, no checks or constraints. I'm assuming this is coming from a client side application, so doing it this way is going to cause all kind of security issues, and I won't even get started on the consequences this will have in the query optimiser and query performance. Who did the initial database design for this?


I would strongly suggest that this database is reworked to normalise the database model. This will not work at all. God help you if Celko sees this.


No comments:

Post a Comment