Click here to Skip to main content
15,879,348 members
Home / Discussions / Database
   

Database

 
GeneralGetting SQL Server to generate code for objects Pin
OMalleyW11-Sep-03 4:51
OMalleyW11-Sep-03 4:51 
GeneralShrinkwrap database deployment Pin
Michael P Butler11-Sep-03 2:18
Michael P Butler11-Sep-03 2:18 
GeneralRe: Shrinkwrap database deployment Pin
Rob Graham15-Sep-03 10:06
Rob Graham15-Sep-03 10:06 
GeneralRe: Shrinkwrap database deployment Pin
Michael P Butler15-Sep-03 10:13
Michael P Butler15-Sep-03 10:13 
GeneralRe: Shrinkwrap database deployment Pin
Steve S15-Sep-03 21:55
Steve S15-Sep-03 21:55 
GeneralConcat Strings SQL Questions Pin
Braulio Dez10-Sep-03 23:21
Braulio Dez10-Sep-03 23:21 
GeneralRe: Concat Strings SQL Questions Pin
Mike Dimmick12-Sep-03 2:06
Mike Dimmick12-Sep-03 2:06 
GeneralRe: Concat Strings SQL Questions Pin
Braulio Dez12-Sep-03 2:18
Braulio Dez12-Sep-03 2:18 
Hi,

I found a solution with SQL Server, a bit ugly T-SQL thing...

<br />
CREATE TABLE foo<br />
 (c1 VARCHAR(10) NOT NULL, c2 VARCHAR(10) NOT NULL CHECK (c2 NOT LIKE<br />
'%,%'), PRIMARY KEY (c1,c2) )<br />
<br />
INSERT INTO foo VALUES ('Tom','Car')<br />
INSERT INTO foo VALUES ('Tom','House')<br />
INSERT INTO foo VALUES ('Tom','Plane')<br />
INSERT INTO foo VALUES ('Tom','Boat')<br />
INSERT INTO foo VALUES ('Jim','House')<br />
INSERT INTO foo VALUES ('Jim','Boat')<br />
<br />
CREATE TABLE Results<br />
 (c1 VARCHAR(10) PRIMARY KEY, c2list VARCHAR(100) NOT NULL)<br />
<br />
INSERT INTO Results<br />
 SELECT c1,MAX(c2) FROM foo GROUP BY c1<br />
<br />
WHILE @@ROWCOUNT>0<br />
 UPDATE Results<br />
  SET c2list =<br />
  (SELECT MAX(c2)<br />
   FROM foo<br />
   WHERE foo.c1 = Results.c1 AND<br />
    foo.c2<LEFT(c2list,CHARINDEX(',',c2list+',')-1))<br />
   + ', ' + c2list<br />
  WHERE EXISTS<br />
  (SELECT *<br />
   FROM foo<br />
   WHERE foo.c1 = Results.c1 AND<br />
    foo.c2<LEFT(c2list,CHARINDEX(',',c2list+',')-1))<br />
<br />
SELECT * FROM Results<br />
<br />

QuestionSQL: How to create a 1:1 relation? Pin
King_of_Queens10-Sep-03 22:09
King_of_Queens10-Sep-03 22:09 
AnswerRe: SQL: How to create a 1:1 relation? Pin
Mike Dimmick12-Sep-03 0:51
Mike Dimmick12-Sep-03 0:51 
Generaldatabase Pin
ranjjj10-Sep-03 19:01
ranjjj10-Sep-03 19:01 
GeneralRe: database Pin
PengFeidu11-Sep-03 2:18
PengFeidu11-Sep-03 2:18 
Generalquestion about OLEDB Pin
ashxly10-Sep-03 15:34
ashxly10-Sep-03 15:34 
GeneralRe: question about OLEDB Pin
Steve S11-Sep-03 2:04
Steve S11-Sep-03 2:04 
GeneralRe: question about OLEDB Pin
ashxly11-Sep-03 20:01
ashxly11-Sep-03 20:01 
GeneralNew version of SQL Server "Yukon" Pin
Nino_110-Sep-03 13:41
Nino_110-Sep-03 13:41 
GeneralRe: New version of SQL Server &quot;Yukon&quot; Pin
Tom Archer12-Sep-03 11:15
Tom Archer12-Sep-03 11:15 
GeneralRe: New version of SQL Server &quot;Yukon&quot; Pin
Mike Epprecht13-Sep-03 5:45
Mike Epprecht13-Sep-03 5:45 
Generalfilling a dataset; changing some data of the dataset without db-connection Pin
wolfschinnerl10-Sep-03 9:30
wolfschinnerl10-Sep-03 9:30 
GeneralRe: filling a dataset; changing some data of the dataset without db-connection Pin
Arjan Einbu12-Sep-03 10:42
Arjan Einbu12-Sep-03 10:42 
GeneralBatch Update performance Pin
WoonLeng9-Sep-03 16:59
WoonLeng9-Sep-03 16:59 
QuestionHow to bind in the Access Import Wizard Pin
King_of_Queens9-Sep-03 2:33
King_of_Queens9-Sep-03 2:33 
AnswerRe: How to bind in the Access Import Wizard Pin
Steve S9-Sep-03 6:19
Steve S9-Sep-03 6:19 
Generaldb schema required! help needed urgently Pin
rohitit6-Sep-03 10:45
rohitit6-Sep-03 10:45 
GeneralSP vs. View Pin
Not Active5-Sep-03 6:01
mentorNot Active5-Sep-03 6:01 

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.