Click here to Skip to main content
15,912,578 members
Home / Discussions / Database
   

Database

 
GeneralRe: checking the fieldname in the table Pin
Dhyanga14-Jun-11 3:12
Dhyanga14-Jun-11 3:12 
QuestionComparing Table Entries Using C# and MS Access Pin
VonHagNDaz13-Jun-11 8:16
VonHagNDaz13-Jun-11 8:16 
AnswerRe: Comparing Table Entries Using C# and MS Access Pin
Johan Hakkesteegt27-Jun-11 0:06
Johan Hakkesteegt27-Jun-11 0:06 
QuestionHow to remove column "rowguid" from table in SQL server 2008? Pin
Hy Chanhan13-Jun-11 5:53
professionalHy Chanhan13-Jun-11 5:53 
AnswerRe: How to remove column "rowguid" from table in SQL server 2008? Pin
Hy Chanhan13-Jun-11 17:48
professionalHy Chanhan13-Jun-11 17:48 
QuestionRow by row error handling in Table value parameter in SQL 2008 Pin
Lijo Rajan13-Jun-11 5:22
Lijo Rajan13-Jun-11 5:22 
Question[SSIS 2008] - Global transformation method for GUID fields Pin
phil.o13-Jun-11 0:45
professionalphil.o13-Jun-11 0:45 
QuestionRecordset Seek - multiple fields Pin
john john mackey10-Jun-11 13:35
john john mackey10-Jun-11 13:35 
AnswerRe: Recordset Seek - multiple fields Pin
Eddy Vluggen11-Jun-11 1:00
professionalEddy Vluggen11-Jun-11 1:00 
Questionmoving column in sql Pin
Milad.Biroonvand10-Jun-11 9:32
Milad.Biroonvand10-Jun-11 9:32 
AnswerRe: moving column in sql Pin
GenJerDan10-Jun-11 11:21
GenJerDan10-Jun-11 11:21 
AnswerRe: moving column in sql Pin
David Skelly12-Jun-11 22:40
David Skelly12-Jun-11 22:40 
GeneralRe: moving column in sql Pin
Milad.Biroonvand13-Jun-11 7:50
Milad.Biroonvand13-Jun-11 7:50 
AnswerRe: moving column in sql Pin
thatraja13-Jun-11 0:03
professionalthatraja13-Jun-11 0:03 
GeneralRe: moving column in sql Pin
Milad.Biroonvand13-Jun-11 7:53
Milad.Biroonvand13-Jun-11 7:53 
GeneralRe: moving column in sql Pin
Pete O'Hanlon13-Jun-11 9:01
mvePete O'Hanlon13-Jun-11 9:01 
QuestionGet Percentages Of Rows With Date In Them - Grouped Pin
Kevin Marois10-Jun-11 5:48
professionalKevin Marois10-Jun-11 5:48 
QuestionSQL Function problem Pin
Etienne_12310-Jun-11 0:07
Etienne_12310-Jun-11 0:07 
AnswerRe: SQL Function problem Pin
PIEBALDconsult10-Jun-11 2:47
mvePIEBALDconsult10-Jun-11 2:47 
AnswerRe: SQL Function problem Pin
Eddy Vluggen10-Jun-11 6:18
professionalEddy Vluggen10-Jun-11 6:18 
QuestionSQL with variable amounts of fields Pin
Expert Coming9-Jun-11 19:58
Expert Coming9-Jun-11 19:58 
AnswerRe: SQL with variable amounts of fields Pin
Roman_wolf10-Jun-11 3:44
Roman_wolf10-Jun-11 3:44 
You could try this:

Procedure with following params
int ID (identity)
int AttackerID
int DefenderID
NVARCHAR AttackerCreatureIDs (this would be comma separated ids)
NVARCHAR DefenderCreatureIDs (this would be comma separated ids)

then in your proc, split the Ids string

the below function could be used

CREATE FUNCTION [dbo].[Split]
(
	@List nvarchar(2000),
	@SplitOn nvarchar(5)
)  
RETURNS @RtnValue table 
(
		
	Id int identity(1,1),
	Value nvarchar(100)
) 
AS  
BEGIN
While (Charindex(@SplitOn,@List)>0)
Begin 
Insert Into @RtnValue (value)
Select
    Value = ltrim(rtrim(Substring(@List,1,Charindex(@SplitOn,@List)-1))) 
    Set @List = Substring(@List,Charindex(@SplitOn,@List)+len(@SplitOn),len(@List))
End 
    Insert Into @RtnValue (Value)
    Select Value = ltrim(rtrim(@List))

    Return
END
GO

GeneralRe: SQL with variable amounts of fields Pin
Expert Coming10-Jun-11 12:02
Expert Coming10-Jun-11 12:02 
AnswerRe: SQL with variable amounts of fields Pin
David Skelly12-Jun-11 22:38
David Skelly12-Jun-11 22:38 
QuestionSQL 2005 Pin
lyngocquy9-Jun-11 7:05
lyngocquy9-Jun-11 7:05 

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.