473,606 Members | 2,200 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to convert rows into columns?

1 New Member
Here is My Query

Query
Select EmpName From Employee;

Result
EmpName
-------
A
B
C
D
E
F
G
H
I
J
K
L
...

I want to convert each Employe name as a column!!!

Thanks in advance.
Bhav
Feb 16 '11 #1
1 1029
ck9663
2,878 Recognized Expert Specialist
search the words "sql server pivot" in google.

Good Luck!!!

~~ CK
Feb 16 '11 #2

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

Similar topics

3
4776
by: ambersaria420 | last post by:
Hi All, I need to help with converting rows to columns in SQL2k. Input: Id Name Role 58 Ron Doe Associate 58 Mark Bonas Doctor 59 Mike Johnson Doctor
1
6063
by: blah1234 | last post by:
Is there anyway in DB2 to convert rows to columns? In other words, if I have the following table below... MemberID AccountNum ZipCode ------------------------------------ 1234 1 45645 1234 2 45647 1859 1 36363
0
1878
by: helpful sql | last post by:
Hi all, I am using an HTML table control on my ASP.Net page. Now I need to change this table so that columns become rows and rows become column. Since the table is very complex with many controls in them, I am wondering if there is any way to do this in visual studio 2003 or using any other tool. Thanks in advance.
2
2694
by: J055 | last post by:
Hi I've been looking into different ways of formatting columns/rows in the GridView control. I realize now, I think, that once the datasource is bound to the control the original column type information is lost, i.e. converted to a string. So my question is: is it better to format data while it's still in a DataTable, for example, then bind it to the control, or format the strings in the BoundField elements, or if more flexibility is...
9
101428
by: dotnetguru | last post by:
Hi SMART GUYS, Please help me write a query. Actually I want to convert my rows into columns. Can anyone kindly give me the query to do it? My rows are about employees. There can be any number of employees (in the following table I have 3 employees ABC, EFG, WRI) with any number of records for each employee (there can be 20, 30 records each), but all employees have the same number of records (in the following table each employee has 3...
1
6580
by: abbaskhan | last post by:
Actually i am working on some reports for that i need my rows to convert into columns. If we can please send me the code
3
1622
by: pushkaraj | last post by:
hi, I have a text file containing 2 rows of data points ....these data points are separated by 4 spaces in between and there are n number of such points where n can be 200-500.....i want a new text file to be created such that these 2 rows get converted to 2 columns( i need this file as a input file for gnuplot)......can anybody please help me in writing the code in vb....i have used vba in autocad and am a complete newbie ............please...
2
1936
by: kirankumarn | last post by:
How to convert rows into different columns Thanks in advance
6
2905
by: viki1967 | last post by:
Hi all. I need your help. I realize this script and I do not know where to begin: 1) A simple grid rows / columns. 2) The first column contain an input type = "checkbox" 3) When select the input type, the line should change color than the other rows, and you should open a popup window.
3
7039
by: ronakinuk | last post by:
how can i unhide rows/columns in excel 2007
0
8015
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8439
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8430
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8094
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8305
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6770
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
3930
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
3977
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1553
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.