Click here to Skip to main content
15,040,743 members
Home / Discussions / Database
   

Database

 
GeneralRe: parent and child interbase query Pin
peter83126-Aug-09 22:13
Memberpeter83126-Aug-09 22:13 
QuestionSql query problem Pin
adkalavadia26-Aug-09 20:09
Memberadkalavadia26-Aug-09 20:09 
AnswerRe: Sql query problem Pin
i.j.russell26-Aug-09 21:46
Memberi.j.russell26-Aug-09 21:46 
QuestionSQL:what is wrong in following query Pin
xodeblack25-Aug-09 22:07
Memberxodeblack25-Aug-09 22:07 
AnswerRe: SQL:what is wrong in following query Pin
Blue_Boy25-Aug-09 22:55
MemberBlue_Boy25-Aug-09 22:55 
GeneralRe: SQL:what is wrong in following query Pin
xodeblack25-Aug-09 23:00
Memberxodeblack25-Aug-09 23:00 
GeneralRe: SQL:what is wrong in following query Pin
Sebastian Br.26-Aug-09 0:41
MemberSebastian Br.26-Aug-09 0:41 
AnswerRe: SQL:what is wrong in following query Pin
Ashfield26-Aug-09 1:35
MemberAshfield26-Aug-09 1:35 
You cannot use an IN with a variable. Either use dynamic sql or, my preferred method, use a function to split the list into a table variable and join on that. A quick google will give you examples, but here is a starter

CREATE FUNCTION [dbo].[fn_DelimitedSplit] 
(
@TextToSplit VARCHAR(8000), @Delimiter VARCHAR(255)
)
RETURNS @SplitKeyword TABLE (Keyword VARCHAR(8000),seq int identity)
AS
BEGIN
 DECLARE @Word VARCHAR(255)

 WHILE (CHARINDEX(@Delimiter, @TextToSplit, 1)>0)
 BEGIN
  SET @Word = SUBSTRING(@TextToSplit, 1 , CHARINDEX(@Delimiter, @TextToSplit, 1) - 1)
  SET @TextToSplit = SUBSTRING(@TextToSplit, CHARINDEX(@Delimiter, @TextToSplit, 1) + 1, LEN(@TextToSplit))
  INSERT INTO @SplitKeyword(Keyword) VALUES(@Word)
 END
 
 INSERT INTO @SplitKeyword(Keyword) VALUES(@TextToSplit)
 return
END


Bob
Ashfield Consultants Ltd
Proud to be a 2009 Code Project MVP

QuestionSQL Server login problem Pin
mlowry25-Aug-09 11:35
Membermlowry25-Aug-09 11:35 
AnswerRe: SQL Server login problem Pin
Vimalsoft(Pty) Ltd27-Aug-09 0:04
professionalVimalsoft(Pty) Ltd27-Aug-09 0:04 
AnswerRe: SQL Server login problem Pin
cdpace28-Aug-09 11:33
Membercdpace28-Aug-09 11:33 
AnswerRe: SQL Server login problem Pin
mlowry29-Aug-09 6:32
Membermlowry29-Aug-09 6:32 
Questionxml schema Pin
Ebube25-Aug-09 6:19
MemberEbube25-Aug-09 6:19 
AnswerRe: xml schema Pin
Henry Minute25-Aug-09 6:56
MemberHenry Minute25-Aug-09 6:56 
QuestionCreating the XML Schema Pin
Ebube25-Aug-09 1:15
MemberEbube25-Aug-09 1:15 
AnswerRe: Creating the XML Schema Pin
David Mujica25-Aug-09 3:13
MemberDavid Mujica25-Aug-09 3:13 
QuestionADO.NET / Update Column in memory Pin
Sebastian Br.24-Aug-09 23:42
MemberSebastian Br.24-Aug-09 23:42 
AnswerRe: ADO.NET / Update Column in memory Pin
N a v a n e e t h25-Aug-09 2:05
MemberN a v a n e e t h25-Aug-09 2:05 
GeneralRe: ADO.NET / Update Column in memory Pin
Sebastian Br.25-Aug-09 2:55
MemberSebastian Br.25-Aug-09 2:55 
QuestionCHECKING NULL VALUES Pin
dotnetcsharpdev24-Aug-09 23:31
Memberdotnetcsharpdev24-Aug-09 23:31 
AnswerRe: CHECKING NULL VALUES Pin
dotnetcsharpdev25-Aug-09 0:19
Memberdotnetcsharpdev25-Aug-09 0:19 
GeneralRe: CHECKING NULL VALUES Pin
Ashfield26-Aug-09 1:43
MemberAshfield26-Aug-09 1:43 
Questionregarding foreignkey data Pin
kheer24-Aug-09 23:12
Memberkheer24-Aug-09 23:12 
AnswerRe: regarding foreignkey data Pin
dotnetcsharpdev24-Aug-09 23:33
Memberdotnetcsharpdev24-Aug-09 23:33 
GeneralRe: regarding foreignkey data Pin
kheer24-Aug-09 23:58
Memberkheer24-Aug-09 23:58 

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.