Viewing 15 posts - 496 through 510 (of 1,048 total)
oopes there was problem in this
UPDATE gv_vouchervalue
SET vouchervalue = ISNULL(vouchervalue,0) + (@leaf * @quantity)
OUTPUT deleted.vouchervalue INTO @VoucherNumberTable
WHERE voucherabbreviation = 'B' + @retval;
SELECT @VoucherNumber = ISNULL(vouchervalue,0) FROM @VoucherNumberTable;
in Gv_vouchervalue it...
_______________________________________________________________
To get quick answer follow this link:
http://www.sqlservercentral.com/articles/Best+Practices/61537/
May 8, 2013 at 11:42 pm
Hi Chris. I trie to play with tally script ans found that bouvherno are not generating new everytime when we run it.. it is returning same values due to that...
_______________________________________________________________
To get quick answer follow this link:
http://www.sqlservercentral.com/articles/Best+Practices/61537/
May 8, 2013 at 11:20 pm
Nice question....
Here are some more scenarios:
--Scenario 1
create table address_staging
(client int primary key,addressdetails varchar(250));
insert into address_staging
select 100,'hyderbad,india'
union all
select 101,'banglore,india'
union all
select 102,'banglore,india'
;
create table address_oltp...
_______________________________________________________________
To get quick answer follow this link:
http://www.sqlservercentral.com/articles/Best+Practices/61537/
May 8, 2013 at 11:08 pm
I think the prob is this part:
INSERT INTO GV_Booklet
SELECT
'B'+ REPLACE(STR(CONVERT(varchar,BookNo),5),' ','0') ,
@leaf,
@denomination,
@vouchertypeID,
'B' + @retval + REPLACE(STR(@VoucherNumber + p.N ,7),' ','0'),
--'B' + @retval + CAST(@VoucherNumber + ROW_NUMBER() OVER(ORDER BY...
_______________________________________________________________
To get quick answer follow this link:
http://www.sqlservercentral.com/articles/Best+Practices/61537/
May 8, 2013 at 8:38 am
ChrisM@Work (5/8/2013)
kapil_kk (5/8/2013)
oopes I am getting error: 🙁...
Can you post it on the relevant thread please?
Ok i have posted this in that thread
_______________________________________________________________
To get quick answer follow this link:
http://www.sqlservercentral.com/articles/Best+Practices/61537/
May 8, 2013 at 8:34 am
oopes I am getting error:
Cannot insert duplicate key row in object 'dbo.GV_Booklet' with unique index 'UN_GVBooklet_VoucherNo'. The duplicate key value is (BVD0002789).
ALTER procedure [dbo].[BS_Voucher_CreateBooklet]
@vouchertypeID int =2,
@denomination int = 555,
@quantity...
_______________________________________________________________
To get quick answer follow this link:
http://www.sqlservercentral.com/articles/Best+Practices/61537/
May 8, 2013 at 8:16 am
oopes I am getting error: 🙁
Cannot insert duplicate key row in object 'dbo.GV_Booklet' with unique index 'UN_GVBooklet_VoucherNo'. The duplicate key value is (BVD0002789).
ALTER procedure [dbo].[BS_Voucher_CreateBooklet]
@vouchertypeID int =2,
@denomination int = 555,
@quantity...
_______________________________________________________________
To get quick answer follow this link:
http://www.sqlservercentral.com/articles/Best+Practices/61537/
May 8, 2013 at 8:07 am
ChrisM@Work (5/8/2013)
kapil_kk (5/8/2013)
ChrisM@Work (5/8/2013)
kapil_kk (5/8/2013)
IdBookletIDLeafCountDenominationVoucherTypeIdVoucherNoQuantityCreatedDateModifyDateExpiryDateVoucherStatusIdTransactionIDAmountValueModifiedByCreatedByIsDeletedValidateDays
21B00005101101BVB848979722013-05-082013-05-08 18:51:50.9702013-11-08 18:51:50.9701TRN0000048011030
22B00005101101BVB848979822013-05-082013-05-08 18:51:50.9702013-11-08 18:51:50.9701TRN0000048011030
23B00005101101BVB848979922013-05-082013-05-08 18:51:50.9702013-11-08 18:51:50.9701TRN0000048011030
24B00005101101BVB848980022013-05-082013-05-08 18:51:50.9702013-11-08 18:51:50.9701TRN0000048011030
25B00005101101BVB848980122013-05-082013-05-08 18:51:50.9702013-11-08 18:51:50.9701TRN0000048011030
26B00005101101BVB848980222013-05-082013-05-08 18:51:50.9702013-11-08 18:51:50.9701TRN0000048011030
27B00005101101BVB848980322013-05-082013-05-08 18:51:50.9702013-11-08 18:51:50.9701TRN0000048011030
28B00005101101BVB848980422013-05-082013-05-08 18:51:50.9702013-11-08 18:51:50.9701TRN0000048011030
29B00005101101BVB848980522013-05-082013-05-08...
_______________________________________________________________
To get quick answer follow this link:
http://www.sqlservercentral.com/articles/Best+Practices/61537/
May 8, 2013 at 7:59 am
ChrisM@Work (5/8/2013)
kapil_kk (5/8/2013)
IdBookletIDLeafCountDenominationVoucherTypeIdVoucherNoQuantityCreatedDateModifyDateExpiryDateVoucherStatusIdTransactionIDAmountValueModifiedByCreatedByIsDeletedValidateDays
21B00005101101BVB848979722013-05-082013-05-08 18:51:50.9702013-11-08 18:51:50.9701TRN0000048011030
22B00005101101BVB848979822013-05-082013-05-08 18:51:50.9702013-11-08 18:51:50.9701TRN0000048011030
23B00005101101BVB848979922013-05-082013-05-08 18:51:50.9702013-11-08 18:51:50.9701TRN0000048011030
24B00005101101BVB848980022013-05-082013-05-08 18:51:50.9702013-11-08 18:51:50.9701TRN0000048011030
25B00005101101BVB848980122013-05-082013-05-08 18:51:50.9702013-11-08 18:51:50.9701TRN0000048011030
26B00005101101BVB848980222013-05-082013-05-08 18:51:50.9702013-11-08 18:51:50.9701TRN0000048011030
27B00005101101BVB848980322013-05-082013-05-08 18:51:50.9702013-11-08 18:51:50.9701TRN0000048011030
28B00005101101BVB848980422013-05-082013-05-08 18:51:50.9702013-11-08 18:51:50.9701TRN0000048011030
29B00005101101BVB848980522013-05-082013-05-08 18:51:50.9702013-11-08 18:51:50.9701TRN0000048011030
30B00005101101BVB848980622013-05-082013-05-08...
_______________________________________________________________
To get quick answer follow this link:
http://www.sqlservercentral.com/articles/Best+Practices/61537/
May 8, 2013 at 7:34 am
ChrisM@Work (5/8/2013)
kapil_kk (5/8/2013)
I tried this tally table to my another scenario for creating booklet...
What I want in this is that if @quantity =2 and @leaf =10 then 20 voucherno...
_______________________________________________________________
To get quick answer follow this link:
http://www.sqlservercentral.com/articles/Best+Practices/61537/
May 8, 2013 at 7:26 am
this is the data i get after runing this script:
IdBookletIDLeafCountDenominationVoucherTypeIdVoucherNoQuantityCreatedDateModifyDateExpiryDateVoucherStatusIdTransactionIDAmountValueModifiedByCreatedByIsDeletedValidateDays
21B00005101101BVB848979722013-05-082013-05-08 18:51:50.9702013-11-08 18:51:50.9701TRN0000048011030
22B00005101101BVB848979822013-05-082013-05-08 18:51:50.9702013-11-08 18:51:50.9701TRN0000048011030
23B00005101101BVB848979922013-05-082013-05-08 18:51:50.9702013-11-08 18:51:50.9701TRN0000048011030
24B00005101101BVB848980022013-05-082013-05-08 18:51:50.9702013-11-08 18:51:50.9701TRN0000048011030
25B00005101101BVB848980122013-05-082013-05-08 18:51:50.9702013-11-08 18:51:50.9701TRN0000048011030
26B00005101101BVB848980222013-05-082013-05-08 18:51:50.9702013-11-08 18:51:50.9701TRN0000048011030
27B00005101101BVB848980322013-05-082013-05-08 18:51:50.9702013-11-08 18:51:50.9701TRN0000048011030
28B00005101101BVB848980422013-05-082013-05-08 18:51:50.9702013-11-08 18:51:50.9701TRN0000048011030
29B00005101101BVB848980522013-05-082013-05-08 18:51:50.9702013-11-08 18:51:50.9701TRN0000048011030
30B00005101101BVB848980622013-05-082013-05-08 18:51:50.9702013-11-08 18:51:50.9701TRN0000048011030
_______________________________________________________________
To get quick answer follow this link:
http://www.sqlservercentral.com/articles/Best+Practices/61537/
May 8, 2013 at 7:25 am
Hi Chris,
I tried this tally table to my another scenario for creating booklet...
What I want in this is that if @quantity =2 and @leaf =10 then 20 voucherno will get...
_______________________________________________________________
To get quick answer follow this link:
http://www.sqlservercentral.com/articles/Best+Practices/61537/
May 8, 2013 at 7:20 am
ChrisM@Work (5/8/2013)
kapil_kk (5/8/2013)
;WITH E1(N) AS (
SELECT 1 UNION ALL SELECT 1 UNION ALL SELECT 1 UNION ALL
SELECT 1 UNION ALL SELECT 1 UNION ALL SELECT 1 UNION...
_______________________________________________________________
To get quick answer follow this link:
http://www.sqlservercentral.com/articles/Best+Practices/61537/
May 8, 2013 at 6:49 am
One more doubt Chris,
;WITH E1(N) AS (
SELECT 1 UNION ALL SELECT 1 UNION ALL SELECT 1 UNION ALL
SELECT 1 UNION ALL SELECT 1 UNION ALL SELECT 1 UNION ALL
SELECT 1...
_______________________________________________________________
To get quick answer follow this link:
http://www.sqlservercentral.com/articles/Best+Practices/61537/
May 8, 2013 at 5:50 am
ChrisM@Work (5/8/2013)
Firstly, read the error trapping article. If your batch fails in the middle of the transaction then you need a graceful way to...
_______________________________________________________________
To get quick answer follow this link:
http://www.sqlservercentral.com/articles/Best+Practices/61537/
May 8, 2013 at 5:17 am
Viewing 15 posts - 496 through 510 (of 1,048 total)