Forum Replies Created

Viewing 15 posts - 13,351 through 13,365 (of 15,381 total)

  • RE: sql server cursor

    toddasd (12/13/2011)


    omalie24 (12/13/2011)


    ...every field stays the same except for the on being incremented....see code that i have below...it inserts first letter of each column and loop doesnt break..

    That's because all...

  • RE: recursive cte to count subfolders

    So your ddl is not accurate either? It is really hard to figure out what you want when it keeps changing.

    Something like this maybe?

    create procedure GetSomeCount

    (

    @ChildID int

    ) as begin

    ;WITH cte...

  • RE: recursive cte to count subfolders

    Learner1 (12/13/2011)


    Hmm...that will be runnning for a hardcoded child Id (in this case 87)

    What if I run like this changing the where caluse to IN ----Where childId...

  • RE: recursive cte to count subfolders

    Learner1 (12/13/2011)


    Thanks but this is not what I am looking for

    once i get this fixed for 87 I will use this function to run for other MAINID's

    So basically I need...

  • RE: recursive cte to count subfolders

    I took the liberty of fixing your sample data.

    CREATE TABLE [dbo].[test](

    [main_id] [int] NULL,

    ...

  • RE: sql server cursor

    Welcome to SSC. It is really difficult to figure out what you are trying to do. It seems that you want to insert some data and have a sequential number...

  • RE: Advice on how to return results by matching score

    Can you put together some ddl and sample data? It sure make life a lot easier without having to create your structures and data. 😉

  • RE: Advice on how to return results by matching score

    That solution would require a large amount of dynamic sql with potentially hundreds of joins to the same table. I have an idea that would work using a string splitter....

  • RE: FK relationship problem

    Dev (12/13/2011)


    Sean Lange (12/13/2011)


    ...

    Another option that would accomplish both sides is to add an identity as your primary key and a unique constraint on the other two fields.

    Another...

  • RE: FK relationship problem

    Dev (12/13/2011)


    DenisT (12/13/2011)


    Thanks for your reply! Everything (including the column names) comes from the external feed. I need to have both of them as the primary because there...

  • RE: FK relationship problem

    Then you will have to add the date field as part of your foreign key. 😉

  • RE: Update record getting from some SQL Query

    If you want actual help you have to post actual information. As I said before...

    Start by posting ddl (create table scripts), sample data (insert statements), desired results based on sample...

  • RE: Is a good practice to put a state field in a table?

    luis martin ortiz barrutia (12/12/2011)


    I wonder why other DBMS like clipper , foxpro, vfp, dbase, has the option to delete records as logically delete and kepp it in the...

  • RE: select works in sql 2000 but not in 2008

    ricko (12/12/2011)


    Sean - I think you might be right

    It happens for any row in my data set. I just bring back the one field causing my problem like so

    SELECT...

  • RE: select works in sql 2000 but not in 2008

    Not exactly sure why there is an issue but are you actually taking a datetime, converting it to char and then back to datetime? Can you just simply use the...

Viewing 15 posts - 13,351 through 13,365 (of 15,381 total)