Forum Replies Created

Viewing 15 posts - 331 through 345 (of 670 total)

  • RE: Pivot or?

    This looks right based on the data provided. To check, uncomment the code around select * from @Cols.

    Drop Table #t

    Create TABLE #t

    ([3Marketplace Order ID] [nvarchar](138)...

  • RE: Pivot or?

    It really doesn't matter the order of how you put them into the @Cols table. You just need to be able to order them when populating the @ColsList variable....

  • RE: Select most recent record in JOIN

    Nice, I wasn't even thinking about CTEs. I was conerned with showing stats without thinking of trying to keep it simple

  • RE: Select most recent record in JOIN

    is it possible that an order can have more than one record with the same StatusDate? Based on the limited data and the fact that we don't know what...

  • RE: Remove cursors without using while loop

    Have you read any of the comments that have been posted to this thread?:ermm:

  • RE: Remove cursors without using while loop

    I think Chris is right. You could output the fields you need into a temp table and use that to perform the update. Can you provide some table...

  • RE: Get Unique Rows

    Then you can

    select GroupID, max(DateStamp)

    from table

    group by GroupID

  • RE: How to Pass Multipl values in this Query.

    There are so many things wrong with this procedure.

    First the name of the proc should not start with SP_. Sql Server interprets this as a system stored...

  • RE: Get Unique Rows

    Can you explain on what you mean by getting the lastest row? Are records updated in this table too or are they strictly insert only records? If/When records...

  • RE: Rows to Columns

    If you have a table that identifies the ranges that each age are in, then it's pretty easy

    declare @t table (age tinyint, sex char(1))

    declare @grouping table (age tinyint, groupid tinyint)

    insert...

  • RE: change the path of attatchment file

    declare @t table (id int identity(1,1), attachment varchar(500))

    declare @NewPath varchar(20)

    declare @OldPath varchar(20)

    insert into @t

    select 'C:\test\file1.htm'

    union all

    select 'c:\test\directory1\LongFileName.xml'

    -- To Find the...

  • RE: change the path of attatchment file

    I amde the assumption that all your attachments have the full path in the name. Also, this type of update will assume that all the files will be in...

  • RE: Table-valued function calling from job?

    What is the TVF doing? Can you provide some DDL and sample data so we can see what you are talking about? Also, can you tell show uswhat...

  • RE: Search and Display Row if data does not exists..!

    This sounds like homework. You will need a parse the names in table 2 to get all the appropriate names, then join it to table 1 to get what...

  • RE: Combinations of rows

    Sounds like homework. What have you tried so far? You expected results don't match the input. Can you provide both input tables and then your attempts at...

Viewing 15 posts - 331 through 345 (of 670 total)