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

Database

 
AnswerRe: search from multiple tables Pin
www.Developerof.NET13-Apr-10 21:50
www.Developerof.NET13-Apr-10 21:50 
AnswerRe: search from multiple tables Pin
Mycroft Holmes13-Apr-10 22:38
professionalMycroft Holmes13-Apr-10 22:38 
GeneralRe: search from multiple tables Pin
test-0913-Apr-10 22:54
test-0913-Apr-10 22:54 
GeneralRe: search from multiple tables Pin
Mycroft Holmes13-Apr-10 23:06
professionalMycroft Holmes13-Apr-10 23:06 
GeneralRe: search from multiple tables Pin
test-0913-Apr-10 23:12
test-0913-Apr-10 23:12 
GeneralRe: search from multiple tables Pin
Mycroft Holmes13-Apr-10 23:38
professionalMycroft Holmes13-Apr-10 23:38 
AnswerRe: search from multiple tables Pin
Eddy Vluggen14-Apr-10 5:37
professionalEddy Vluggen14-Apr-10 5:37 
QuestionConcatenating all fields in a resultset Pin
Dewald13-Apr-10 4:46
Dewald13-Apr-10 4:46 
I'm looking for a way to concatenate all the fields in a result set to one value. If I know the names of the fields, it is fairly easy:
SELECT Field1 + Field2 + Field3 FROM MyTable


although it is a bit more tricky if one or more of the fields are numeric in which case the following would do:
SELECT CAST(Field1 AS VARCHAR) + CAST(Field2 AS VARCHAR) + CAST(Field3 AS VARCHAR) FROM MyTable


The above snippets would return a long string (a concatenation of all the fields) for each row in the table.

But what if I don't know the names, number of and types of fields in the table? Is there a way to still accomplish the above?

Thanks in advance.
AnswerRe: Concatenating all fields in a resultset Pin
David Mujica13-Apr-10 5:33
David Mujica13-Apr-10 5:33 
GeneralRe: Concatenating all fields in a resultset Pin
Dewald13-Apr-10 21:01
Dewald13-Apr-10 21:01 
AnswerRe: Concatenating all fields in a resultset Pin
Mycroft Holmes13-Apr-10 22:35
professionalMycroft Holmes13-Apr-10 22:35 
GeneralRe: Concatenating all fields in a resultset Pin
Dewald14-Apr-10 0:38
Dewald14-Apr-10 0:38 
GeneralRe: Concatenating all fields in a resultset Pin
Mycroft Holmes14-Apr-10 2:06
professionalMycroft Holmes14-Apr-10 2:06 
QuestionWhat is the Best Approach for this Request Pin
Vimalsoft(Pty) Ltd13-Apr-10 0:56
professionalVimalsoft(Pty) Ltd13-Apr-10 0:56 
AnswerRe: What is the Best Approach for this Request Pin
Mycroft Holmes13-Apr-10 2:37
professionalMycroft Holmes13-Apr-10 2:37 
GeneralRe: What is the Best Approach for this Request Pin
Vimalsoft(Pty) Ltd13-Apr-10 2:54
professionalVimalsoft(Pty) Ltd13-Apr-10 2:54 
GeneralRe: What is the Best Approach for this Request Pin
Mycroft Holmes13-Apr-10 4:15
professionalMycroft Holmes13-Apr-10 4:15 
GeneralRe: What is the Best Approach for this Request Pin
Vimalsoft(Pty) Ltd13-Apr-10 4:17
professionalVimalsoft(Pty) Ltd13-Apr-10 4:17 
QuestionFamily Tree Database Pin
vdtrip12-Apr-10 10:06
vdtrip12-Apr-10 10:06 
AnswerRe: Family Tree Database Pin
Jörgen Andersson12-Apr-10 11:51
professionalJörgen Andersson12-Apr-10 11:51 
AnswerRe: Family Tree Database Pin
Mycroft Holmes12-Apr-10 14:18
professionalMycroft Holmes12-Apr-10 14:18 
GeneralRe: Family Tree Database Pin
vdtrip13-Apr-10 1:43
vdtrip13-Apr-10 1:43 
GeneralRe: Family Tree Database Pin
J4amieC13-Apr-10 2:11
J4amieC13-Apr-10 2:11 
GeneralRe: Family Tree Database Pin
Mycroft Holmes13-Apr-10 2:30
professionalMycroft Holmes13-Apr-10 2:30 
QuestionSqlDateTime overflow. - Only on one computer out of 5 running the same code Pin
Marcus J. Smith12-Apr-10 9:06
professionalMarcus J. Smith12-Apr-10 9:06 

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.