Forum Replies Created

Viewing 15 posts - 3,676 through 3,690 (of 4,820 total)

  • RE: SQL 2008 - DTS export to Excel failing

    djj (6/11/2015)


    Does the entity that is running the job have rights to where the Excel file is being created?

    Yep, this is another possibility, especially if someone recently changed the permissions...

  • RE: Replacing Cursor Help in SQL 2008

    As written, your code's UPDATE does the same thing as the following:

    UPDATE CDI

    SET type = 'Active'

    FROM Customer_D_Info AS CDI

    WHERE @C_O_id > 0

    AND NOT EXISTS (

    SELECT 1

    FROM M_Order WITH (NOLOCK)

    INNER JOIN...

  • RE: Replacing Cursor Help in SQL 2008

    A couple of things right off the bat:

    1.) You have no table structure defined for #tempM, nor any sample data for us to work with.

    2.) You are declaring variables within...

  • RE: SQL 2008 - DTS export to Excel failing

    Any chance it's now returning more than 65536 rows? Also, check the destination spreadsheet and see if it's getting any partial data.

  • RE: How to select records only when their status has been changed?

    jay-125866 (6/10/2015)


    Thank you, Chris. Your solution works about right.

    The issue remaining is that the Product Pencil is also shown in the result. It's not supposed to be there since...

  • RE: Group by issue

    Take the following OUT of your GROUP BY clause:

    a.person_ref, b.ref_number,

    That should solve it. Dang, I didn't notice this earlier...

  • RE: Help needed in combining result

    KGJ-Dev (6/9/2015)


    Hi Drew/Sumngson,

    thanks for your response. once condition is missed on your query. If the offer is not available at company level then we need to check on client level...

  • RE: How to select records only when their status has been changed?

    jay-125866 (6/10/2015)


    Sorry for the confusion. Let me try my best to clarify the question a little.

    Some products we sold were returned by customers, and we'd refurbish them and put...

  • RE: Group by issue

    Actually, that query appears to fit your stated understanding quite well. However, saying that what you got out of it was "gobbledegook" doesn't actually help us determine what...

  • RE: please explain in below code

    Jacob Wilkins (6/9/2015)


    It's a statement type often employed in what is called the "quirky update" method of calculating a running total.

    It basically leverages an odd behavior of SET when used...

  • RE: Normalizing a database

    madan.preeti2005 (6/9/2015)


    Oh yes i forgot to mention that, once data is populated, indexes will be recreated. Do you think that will tune query to some extent?

    Jeff Moden asks a good...

  • RE: Help needed in combining result

    Try this:

    declare @client table(clientid int primary key,clientname varchar(30));

    declare @company table(compid int primary key,clientid int,compname varchar(30));

    declare @compoffer table(id int identity(1,1),compid int,startdate datetime, endadate datetime, compoffermessage varchar(500));

    declare @clientoffer table(id int identity(1,1),clientid int,startdate...

  • RE: How to select records only when their status has been changed?

    Alvin Ramard (6/9/2015)


    Why should 10 be selected? Its status is paid, but that status has not changed.

    How are you determining whether or not the status value has changed? ...

  • RE: Input values in table with a storeprocedure

    You'll need to substitute in the field names from the HST_MASTER.Control table that are relevant to the field values being inserted, as follows:

    INSERT INTO HST_MASTER.[Control] ([field name that corresponds to...

  • RE: Need a query to looking for cases of period difference in Legal names

    It also appears you have other non "period related" similarities, so you may need to strip out all white space, periods, and possibly even commas, in order to have a...

Viewing 15 posts - 3,676 through 3,690 (of 4,820 total)