Francisco Tapia
fhtapia at gmail.com
Mon Apr 12 16:02:30 CDT 2010
Use the pivot command http://www.databasejournal.com/features/mssql/article.php/3521101/Cross-Tab-reports-in-SQL-Server-2005.htm -Francisco http://sqlthis.blogspot.com | Tsql and More... On Mon, Apr 12, 2010 at 1:49 PM, Max Wanadoo <max.wanadoo at gmail.com> wrote: > Good idea. > > Or, ask the client to write down in plain english what he wants. When he > finds he cannot express what he wants then you say, if you cannot tell me > what you want how can I code it. > > If he can express it in plain english then it is easy to code. I am not > saying effective but possible. If you come across "doubts" refer it back > to > him to re-express what he wants. > > Amazing how many people cannot even write down what they want but they > "expect" the analyist/coder to "read my mind". > > Max > > > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Charlotte Foust > Sent: Monday, April 12, 2010 9:39 PM > To: Access Developers discussion and problem solving > Subject: Re: [AccessD] Any easy way to do this? > > John, > > > Is there a better way? > > Shoot the client!! > > I've done stuff somewhat similar to this before using classes ... I think! > I don't really understand what the client wants here. Horizontal fields? > Vertical fields? Huh?? > > Charlotte Foust > > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of jwcolby > Sent: Monday, April 12, 2010 9:28 AM > To: Access Developers discussion and problem solving; Sqlserver-Dba > Subject: [AccessD] Any easy way to do this? > > > My client is constantly asking for "table counts" by which I mean filling > in > a table that looks kind of like a crosstab (but isn't) but for 4 or 5 > vertical fields for 4 or 5 horizontal fields. > > FieldK FieldL FieldX FieldZ > FieldA Cnt? Cnt? ? ? > FieldB etc etc > FieldC > FieldD > > This isn't even a groupby since we are not talking values inside of FieldA, > but rather a total count WHERE Field In ('X','Y','Z') and Field K is not > null (or something similar). > > This is just killing me in terms of time to complete this as the only way I > am thinking of is to create 16 count queries. > > Is there a better way? > > -- > John W. Colby > www.ColbyConsulting.com > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com >