Viewing 15 posts - 661 through 675 (of 1,048 total)
ChrisM@Work (3/19/2013)
kapil_kk (3/18/2013)
...How to achieve this?plz help
Do you need help with the stub code I posted?
Thanks Chris, I have implemented that thing....
But I am not clear why you posted that...
March 19, 2013 at 2:21 am
ChrisM@Work (3/19/2013)
kapil_kk (3/19/2013)
I want to extract first letter from these words as 'VB', 'VD',...
March 19, 2013 at 2:19 am
Prasad.N (3/19/2013)
find below code
declare @retval varchar(100)
DECLARE @Str VARCHAR(100);
set @Str='Nyal Pra Raj'
SET @str=RTRIM(LTRIM(@str));
SET @retval=LEFT(@str,1);
WHILE CHARINDEX(' ',@str,1)>0 BEGIN
...
March 19, 2013 at 2:07 am
ChrisM@Work (3/18/2013)
Split thread. Original here.
Hey Chris I am not getting what you want to point out by this :w00t:
March 18, 2013 at 11:33 pm
ChrisM@Work (3/18/2013)
kapil_kk (3/18/2013)
((select min(VoucherNo) VoucherNo, TransactionID from GV_Voucher
group by TransactionID
--order by VoucherNo asc
)
union all
select max(VoucherNo)VoucherNo, TransactionID from GV_Voucher
group by TransactionID
--order by VoucherNo desc
)
select * from cte
Thsi...
March 18, 2013 at 7:18 am
Eugene Elutin (3/18/2013)
kapil_kk (3/18/2013)
Eugene Elutin (3/18/2013)
SELECT TransactionID, MIN(VoucherNo) , MAX(VoucherNo )
FROM yourtable
GROUP BY TransactionID
can you plz explain me how Min, MAX is working with alphanumeric values like 'VB00001'
In the same...
March 18, 2013 at 6:19 am
Eugene Elutin (3/18/2013)
SELECT TransactionID, MIN(VoucherNo) , MAX(VoucherNo )
FROM yourtable
GROUP BY TransactionID
can you plz explain me how Min, MAX is working with alphanumeric values like 'VB00001'
March 18, 2013 at 5:49 am
;with cte as
((select min(VoucherNo) VoucherNo, TransactionID from GV_Voucher
group by TransactionID
--order by VoucherNo asc
)
union all
select max(VoucherNo)VoucherNo, TransactionID from GV_Voucher
group by TransactionID
--order by VoucherNo desc
)
select * from cte
Thsi will also...
March 18, 2013 at 5:48 am
I have solved it..... forget to initialize the IsBookelet variable value ;-):w00t:
March 16, 2013 at 8:58 pm
This is the table structure if anyone requires:
REATE TABLE [dbo].[GV_Voucher](
[VoucherId] [int] IDENTITY(1,1) NOT NULL,
[VoucherTypeId] [int] NOT NULL,
[VoucherNo] [varchar](20) NOT NULL,
[Denomination] [int] NOT NULL,
[BookletId] [int] NULL,
[ExpiryDate] [date] NULL,
[CreatedDate] [datetime] NULL,
[ModifyDate] [datetime]...
March 16, 2013 at 7:24 am
Danny Ocean (3/15/2013)
kapil_kk (3/15/2013)
Danny Ocean (3/15/2013)
one more thing apart from this question. if you set ARITHABORT OFF and then execute below code, it will give...
March 15, 2013 at 5:25 am
Danny Ocean (3/15/2013)
one more thing apart from this question. if you set ARITHABORT OFF and then execute below code, it will give output as "*"...
March 15, 2013 at 12:38 am
Danny Ocean (3/15/2013)
one more thing apart from this question. if you set ARITHABORT OFF and then execute below code, it will give output as "*"...
March 15, 2013 at 12:29 am
demonfox (3/14/2013)
didn't occur a doubt on the 0 😛
though I had a doubt over
select isnull ( convert (char(3),1.0/9) ,'*')
-- or
select isnull ( convert (char(3),1/9.0) ,'*')
and it clears out...
March 14, 2013 at 11:24 pm
Viewing 15 posts - 661 through 675 (of 1,048 total)