Forum Replies Created

Viewing 15 posts - 1 through 15 (of 15 total)

  • RE: Removing embedded duplicate rows

    I have a headache, I'm going to lunch and who cares if it's faster - it's not going on the Space Shuttle...thanks. 

  • RE: Removing embedded duplicate rows

    blah,blah, blah....I'm done & I can leave at 5:00! 

    exec sp_FEATS_pictureX 6, '471,499,460'

    CREATE PROCEDURE sp_FEATS_PictureX 

    @Concept int,

    @NotIn varchar(100)

    AS

    CREATE TABLE #strings (str int NOT NULL)

    exec charlist_to_table_sp @NotIN

    Declare @cnt int,

     @PictureSetID int,

     @Height int,

     @Width int,

     @PictureID...

  • RE: Removing embedded duplicate rows

    in here:

    A.PictureID not in (0)

    A.PictureID not in (10, 20, 30)

    or

    A.PictureID not in (@myVar)  

     

  • RE: Removing embedded duplicate rows

    How about?

     

    Declare @cnt int,

     @PictureSetID int,

     @Height int,

     @Width int,

     @PictureID int,

     @Description varchar(200),

     @FileName varchar(200)

    --Create Temp output table

    Create  TABLE #tmp

     (PictureSetID int,

     Height int,

     Width int,

     PictureID int,

     Description varchar(200),

     FileName varchar(200))

    --Create cursor of all records (dups included)

    Declare getallrecords cursor local...

  • RE: Removing embedded duplicate rows

    Are you girls still out there?

    How would you pass a sting of numbers to a stored proc...ie

    @myVar='10,80,90'

    then in the sp use as

    Select ..... NOT IN @myVar

    It don't work like...

  • RE: Removing embedded duplicate rows

    You know what would be funny?...if this was a sample question on a job interview. Given the data & structure of the table, there must be a way to accomplish this in...

  • RE: Removing embedded duplicate rows

    This is not rocket science. A guy has a stupid kid game he sells on a cd. I got hired to write a scaled-down web demo of it. The XML...

  • RE: Removing embedded duplicate rows

    argh...that 'group by' thing doesn't work so hot. I might just fix this when I have the recordset in ASP....just skip a dup. 

  • RE: Removing embedded duplicate rows

    there's no need to over-analyze this. This is the table I'm working with and this is what I need to do. I finish the project and then get paid.

    The...

  • RE: Removing embedded duplicate rows

    select PictureName

    From Pictures

    group by PictureName

    order by newid()

     

    seems to work....let me beat it to death, thanks

  • RE: Removing embedded duplicate rows

    no,no,no.....these are pictures...2 pictures of a camel, dog, cat...anything....I need to randomly select pictures but i don't want 2 of the same picture...sorry for the confusion

  • RE: Removing embedded duplicate rows

    I think I might have to write a stored procedure to create a cursor of the random result set then somehow remove the dups from top down

  • RE: Removing embedded duplicate rows

    camel 1

    camel 2

    are just data in a varchar field, nothing special....here's the deal...I use ORDER BY NEWID() to get a random sample of these pictures(that's what they are)...sometimes the other...

  • RE: Removing embedded duplicate rows

    select description, 

    from FEATS_PictureTEST order by newid()

    DESCRIPTION Field

    bathing suit 1

    thirty two 1

    throwing 1

    rectangle 2

    sweater 2

    forty eight 1

    camel 2

    shirt 1

    thirty five 1

    fourteen 2

    camel 1

    I don't want the camel 1 row at the...

  • RE: Removing embedded duplicate rows

    I'm using order by newID() to select a random list from this table, however I don't want 2 of any particular occurance (ie..dog 1, dog 2)...if I have dog 2...

Viewing 15 posts - 1 through 15 (of 15 total)