473,503 Members | 2,120 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to transpose this table ?

1 New Member
I have this table
custid visitid pagenum pagename
001 1 1 acceuil
001 1 2 produit
001 2 1 home
002 1 3 rayon
002 1 4 rayon
001 2 2 produit
003 1 1 home

I want to convert the above table in the following form:

custid visitid page1 page2 page3 page4
001 1 acceuil produit null null
001 2 home produit null null
002 1 null null rayon rayon
003 1 home null null null

and at end

custid visitid page
001 1 acceuil>produit
001 2 homme>produit
002 1 rayon>rayon
003 1 home

I look forward to your reply. THANKS
Mar 27 '12 #1
1 2002
Rabbit
12,516 Recognized Expert Moderator MVP
Pivot the data and then coalesce() the fields.
Mar 27 '12 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

1
23172
by: Gregory S Moy | last post by:
I'm playing around with the following tables and need some advice. TablePeople (5000 records) peopleID sex age race TableExam (5000 records) examID
4
2847
by: Alan Lane | last post by:
Hello world: I'm including both code and examples of query output. I appologize if that makes this message longer than it should be. Anyway, I need to change the query below into a pivot table...
1
6415
by: jenny.rhodes | last post by:
Hello, Please can anyone guide me on how to transpose an access table where I have many records per id eg UserID Question Answer 1 1 a 1 2 d 1 3 ...
1
2312
by: Jenny | last post by:
Hello, Please can anyone guide me on how to transpose an access table where I have many records per id eg UserID Question Answer 1 1 a 1 2 d
7
12035
by: sangeetha | last post by:
Hi, i need to transpose a nx1 matrix to 1xn matrix inorder to multiply with nxn matrix in c language ... can anyone help in this coding ..the nx1 matrix is pi the data type is double *pi..this is...
7
3586
by: Leszek Gruszka | last post by:
I wrote an aplication that write something into tableA in sql2000. I want to write the same, but transposed into tableB. Someone can help me? Any example? *** Sent via Developersdex...
6
4942
by: JayDawg | last post by:
Excel has this cool little function where you can copy data, and then paste it transposed so that which runs across the rows now runs down a colum and visa versa. Is there a way in access to...
9
3246
by: john | last post by:
I have imported an Excel spreadsheet in Access. This table has 150 fields. The first field is 'user name', and all the other fields represent application names of which the value can be True of...
2
3911
by: erbrose | last post by:
Hello All! Hoping some folks could help me optimize and or choose the best route to do this process. First off, here is what I am trying to achieve. I have a (fairly large) table of ~34million rows...
1
2081
by: Val Lusis | last post by:
I'm trying to partially transpose a table into a delimited file. I have the bcp figured out, but would like some help with transposing fields. I have table this way (for purpose of simplicity I am...
0
7204
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7091
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7282
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
6998
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7464
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5586
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
3171
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
1516
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
741
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.