Click here to Skip to main content
15,895,557 members
Home / Discussions / Database
   

Database

 
QuestionSaving hashtable to sqlexpress database...Is is possible Pin
haomeister20-Sep-06 18:08
haomeister20-Sep-06 18:08 
AnswerRe: Saving hashtable to sqlexpress database...Is is possible Pin
jigneshelegant120-Sep-06 20:20
jigneshelegant120-Sep-06 20:20 
AnswerRe: Saving hashtable to sqlexpress database...Is is possible Pin
Scott Serl21-Sep-06 7:56
Scott Serl21-Sep-06 7:56 
QuestionSQL Query help Pin
picazo20-Sep-06 12:20
picazo20-Sep-06 12:20 
AnswerRe: SQL Query help Pin
albCode20-Sep-06 20:48
albCode20-Sep-06 20:48 
AnswerRe: SQL Query help Pin
Khawar Abbas120-Sep-06 23:49
Khawar Abbas120-Sep-06 23:49 
AnswerRe: SQL Query help Pin
i.j.russell21-Sep-06 2:22
i.j.russell21-Sep-06 2:22 
AnswerRe: SQL Query help Pin
Eric Dahlvang21-Sep-06 4:03
Eric Dahlvang21-Sep-06 4:03 
You could make a Stored Procedure that does this:
DECLARE @iColumns INT, @sql VARCHAR(2500),@cFruitName VARCHAR(10),@cFruitID varchar(10)

SET @sql = ''

DECLARE curFruits CURSOR FOR SELECT DISTINCT FruitID,FruitName FROM Fruits
OPEN curFruits
FETCH NEXT FROM curFruits INTO @cFruitID,@cFruitName
WHILE @@FETCH_STATUS = 0
BEGIN
	SET @sql = @sql + ', SUM(CASE FruitID WHEN ' + @cFruitID + ' THEN Amount ELSE 0 END) as [' + @cFruitName + ']'
	FETCH NEXT FROM curFruits INTO @cFruitID,@cFruitName
END

close  curFruits
DEALLOCATE curFruits

SET @sql =  'SELECT Basket' + @sql + ' FROM Baskets GROUP BY Basket'
print @sql
exec(@sql)


--EricDV Sig---------
Some problems are so complex that you have to be highly intelligent and well informed just to be undecided about them.
- Laurence J. Peters

QuestionOracle Question Pin
Ennis Ray Lynch, Jr.20-Sep-06 8:14
Ennis Ray Lynch, Jr.20-Sep-06 8:14 
AnswerRe: Oracle Question Pin
Farhan Noor Qureshi20-Sep-06 11:03
Farhan Noor Qureshi20-Sep-06 11:03 
GeneralNot really Pin
Ennis Ray Lynch, Jr.20-Sep-06 11:24
Ennis Ray Lynch, Jr.20-Sep-06 11:24 
AnswerRe: Oracle Question Pin
Eric Dahlvang20-Sep-06 12:09
Eric Dahlvang20-Sep-06 12:09 
GeneralRe: Oracle Question Pin
Ennis Ray Lynch, Jr.20-Sep-06 14:57
Ennis Ray Lynch, Jr.20-Sep-06 14:57 
QuestionDatatables, rows and columns Pin
TheJudeDude20-Sep-06 8:11
TheJudeDude20-Sep-06 8:11 
AnswerRe: Datatables, rows and columns Pin
albCode20-Sep-06 20:56
albCode20-Sep-06 20:56 
GeneralRe: Datatables, rows and columns Pin
TheJudeDude21-Sep-06 2:26
TheJudeDude21-Sep-06 2:26 
QuestionSqlException - 'Login failed for user (user)' Pin
nlindley720-Sep-06 6:55
nlindley720-Sep-06 6:55 
AnswerRe: SqlException - 'Login failed for user (user)' Pin
Colin Angus Mackay20-Sep-06 22:31
Colin Angus Mackay20-Sep-06 22:31 
GeneralRe: SqlException - 'Login failed for user (user)' Pin
nlindley721-Sep-06 7:07
nlindley721-Sep-06 7:07 
Questiongetting Server ip using vb.net Pin
GabrielVarun20-Sep-06 3:54
GabrielVarun20-Sep-06 3:54 
QuestionSQL Server Pin
Bravoone_200619-Sep-06 22:38
Bravoone_200619-Sep-06 22:38 
AnswerRe: SQL Server Pin
Colin Angus Mackay20-Sep-06 2:31
Colin Angus Mackay20-Sep-06 2:31 
QuestionI cannot retrive the field value Pin
vicky0000019-Sep-06 21:56
vicky0000019-Sep-06 21:56 
QuestionSql to Excel Pin
minniemooo19-Sep-06 21:31
minniemooo19-Sep-06 21:31 
AnswerRe: Sql to Excel Pin
_AK_19-Sep-06 21:39
_AK_19-Sep-06 21:39 

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.