Click here to Skip to main content
15,920,110 members
Home / Discussions / Database
   

Database

 
GeneralBack up database Pin
GoldenStar18-Feb-05 22:56
GoldenStar18-Feb-05 22:56 
GeneralRe: Back up database Pin
Colin Angus Mackay19-Feb-05 1:10
Colin Angus Mackay19-Feb-05 1:10 
GeneralRe: Back up database Pin
GoldenStar20-Feb-05 10:13
GoldenStar20-Feb-05 10:13 
GeneralSome help with this SQL statement Pin
Tom Wright18-Feb-05 7:05
Tom Wright18-Feb-05 7:05 
GeneralRe: Some help with this SQL statement Pin
Michael Potter18-Feb-05 9:02
Michael Potter18-Feb-05 9:02 
GeneralRe: Some help with this SQL statement Pin
Tom Wright18-Feb-05 12:48
Tom Wright18-Feb-05 12:48 
GeneralAppend Column to Row Pin
Anonymous18-Feb-05 4:30
Anonymous18-Feb-05 4:30 
GeneralRe: Append Column to Row Pin
Michael Potter18-Feb-05 9:18
Michael Potter18-Feb-05 9:18 
Assuming you are using SQL Server

Here is a little sample of creating a comma delimited list from a set of rows. You can run it in SQL Query Analyzer by replacing [Name]/[Weather] with field/table of your choice. Careful that you don't pick a query that goes beyond the 8000 character limit.

This doesn't get rid of the cursor when assembling the final table since you will have to reset @sample to null at each row iteration. It does get rid of the nasty 'rows to 1 column' issue though.

DECLARE @sample VARCHAR(8000)
SELECT @sample = ISNULL(@sample + ', ','') + [Name]
FROM [Weather]

PRINT @sample

GeneralMigrating from Acess to Oracle Pin
ashish kabra18-Feb-05 2:38
ashish kabra18-Feb-05 2:38 
GeneralSQL Server row size Pin
Talal Sultan18-Feb-05 0:51
Talal Sultan18-Feb-05 0:51 
GeneralRe: SQL Server row size Pin
Mike Dimmick18-Feb-05 4:28
Mike Dimmick18-Feb-05 4:28 
GeneralRe: SQL Server row size Pin
Talal Sultan18-Feb-05 8:36
Talal Sultan18-Feb-05 8:36 
GeneralOlap Cubes Pin
Yulianto.17-Feb-05 14:24
Yulianto.17-Feb-05 14:24 
GeneralRe: Olap Cubes Pin
Mike Ellison17-Feb-05 14:34
Mike Ellison17-Feb-05 14:34 
GeneralRe: Olap Cubes Pin
Yulianto.17-Feb-05 14:47
Yulianto.17-Feb-05 14:47 
GeneralRe: Olap Cubes Pin
Anonymous18-Feb-05 5:40
Anonymous18-Feb-05 5:40 
GeneralRe: Olap Cubes Pin
GWSyZyGy18-Feb-05 7:21
GWSyZyGy18-Feb-05 7:21 
GeneralRe: Olap Cubes Pin
Yulianto.18-Feb-05 15:09
Yulianto.18-Feb-05 15:09 
GeneralInserting and Selecting .wav files from and to MySQL table Pin
j1webb17-Feb-05 11:01
j1webb17-Feb-05 11:01 
GeneralRe: Inserting and Selecting .wav files from and to MySQL table Pin
j45mw19-Feb-05 4:14
j45mw19-Feb-05 4:14 
GeneralNeed to convert the content of one field into several from a view Pin
DEWright_CA17-Feb-05 9:33
DEWright_CA17-Feb-05 9:33 
GeneralRe: Need to convert the content of one field into several from a view Pin
numbrel18-Feb-05 12:46
numbrel18-Feb-05 12:46 
Generalcannot add new records with multiple fields Pin
elephantstar17-Feb-05 8:31
elephantstar17-Feb-05 8:31 
GeneralRe: cannot add new records with multiple fields Pin
elephantstar17-Feb-05 10:14
elephantstar17-Feb-05 10:14 
GeneralCompare datarows Pin
pedros7316-Feb-05 10:02
pedros7316-Feb-05 10:02 

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.