• justin_post (10/30/2012)


    On the front end, new students get added regularly. If I used the view I created today, on Friday, it wouldn't contain any new students that had been added between now and then. I guess the easiest thing to do is maybe drop and then re-create the view daily?

    either way is going to work, whether you rebuild the view to match your WHERE, or build a WHERE tomatch the selection criteria you need.

    i assume the AND sc.number in (5101,5102,5111,5112) in the WHERE predicates is what you mean by "student numbers always changing".

    if that's what changes, it doesn't belong in the view, it belongs in a query of the view.

    goes back to the view definition again.

    It might be better to simply create a view that selects from the core tables, that has the data (without WHERE filtering) so it is always correct.

    then change you bcp process to build a WHERE statement to append a WHERE statement, but it might get so long you hit the max size of a cmd again.

    dropping and recreating might work best for you.

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!