Viewing 15 posts - 4,651 through 4,665 (of 10,143 total)
The last SELECT in that script is
SELECT VoucherNumber = @VoucherNumber, retval = @retval
What values are returned?
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
May 8, 2013 at 2:58 am
Sergiy (5/7/2013)
Steven Willis (5/7/2013)
AND dsk2.ItemNumber = 2OP asked for the last (most right) part of the string, not for the second.
OP refers to "the tilde" in...
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
May 8, 2013 at 1:23 am
curious_sqldba (5/7/2013)
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
May 8, 2013 at 1:18 am
INSERT INTO lookuptable (
raw_sw_manufacturer, amended_sw_manufacturer,
raw_product_name, amended_product_name,
raw_product_version, amended_product_version)
SELECT
raw_sw_manufacturer, amended_sw_manufacturer,
raw_product_name, amended_product_name,
raw_product_version, amended_product_version
FROM lookuptable1 l1
WHERE NOT EXISTS (
SELECT 1
FROM lookuptable l
WHERE l.raw_sw_manufacturer = l1.raw_sw_manufacturer
AND l.raw_product_name = l1.raw_product_name
AND l.raw_product_version...
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
May 8, 2013 at 12:53 am
Debugging a script like this is quite tricky without any data to test against. Try running this:
--ALTER Procedure [dbo].[BS_Voucher_CreateVoucher]
DECLARE
@vouchertypeID int = 1,
@denomination int = 100,
@quantity int = 10,
@amountvalue int...
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
May 8, 2013 at 12:31 am
Thanks. Try this. With multiple dml statements it still requires a transaction and error handling:
ALTER Procedure [dbo].[BS_Voucher_CreateVoucher]
@vouchertypeID int = 1,
@denomination int = 100,
@quantity int = 10,
@amountvalue int = 100,
@userid varchar(50)...
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
May 7, 2013 at 8:57 am
Middle right, 15-20 minutes early. It was good, very thorough. Some excellent questions were asked - not too edge-case.
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
May 7, 2013 at 8:24 am
The guy in the brown top (or "jack") in the bottom right quadrant of this pic - that's my medikit exactly, and my own mother wouldn't recognise me in it....
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
May 7, 2013 at 8:00 am
Yes you're right:
ALTER Procedure [dbo].[BS_Voucher_CreateVoucher]
@vouchertypeID int = 1,
@denomination int = 100,
@quantity int = 10,
@amountvalue int = 100,
@userid varchar(50) = 1,
@validateDays int = 40
AS
--BEGIN
SET NOCOUNT ON;
DECLARE
@vouchertype varchar(20),
@transactionID varchar(20),
@count int =1,
@VoucherNumber int,...
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
May 7, 2013 at 7:21 am
kapil_kk (5/7/2013)
ChrisM@Work (5/7/2013)
ALTER PROCEDURE [dbo].[BS_GetSTNValue]
--DECLARE
@pFromStore int = 1001,
@pToStore int = 1004,
@pSTN VARCHAR(20) = 0 output
AS
--BEGIN
DECLARE
@count INT =...
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
May 7, 2013 at 7:14 am
Which column of the VALUES clause of the INSERT statement is it?
'V'+@retval + Replace( Str( @max-2 + @count, 7), ' ', '0') ?
seems likely, but you have no column...
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
May 7, 2013 at 6:09 am
aaron.reese (5/7/2013)
Your results set picks up the recod with a time stamp of 41287 which is the first in a pair.
Same answer as above: a...
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
May 7, 2013 at 6:04 am
Why isn't 41287 the second of a pair?
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
May 7, 2013 at 5:47 am
rodjkidd (5/7/2013)
Some pictures of a couple of people you may know of from the Medieval evening as SQLbits...Cheers,
Rodders...
I didn't see you Rod, but bumped into a few folks I know...
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
May 7, 2013 at 5:44 am
You're having problems with this mainly because you are working with one row at a time. Your control table is updated once for each row inserted, instead of updating it...
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
May 7, 2013 at 5:06 am
Viewing 15 posts - 4,651 through 4,665 (of 10,143 total)