Viewing 15 posts - 1,396 through 1,410 (of 1,923 total)
2Tall (6/7/2010)
I implemented the last post and it is just what I was looking for.Great work guys.
Many Thanks,
Phil.
Phil, i have edited my code, please use the latest code. Sorry for...
June 7, 2010 at 5:16 am
skcadavre (6/7/2010)
ColdCoffee (6/7/2010)
June 7, 2010 at 5:14 am
Yes it will be.. but if u be bit more specific on what you need, then v might provide a better solution..
June 7, 2010 at 5:09 am
Kavya,, try this:
create procedure USP_InsertStatusText(@Statustext char(150),@RecievedBy varchar(50),@Deliverydate datetime)
as
BEGIN
declare @date datetime
set @Deliverydate= convert(varchar,@Deliverydate,1) --as [mm/dd/yy] from TB_StatusEntry
insert into TB_StatusText values(@Statustext,@RecievedBy,@Deliverydate)
END
But i tell, you, please store the date field in...
June 7, 2010 at 4:33 am
If your request is what Sckadavre is saying, then this might help you! This code doesn use a self-referencing CTE, but assuming your string contains only one Key1: "
DECLARE @DELIMITER...
June 7, 2010 at 4:28 am
If thats NOT what you wanted, then please tel us your desired result based on the input recored set i provided..
June 7, 2010 at 4:04 am
Broadening the input result set:
Sample table and sample data
DECLARE @table TABLE ( STRING VARCHAR(64) )
INSERT INTO @table
SELECT '7487-OEM-00011193-0010(Key: HHYUR-86HZH-99V96-JKL0-88895)'
UNION ALL...
June 7, 2010 at 4:00 am
Hey Phil, is this what you are looking for?
DECLARE @str VARCHAR(64)
SET @str = '7487-OEM-00011193-0010(Key: HHYUR-86HZH-99V96-JKL0-88895)'
SELECT SUBSTRING(@str,( CHARINDEX('Key:',@str)+5 ) , (CHARINDEX ('-',@str,CHARINDEX('Key:',@str)) - (CHARINDEX('Key:',@str)+5 ) ) ) KEY_FIRST_PART
June 7, 2010 at 3:57 am
Gopi Muluka (6/4/2010)
ColdCoffee,Here the reason for the error message he received is whenever there is no '-' found in the string then CHARINDEX('-', @FieldName)-1 will return -1 ,
Taking...
June 4, 2010 at 3:03 am
ColdCoffee, the OP said 60 days, not 2 months, right?
Initially, the OP said it is 60 days, but if u could see the quote i my previous post, the...
June 4, 2010 at 2:59 am
hey there, this might help you.
First lets set-up sample data and table
DECLARE @TABLE TABLE (STRING VARCHAR(100))
INSERT INTO @TABLE (STRING)
SELECT 'E01234/1-1'...
June 4, 2010 at 2:43 am
For ex. today 5 June, it has to flag the data starting from 5 april
Dehqon, from this requirement, i see that you are interested in the same day of the...
June 4, 2010 at 2:23 am
Luca, why not break the 187998 rows into chunks of say 10000 and then carry out your processing ?? AS u have rightly said, CURSORs are troublesome, try using set-based...
June 4, 2010 at 1:09 am
Rod at work (6/3/2010)
Thank you, ColdCoffee, for using a simpler example. That makes the concept of CROSS JOIN with a WHERE clause easier to understand.
Wow, such a nice feeling...
June 3, 2010 at 7:50 pm
Ray K, nice that you have fixed the code, but for soehting called SQL Injection, you will still need to tweak the code a bit.. Please go through these following...
June 3, 2010 at 7:49 pm
Viewing 15 posts - 1,396 through 1,410 (of 1,923 total)