Re: Cross Tab Query

From: Hugo Kornelis (hugo_at_pe_NO_rFact.in_SPAM_fo)
Date: 02/07/05


Date: Mon, 07 Feb 2005 12:35:01 +0100

On Sun, 6 Feb 2005 22:29:02 -0800, Daud wrote:

>Than u very much dear u were the only who replied my and understand the
>issue. But unfortunately u have give the example for static entry I need
>dynamic one in the form that whatever records are entered in the table in the
>form they autometically comes in this way.

Hi Daud,

There is no easy way to do this in SQL Server. Since this is basically a
formatting issue, the obvious recommendation is to do this at the client,
which is the "proper" place for formatting in a tiered architecture.

If you really must do this at the server, you'll either have to use
dynamic SQL to generate a query like the one Nigel suggests, with the
"correct" values taken from your table, or you can use a third party
product, like RAC4SQL (www.rac4sql.com). Or you could wait for the release
of SQL Server 2005 - I've read that this version will provide crosstab
functionality.

Best, Hugo

-- 
(Remove _NO_ and _SPAM_ to get my e-mail address)


Relevant Pages

  • Re: Set based solution
    ... And SQL IS a data manipulation language, hence my problem with not using it ... that I had always used SQL Server to do data formatting for the past 12 ... instead of coding hooks in a dll to do this formatting, ... SQL, and T-SQL, is not a general purpose programming language. ...
    (microsoft.public.sqlserver.programming)
  • Re: Set based solution
    ... Pro SQL Server 2000 Database Design ... >> that I had always used SQL Server to do data formatting for the past 12 ...
    (microsoft.public.sqlserver.programming)
  • Re: Access vs SQL Date Weirdness = Incompatibility?
    ... There's no need to store formatting with the dates: ... I don't remember the details for SQL Server, but in Jet databases, ... other machines, regardless of what the Short Date format is on the other ... as dd/mm. ...
    (microsoft.public.access.formscoding)
  • Re: How to do this from DTS?
    ... Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP) www.SQLDTS.com - The site for all your DTS needs. ... > The 05 records are built from a second table, where I do similar formatting> on the record, and then do an inner join on an orderid field that's in the> main table. ... > So when if I need to sort it, the orderid would force the 01's, 02's and> 05's for customer X together, as apposed to putting customer Y's data> intermingled with it. ...
    (microsoft.public.sqlserver.dts)
  • Re: How to do this from DTS?
    ... Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP) www.SQLDTS.com - The site for all your DTS needs. ... > The 05 records are built from a second table, where I do similar formatting> on the record, and then do an inner join on an orderid field that's in the> main table. ... > So when if I need to sort it, the orderid would force the 01's, 02's and> 05's for customer X together, as apposed to putting customer Y's data> intermingled with it. ...
    (microsoft.public.sqlserver.programming)