Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
mahdi87_gh
Yak Posting Veteran
72 Posts |
Posted - 2010-06-08 : 14:46:09
|
hi every bodyi want to convert a pivot statement to a simple select statment, and i want it to use in a access database!!in a project i have to work with access, help me on this:i have a table named tasadoftasadof [ tasadof_id (long integer), estekhdam (text) ]here is the sample data:1 vazife2 kadr3 kadr4 kadrmy query is:select [vazife],[kadr] from( select tasadof_id,estekhdam from tasadof) ppivot (count(tasadof_id)for estekhdam in( [vazife],[kadr] ))as pvt the output must be:vazif kadr1 3how can i convert it to use in access?thanks****<< I Love MTN.SH >>**** |
|
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2010-06-08 : 15:06:35
|
Use the TRANSFORM keyword. N 56°04'39.26"E 12°55'05.63" |
 |
|
|
mahdi87_gh
Yak Posting Veteran
72 Posts |
Posted - 2010-06-08 : 15:17:36
|
| thanksi don't know how to use Transform, Can u tell Me details****<< I Love MTN.SH >>**** |
 |
|
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2010-06-08 : 15:59:07
|
Read the Microsoft Access help file. N 56°04'39.26"E 12°55'05.63" |
 |
|
|
mahdi87_gh
Yak Posting Veteran
72 Posts |
Posted - 2010-06-10 : 02:16:01
|
| hi againi read the ms access help and i did it,and it works.thanksbut the way access do this job is a creating a cross table, and the result have more than one row.and i should sum the value in the same columns for all rows to get the final resultis there any way to have only one row as a result?****<< I Love MTN.SH >>**** |
 |
|
|
|
|
|