Re: SQL for Pivot Result
- From: Erland Sommarskog <esquel@xxxxxxxxxxxxx>
- Date: Tue, 19 Dec 2006 23:05:41 +0000 (UTC)
Arlyn_L (Arlyn_L@xxxxxxxxxxxxxxxx) writes:
I am attempting to use an oleDbDataAdaptor to access a database with three
tables:
temp_p with fields recno, ...
temp_ppv with fields recno, uid, type, ...
temp_pd with fields uid, value, ...
table temp_pv is a link table for a many to many relation with linked to
temp_p by recno and linked to temp_pd by uid.
table temp_pd.value contains place name elements whose function is defined
by the content of temp_ppv.type
I need to produce a pivot result to place in a Datatable.
I Have tried the following SQL with the result 'Function name is missing'.
I would suppose that message comes from the DB Engine you are acessing,
but you did not say which. The query looks like something that should
work on any engine, but you never know. Except for one thing: the backticks
around "value". They appear funny, at least for an SQL Server person like
me.
Maybe you should ask in a forum devoted to the RDBMS you are using.
--
Erland Sommarskog, SQL Server MVP, esquel@xxxxxxxxxxxxx
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx
.
- Prev by Date: meaning of table name in oledb consumer wizard
- Next by Date: 80004005 - unspecified error - jet db engine
- Previous by thread: meaning of table name in oledb consumer wizard
- Next by thread: Re: SQL for Pivot Result
- Index(es):
Relevant Pages
|