Click here to Skip to main content
15,911,896 members
Home / Discussions / Database
   

Database

 
QuestionSQL Server Code Generation Pin
billythekidney20-Apr-10 4:54
billythekidney20-Apr-10 4:54 
AnswerRe: SQL Server Code Generation Pin
Mycroft Holmes20-Apr-10 12:32
professionalMycroft Holmes20-Apr-10 12:32 
GeneralRe: SQL Server Code Generation Pin
billythekidney20-Apr-10 22:26
billythekidney20-Apr-10 22:26 
Questionhow to write insert querry for two tables Pin
developerit20-Apr-10 3:56
developerit20-Apr-10 3:56 
AnswerRe: how to write insert querry for two tables Pin
Ashfield20-Apr-10 9:03
Ashfield20-Apr-10 9:03 
QuestionSQL Server 2008 R2? Is the upgrade from 2008 free? Pin
DoctorOwl19-Apr-10 14:38
DoctorOwl19-Apr-10 14:38 
AnswerRe: SQL Server 2008 R2? Is the upgrade from 2008 free? Pin
Michel Godfroid20-Apr-10 4:15
Michel Godfroid20-Apr-10 4:15 
QuestionHow to do a quick / generic pivot? Pin
DoctorOwl18-Apr-10 16:25
DoctorOwl18-Apr-10 16:25 
In MS SQL 2008 I'm often doing big SELECT * statements from a couple tables looking for data in various fields, and have to scroll sideways in the SSMS window.

What I'd like to do is for every field in whatever table I'm selecting, to pivot so its name goes into FieldName, and its value into FieldValue. Then I can use sorts and quickly find what I'm looking for.

I've seen some articles on PIVOTs but they are almost always hardcoded for a specific table, and use aggregates. I want something dynamic and simple.

ie: SELECT * FROM AnyTable
Column 1, Column 2, Column 3
Data 1, Data 2, Data 3

Into:

Column 1, Data 1
Column 2, Data 2
Column 3, Data 3

I'm guessing some stored procedure is necessary but I haven't been able to find any. Does anyone have something simple in the toolbox?
AnswerRe: How to do a quick / generic pivot? Pin
Mycroft Holmes19-Apr-10 17:03
professionalMycroft Holmes19-Apr-10 17:03 
QuestionIs it posible to make several relations between two tables in SQL query ? Pin
H.R17-Apr-10 4:39
H.R17-Apr-10 4:39 
AnswerRe: Is it posible to make several relations between two tables in SQL query ? Pin
PIEBALDconsult17-Apr-10 4:59
mvePIEBALDconsult17-Apr-10 4:59 
AnswerRe: Is it posible to make several relations between two tables in SQL query ? Pin
Stanciu Vlad17-Apr-10 5:33
Stanciu Vlad17-Apr-10 5:33 
GeneralRe: Is it posible to make several relations between two tables in SQL query ? Pin
PIEBALDconsult17-Apr-10 5:36
mvePIEBALDconsult17-Apr-10 5:36 
GeneralRe: Is it posible to make several relations between two tables in SQL query ? Pin
Stanciu Vlad17-Apr-10 5:42
Stanciu Vlad17-Apr-10 5:42 
QuestionProcedure is using server resource but unmanaged how to managed that... Pin
Sasmi_Office16-Apr-10 23:35
Sasmi_Office16-Apr-10 23:35 
AnswerRe: Procedure is using server resource but unmanaged how to managed that... Pin
dan!sh 17-Apr-10 3:44
professional dan!sh 17-Apr-10 3:44 
GeneralRe: Procedure is using server resource but unmanaged how to managed that... Pin
Sasmi_Office17-Apr-10 4:19
Sasmi_Office17-Apr-10 4:19 
GeneralRe: Procedure is using server resource but unmanaged how to managed that... Pin
dan!sh 17-Apr-10 5:45
professional dan!sh 17-Apr-10 5:45 
AnswerRe: Procedure is using server resource but unmanaged how to managed that... Pin
Ashfield17-Apr-10 6:12
Ashfield17-Apr-10 6:12 
QuestionSort Results ignoring symbols like ! ? * " Pin
AlexeiXX316-Apr-10 16:14
AlexeiXX316-Apr-10 16:14 
AnswerRe: Sort Results ignoring symbols like ! ? * " [modified] Pin
Andy_L_J16-Apr-10 18:03
Andy_L_J16-Apr-10 18:03 
GeneralRe: Sort Results ignoring symbols like ! ? * " Pin
AlexeiXX316-Apr-10 18:35
AlexeiXX316-Apr-10 18:35 
GeneralRe: Sort Results ignoring symbols like ! ? * " Pin
Andy_L_J16-Apr-10 19:02
Andy_L_J16-Apr-10 19:02 
AnswerRe: Sort Results ignoring symbols like ! ? * " Pin
Eddy Vluggen17-Apr-10 0:37
professionalEddy Vluggen17-Apr-10 0:37 
Questionhow to read data from pdf file Pin
raghvendrapanda16-Apr-10 1:37
raghvendrapanda16-Apr-10 1:37 

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.