Click here to Skip to main content
15,885,278 members
Home / Discussions / Database
   

Database

 
QuestionHow to create database diagram in MYSQL Pin
vishal naik22-Apr-09 17:29
vishal naik22-Apr-09 17:29 
QuestionError handling in sql 2000 trigger Pin
codemunch22-Apr-09 10:10
codemunch22-Apr-09 10:10 
QuestionSQL SCRIPT Pin
kibromg22-Apr-09 5:25
kibromg22-Apr-09 5:25 
AnswerRe: SQL SCRIPT Pin
David Mujica22-Apr-09 5:43
David Mujica22-Apr-09 5:43 
GeneralRe: SQL SCRIPT Pin
kibromg22-Apr-09 6:44
kibromg22-Apr-09 6:44 
QuestionUPDATE statement using a view Pin
Shrimpersfan22-Apr-09 4:19
Shrimpersfan22-Apr-09 4:19 
AnswerRe: UPDATE statement using a view Pin
Eddy Vluggen22-Apr-09 5:17
professionalEddy Vluggen22-Apr-09 5:17 
QuestionCreating a temporary table Pin
fly90422-Apr-09 4:04
fly90422-Apr-09 4:04 
Hi,

I have a table which looks like the following.

OriginalTable
OriginalTable_Id(pk)	OriginalTable_Name(unique)
---------------------------------------------------
1			NewColumnName1
2			NewColumnName2
...


I need to make it look like this table below dynamically:

NewTable
NewTable_Id(pk)     NewColumnName1     NewColumnName2     ...
---------------------------------------------------------------


I know I need to create a new tempory Table (using tempDB?), but I don't know how to get the values in the table to be the new column names.

I have this at the moment:

CREATE TABLE NewTable
(
   NewTable_Id INT PRIMARY KEY,
   
   ???
   
)


???:
Would it be something like:
SELECT OriginalTable_Name FROM OriginalTable

Any tutorials or advice would be greatly appreciated.

Thanks in advance.

hmmm pie

AnswerRe: Creating a temporary table Pin
Syed Mehroz Alam22-Apr-09 6:49
Syed Mehroz Alam22-Apr-09 6:49 
GeneralRe: Creating a temporary table [SOLVED] Pin
fly90422-Apr-09 8:03
fly90422-Apr-09 8:03 
QuestionStored procedure with XML as it paramter Pin
ONeil Tomlinson22-Apr-09 3:40
ONeil Tomlinson22-Apr-09 3:40 
QuestionError when I run my C# program that work's with Oracle Pin
E_Gold22-Apr-09 1:20
E_Gold22-Apr-09 1:20 
AnswerRe: Error when I run my C# program that work's with Oracle Pin
SeMartens22-Apr-09 4:05
SeMartens22-Apr-09 4:05 
GeneralRe: Error when I run my C# program that work's with Oracle Pin
E_Gold22-Apr-09 19:12
E_Gold22-Apr-09 19:12 
GeneralRe: Error when I run my C# program that work's with Oracle Pin
SeMartens22-Apr-09 21:12
SeMartens22-Apr-09 21:12 
GeneralRe: Error when I run my C# program that work's with Oracle Pin
E_Gold23-Apr-09 4:44
E_Gold23-Apr-09 4:44 
GeneralRe: Error when I run my C# program that work's with Oracle Pin
SeMartens23-Apr-09 5:03
SeMartens23-Apr-09 5:03 
QuestionConnecting MS-ACCESS via asp.net c# Pin
sachees12321-Apr-09 23:14
sachees12321-Apr-09 23:14 
AnswerRe: Connecting MS-ACCESS via asp.net c# Pin
Eddy Vluggen21-Apr-09 23:19
professionalEddy Vluggen21-Apr-09 23:19 
QuestionImage in SSRS Header [modified] Pin
Hakmeh Mohannad21-Apr-09 20:27
Hakmeh Mohannad21-Apr-09 20:27 
QuestionSave ROWCOUNT value in a variable Pin
nt_virus21-Apr-09 5:35
nt_virus21-Apr-09 5:35 
AnswerRe: Save ROWCOUNT value in a variable Pin
Eddy Vluggen21-Apr-09 6:39
professionalEddy Vluggen21-Apr-09 6:39 
GeneralRe: Save ROWCOUNT value in a variable Pin
nt_virus21-Apr-09 7:43
nt_virus21-Apr-09 7:43 
GeneralRe: Save ROWCOUNT value in a variable Pin
nt_virus21-Apr-09 7:56
nt_virus21-Apr-09 7:56 
GeneralRe: Save ROWCOUNT value in a variable Pin
Eddy Vluggen21-Apr-09 8:33
professionalEddy Vluggen21-Apr-09 8:33 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.