Forum Replies Created

Viewing 15 posts - 4,651 through 4,665 (of 10,144 total)

  • RE: Isolation Level

    kapil_kk (5/8/2013)


    ChrisM@Work (5/8/2013)


    The last SELECT in that script is

    SELECT VoucherNumber = @VoucherNumber, retval = @retval

    What values are returned?

    VoucherNumberretval

    0VB

    Thanks.

    Either the table gv_vouchervalue doesn't have a row where voucherabbreviation = 'VVB',...

  • RE: Isolation Level

    The last SELECT in that script is

    SELECT VoucherNumber = @VoucherNumber, retval = @retval

    What values are returned?

  • RE: LEFT and RIGHT of Delimiter

    Sergiy (5/7/2013)


    Steven Willis (5/7/2013)


    AND dsk2.ItemNumber = 2

    OP asked for the last (most right) part of the string, not for the second.

    OP refers to "the tilde" in...

  • RE: Stuck with this update statement

    curious_sqldba (5/7/2013)


    I have a update statement which is killing my PLE( Page Life expectancy), it is dropping from 4000 to 120. Attached is the execution plan, would like to hear...

  • RE: if does not exist then insert row

    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...

  • RE: Isolation Level

    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...

  • RE: Isolation Level

    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)...

  • RE: Are the posted questions getting worse?

    Middle right, 15-20 minutes early. It was good, very thorough. Some excellent questions were asked - not too edge-case.

  • RE: Are the posted questions getting worse?

    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....

  • RE: Isolation Level

    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,...

  • RE: conversion of the varchar value overflowed an int column

    kapil_kk (5/7/2013)


    ChrisM@Work (5/7/2013)


    I'm sure there's an easier (and safer) way of doing this.

    ALTER PROCEDURE [dbo].[BS_GetSTNValue]

    --DECLARE

    @pFromStore int = 1001,

    @pToStore int = 1004,

    @pSTN VARCHAR(20) = 0 output

    AS

    --BEGIN

    DECLARE

    @count INT =...

  • RE: Isolation Level

    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...

  • RE: find pairs of NULL records without resorting to CURSORS

    aaron.reese (5/7/2013)


    @Lowell Good effort but not quite.

    Your results set picks up the recod with a time stamp of 41287 which is the first in a pair.

    @chrism-2

    Same answer as above: a...

  • RE: find pairs of NULL records without resorting to CURSORS

    Why isn't 41287 the second of a pair?

  • RE: Are the posted questions getting worse?

    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...

Viewing 15 posts - 4,651 through 4,665 (of 10,144 total)