Click here to Skip to main content
15,913,773 members
Home / Discussions / Database
   

Database

 
AnswerRe: fatch specified no Pin
N a v a n e e t h14-Aug-07 3:30
N a v a n e e t h14-Aug-07 3:30 
AnswerRe: fatch specified no Pin
Krish - KP14-Aug-07 3:55
Krish - KP14-Aug-07 3:55 
QuestionSQL Query reverse LIKE [modified] Pin
Ronni Marker14-Aug-07 0:11
Ronni Marker14-Aug-07 0:11 
AnswerRe: SQL Query reverse LIKE Pin
Rami Said Abd Alhalim14-Aug-07 0:24
Rami Said Abd Alhalim14-Aug-07 0:24 
GeneralRe: SQL Query reverse LIKE Pin
Ronni Marker14-Aug-07 0:28
Ronni Marker14-Aug-07 0:28 
GeneralRe: SQL Query reverse LIKE Pin
Rami Said Abd Alhalim14-Aug-07 0:32
Rami Said Abd Alhalim14-Aug-07 0:32 
GeneralRe: SQL Query reverse LIKE Pin
Ronni Marker14-Aug-07 0:47
Ronni Marker14-Aug-07 0:47 
GeneralRe: SQL Query reverse LIKE Pin
Rami Said Abd Alhalim14-Aug-07 2:28
Rami Said Abd Alhalim14-Aug-07 2:28 
add this function after that you can split string to compare between your string

=======================
SET QUOTED_IDENTIFIER OFF
GO
SET ANSI_NULLS OFF
GO

ALTER FUNCTION [dbo].[fn_Split]
(@text varchar(8000), @delimiter varchar(20) = ' ')
RETURNS @Strings TABLE
(
position int IDENTITY PRIMARY KEY,
value varchar(8000)
--Name2 Varchar(8000)

)
AS
BEGIN
/*Declare @Strings TABLE
(
position int IDENTITY PRIMARY KEY,
value varchar(8000)

)
*/

DECLARE @index int
SET @index = -1

Declare @Text2 varchar(8000)
SET @Text2=@text
Declare @index2 int

WHILE (LEN(@text) > 0)
BEGIN
SET @index = CHARINDEX(@delimiter , @text)
IF (@index = 0) AND (LEN(@text) > 0)
BEGIN
INSERT INTO @Strings VALUES (@text)
BREAK
END
IF (@index >1)
BEGIN
SET @index2=len(Right(@text, @index - 1))
SET @text2=SUBSTRING(@text,LEN(LEFT(@text, @index+1 )),CHARINDEX(@delimiter , @text)-1 )
INSERT INTO @Strings VALUES (LEFT(@text, @index - 1))
SET @text = RIGHT(@text , (LEN(@text) - @index))
END
ELSE
SET @text = RIGHT(@text, (LEN(@text) - @index))
END
RETURN
END
GO
SET QUOTED_IDENTIFIER OFF
GO
SET ANSI_NULLS ON
GO


=======================
after add this function
select * from tablename where 'abcd1'in select value from fn_Split('abcd1;abcd2;abcd3;abcd4',';')




Rami Abd alhalim
AnswerRe: SQL Query reverse LIKE Pin
andyharman14-Aug-07 1:04
professionalandyharman14-Aug-07 1:04 
GeneralRe: SQL Query reverse LIKE Pin
Ronni Marker14-Aug-07 2:45
Ronni Marker14-Aug-07 2:45 
QuestionProblem in inserting date for datetime field Pin
potlakayala14-Aug-07 0:09
potlakayala14-Aug-07 0:09 
AnswerRe: Problem in inserting date for datetime field Pin
Rami Said Abd Alhalim14-Aug-07 0:29
Rami Said Abd Alhalim14-Aug-07 0:29 
GeneralRe: Problem in inserting date for datetime field Pin
potlakayala14-Aug-07 0:37
potlakayala14-Aug-07 0:37 
AnswerRe: Change the date format as shown below. Pin
okdeshpande14-Aug-07 1:57
okdeshpande14-Aug-07 1:57 
GeneralRe: Change the date format as shown below. Pin
potlakayala14-Aug-07 2:28
potlakayala14-Aug-07 2:28 
GeneralRe: Change the date format as shown below. Pin
Pete O'Hanlon14-Aug-07 2:50
mvePete O'Hanlon14-Aug-07 2:50 
GeneralRe: Change the date format as shown below. Pin
potlakayala14-Aug-07 3:14
potlakayala14-Aug-07 3:14 
QuestionHow to put values in rows to columns in sql server 2005 Pin
Bhaskar Ravindranath14-Aug-07 0:05
Bhaskar Ravindranath14-Aug-07 0:05 
QuestionSummation in SQL Query Pin
ChandraRam13-Aug-07 23:49
ChandraRam13-Aug-07 23:49 
AnswerRe: Summation in SQL Query Pin
andyharman14-Aug-07 0:57
professionalandyharman14-Aug-07 0:57 
GeneralRe: Summation in SQL Query Pin
ChandraRam14-Aug-07 1:27
ChandraRam14-Aug-07 1:27 
GeneralRe: Summation in SQL Query Pin
andyharman14-Aug-07 1:35
professionalandyharman14-Aug-07 1:35 
GeneralRe: Summation in SQL Query Pin
ChandraRam14-Aug-07 1:53
ChandraRam14-Aug-07 1:53 
GeneralRe: Summation in SQL Query Pin
andyharman14-Aug-07 2:57
professionalandyharman14-Aug-07 2:57 
GeneralRe: Summation in SQL Query Pin
ChandraRam14-Aug-07 3:34
ChandraRam14-Aug-07 3:34 

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.