Forum Replies Created

Viewing 15 posts - 14,551 through 14,565 (of 15,381 total)

  • RE: How to update particular digit in a field

    neillewis (6/9/2011)


    Thank you Sean!

    That is exactly what I was after. Just one tiny thing I had to change the Declare @NewVal to set the value separately i.e.

    declare @NewVal char(1)

    SET ...

  • RE: How to update particular digit in a field

    neillewis (6/9/2011)


    It's always the 12th for this update and it is updating it to the same number

    That is a strange request but here you go.

    create table #num

    ( val decimal(19,0))

    insert #num...

  • RE: trying to use UPDATE with FK's

    You might be able to just drop the primary key on that table and add the dummy records with the new value long enough to allow you to change the...

  • RE: need summarized info in the sql join queries

    Tiya (6/8/2011)


    even if price is coming that doesnt matter but my objective is to find average of 750 speeed.that is 850+950/2= 900

    Like I said remove price from your query and...

  • RE: need summarized info in the sql join queries

    Tiya (6/8/2011)


    I USED THIS QUERY AND THIS IS RETURNING CORRECT FOR ALL EXCEPT 750 BUT I WANT AVERAGE FOR 750 ALSO...(like it has to be 850+950/2 = 900)

    ________________________________________________________________________

    SELECT PRICE,AVG(PRICE) as...

  • RE: Need Help to create the Store procedure

    There is not enough information or clarity about what you are trying to do. Please see the link in my signature for best practices on posting questions.

  • RE: Indexed Views

    There are so many problems with that code it is hard to know where to start. Every single parameter is a varchar regardless of the actual datatype (dates, ints, etc)....

  • RE: Help with a stored procedure that accepts xml

    So where is the problem? There is a lot of unfinished code in here. Are your table variables being filled correctly? You are not using those table variables in the...

  • RE: trying to use UPDATE with FK's

    Since this is a one time data fix maybe you could insert a record with the bad snumber into the original table (assuming it is not the primary key). This...

  • RE: Update a record based on another record

    Sriram.RM (6/7/2011)


    you can use Upper()/Lower() function to overcome issues related case sensitive issues or look at collation...

    those functions won't help you unless you are in a case sensitive collation.

    Try...

  • RE: TRIM

    asm1212 (6/8/2011)


    Hey guys,

    I am importing a data file in SSIS and as I was doing the import I got an error message saying "The value could not be converted because...

  • RE: Need to pivot the table.

    Try looking at the article that Jeff posted and wrote. It will be MUCH better for you to learn the topic instead of a quick fix shortcut and be stumped...

  • RE: trying to use UPDATE with FK's

    Update a column snumber? What table? This is totally vague but I am assuming you are trying to do something like

    update table3 set snumber = [some value] where snumber =...

  • RE: Insert into table from other table while excluding duplicates

    bopeavy (6/7/2011)


    I do agree with you Sean a select distinct will always work assuming that a user has not entered data Incorrectly. My example was assuming that the 3 rows...

  • RE: Insert into table from other table while excluding duplicates

    Try something like this.

    create table #IDXRaw

    (

    invoice int,

    MEASURE varchar(5),

    Provider varchar(50)

    )

    create table #invoices

    (

    INVNUM int,

    MEASURE varchar(5)

    )

    insert #IDXRaw

    select 1, 'gal', 'provid1'

    union all

    select 1, 'gal', 'provid 1'

    union all

    select 1, 'gal', 'provid1'

    union all

    select 1, 'gal', 'provid12312'

    union...

Viewing 15 posts - 14,551 through 14,565 (of 15,381 total)