Mark A Matte
markamatte at hotmail.com
Tue Jun 20 11:13:41 CDT 2006
I will... The guy I'm helping with this...just shared exactly what he is trying to do...so the next question is...is there a limit to the number of cases you can have in a single statement? ...or is there a better approach to what we are doing? We have a table with all of the data created below(my first email)...then he wants to populate a category field with 1 of about 30 values...depending on the data in the records. Then there is another field treated the same way...another 30 Cases. Is there a limit? and... Case should be the way to go...right? Thanks, Mark >From: "Stuart McLachlan" <stuart at lexacorp.com.pg> >Reply-To: dba-sqlserver at databaseadvisors.com >To: dba-sqlserver at databaseadvisors.com >Subject: Re: [dba-SQLServer] If or Case or 'what'? >Date: Wed, 21 Jun 2006 01:23:06 +1000 > >On 20 Jun 2006 at 14:26, Mark A Matte wrote: > > > Thanks Stuart, > > > > This is exactly what I need. I stripped down the original query to give > > this example. Both tables are used in the original query. > > > > In your opinion...if you had to get this type of info from 80 mil+ > > recordset...as far as speed goes...would you go multiple passes into >temp > > tables and join later, or case statements? > > > >Hard to tell, but I suspect in this situation that the single pass would >prove quicker. Why not try both ways and report back :-) >-- >Stuart > > >_______________________________________________ >dba-SQLServer mailing list >dba-SQLServer at databaseadvisors.com >http://databaseadvisors.com/mailman/listinfo/dba-sqlserver >http://www.databaseadvisors.com >