sql server stored procedure logic problem

  • HI friends i have small doubt in sql server.plese tell me how to solve this issuse

    i have 2 tables based on that i want load first table records into second table useing stored procedure. structure is same in both table

    columns like id ,name,sal in both table same columns.

    first table contains 1000 records .

    when ever we insert this records into second table that time 501 record is failed.

    when ever we load records what ever failed record that records must be showing errore message and remaing reords must be to load .

    that means when ever we applaying try catach method in stored procedure to handle errore .first in try methode to appply logic

    and catch metode is devlop errore message(501 records) once its catach errore.that errore is showing that records and remaing records(502 to 1000 records) to loaded in to

    second table

    plese tell me how to implement logic code in try catch block.

  • What is the error you are getting?

    Have you checked the file you are trying to load to make sure that there is nothing in there that causes the error - like a comma in a text field within a CSV file ?

    How are you loading the data ?

    do you have any scripts that are being used (see the first link in my signature below for supplying the information).

    Is it possible to see the data - I appreciate that it might be company / individual sensitive so this won't be possible?

    Might help if you read the second link in my signature - it's long but following the ideas there you might answer your own question when you try to rationalise the problem

    -------------------------------Posting Data Etiquette - Jeff Moden [/url]Smart way to ask a question
    There are naive questions, tedious questions, ill-phrased questions, questions put after inadequate self-criticism. But every question is a cry to understand (the world). There is no such thing as a dumb question. ― Carl Sagan
    I would never join a club that would allow me as a member - Groucho Marx

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

You must be logged in to reply to this topic. Login to reply