Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Crosstab queries in stored procedures

Status
Not open for further replies.

casperthedog

Instructor
Jan 29, 2002
20
0
0
NZ
I created a crosstab query in MS Access which genrated the following SQL:

TRANSFORM First(tblBookText.text) AS FirstOftext
SELECT tblBookText.page, tblBookText.line
FROM tblBookText
GROUP BY tblBookText.page, tblBookText.line
PIVOT tblTEXT.word;

(My table has the following fields: ISBN, page, line, word, text. I am trying to store the text of a short book in a database with each word separately)

The crosstab query displays the text nicely on a form as it was displayed originally in the book

However I can't seem to use the same SQL code in the Visual Studio query builder. It doesn't seem to like the TRANSFORM statement.

Is there a different way to create such a query?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top