Forum Replies Created

Viewing 15 posts - 8,401 through 8,415 (of 8,731 total)

  • RE: Search for value and Replace

    Animal Magic (9/17/2012)


    Why don't you take the group numbers out of the insert text?

    Maybe because he can't control the past and have to correct the data.

    Prevention is key, but you...

  • RE: Search for value and Replace

    From your table design, I would say is a problem with trailing spaces.

    Try this and tell us if it worked.

    select REPLACE(TEXT,RTRIM(Group_ID),' ')

    from #temp

  • RE: Add columns with special values

    That means that you don't have the columns in your table/view.

    As Lynn said, you can do things in a better way.

    If you need help translating, I could help you.

  • RE: Add columns with special values

    You could do something like:

    SELECT RefID,

    d_an,

    CASE WHEN d_an >= 1998 THEN 1 ELSE 0 END AS d_1998,

    CASE...

  • RE: Copy Rows to Another Table

    Check this image to know where to find the triggers.

    Use the appropriate table.

  • RE: how to select active inventory

    This should help you.

    --Parameters

    DECLARE @Year int, @Month int

    SELECT @Year = 2011, @Month = 11

    DECLARE @Date date

    SET @Date = DATEADD( mm, @Month - 1, DATEADD( yyyy, @Year - 1, 0))

    SELECT itemno...

  • RE: simple que

    Eugene Elutin (9/14/2012)


    harri.reddy (9/14/2012)


    thanks for your response,

    for my other question,

    it was something ,if i define global variable in sp,will it can be access in inside stored procedure

    Could you...

  • RE: Puzzle : Generating two unique numbers from an array of numbers (repetation not allowed)

    Do you always give untested results?

    Where are Series defined? Where's DDL? Where's the data? Why aren't you using SQL-92 JOINS that are more clear? Are you stuck in the past?

  • RE: how to select active inventory

    Now, I'm confused.

    Do you need active items in a particular month?

    or active and not sold items in a particular month?

  • RE: how to select active inventory

    Would the simplest way be correct?

    DECLARE @Date date

    SET @Date = '20110112' --Any day in November

    SET @Date = DATEADD( mm, DATEDIFF( mm, 0, @Date) + 1, 0) -- Get next month

    SELECT...

  • RE: Stored Procedure help

    It also depends on @@DATEFIRST = 7.

    Otherwise you might be counting Sundays or another day.

  • RE: T-SQL Help Needed

    Lynn Pettis (9/14/2012)


    I worked for a company that does business internationally. We stored the DUNS numbers for those businesses that we sent to D&B and were returned that information....

  • RE: NOT IN query very expensive, 100% CPU

    scogeb (9/14/2012)


    ...there is usually 5 different ways to write a SQL statement to get the same results! :hehe:

    The same results but with different performance (most of the time). 😀

  • RE: T-SQL Help Needed

    CELKO (9/13/2012)


    I really would love to listen to his answers regarding choosing natural keys for Persons and Companies entities (where the system is international and people/companies are not just...

  • RE: Using Print, will it slow down procedure?

    For the example you posted, you might want to check this article.

    Tally OH! An Improved SQL 8K “CSV Splitter” Function[/url]

    As they say, your better chance to improve performance would be...

Viewing 15 posts - 8,401 through 8,415 (of 8,731 total)