Multiple inserts

  • WOW!! just between a couple of back and forth I got too late

    You are really fast guys huh!

     


    * Noel

  • Hey, I got nothing to do now... week-end starts in 7 minutes 45 seconds .

    ... And it took you 30 minutes to come back betwen replies .

  • - I'm officially withdrawing from this post....I just CANNOT MATCH your typing speed!AAAARGH!

    - big K - oh thanks - you know how much arguing with you has helped the numbers right ?!

    I think now I am going to disappear and reemerge on this site as a genderneutral persona so no one can track me down anymore! That way I can skulk around and observe without being observed!!!







    **ASCII stupid question, get a stupid ANSI !!!**

  • True I am doing other stuff too

     


    * Noel

  • Yup, you're on 2 threads right now, it's harder to keep up.

  • No such thing for you any more! Are you changing the IP address too ?

    Besides your writting style will soon discover you

     


    * Noel

  • Sushila,

     

    1) The five inserts you have to do!

    I have to insert data from 5 forms into 5 different tables. So one of the inserts would look like this:

    INSERT INTO School(UniqueId, SchoolName, SchoolCount, SchoolType, SchoolAdd1, SchoolAdd2, SchoolPhone, SchoolFax, SchoolIP, SchoolInfo, SchoolChart) VALUES(UniqueID, SchoolName, SchoolCount, etc....)

    2) any other common fields besides uniqueID ?! that'll certainly help reduce the # of parameters being passed.

    Unfortunately no, the data is related, but there is no data that is repeated across the tables.

    3) if there are no other common fields, then you just have to pass all 10-15 fields from each table as variables

    Yeah, fun.

    4) not sure what you mean by linking the tables - they're already being linked by uniqueid right ?!

    Yeah, I just mean I don't quite comprehend how I'll actually use UniqueId to link them.  Like how do I make sure each row in all 5 tables has the correct UniqueID?

    5) is your uniqueid an identity column that increments automatically or is it something you insert ?!

       Yeah, it's an identity column.  I could change that though since there's no real data in the tables yet.

    Thanks,

    M

  • Yup, she's easy to spot. She's the one writting in correct english.

    Let the week-end start. L8r guys.

  • Alright guys - it's a challenge - I'm NOT going to tell you before officially disappearing as Sushila and I'm obviously not going to tell you when I transition as whoever else - no - I cannot change my IP - but I CAN change my writing style - I'm looking forward to some fun and games (for me at least)....







    **ASCII stupid question, get a stupid ANSI !!!**

  • She meant, do you have relations between the tables?

  • Ya but you'll lose the post count... so I don't see the point. You'll never be a carpal tunnel .

    OK. I'm realy, really gone now..................

  • It is going to be even more fun! to bring you out of the shell!!


    * Noel

  • magyar - noel has the stored procedure all practically written out for you...

    where he says:

    Select @UniqueId = Scope_Identity(), @Err =@@Error

    if @Err 0 Goto QuitWithRollback

    -- Now use the ID from above to the rest of the tables

    that's exactly what you do...you insert into the first table - grab the unique ID that will be generated by the insert and then insert this ID into all your other tables - there really is no more to it than what noel has already outlined!

    remi - who wants carpal tunnel when i can have the challenge of working my way up the ladder again - besides the fun is going to be in the lurking!

    hasta lunes noel!







    **ASCII stupid question, get a stupid ANSI !!!**

  • M,

    Sorry for the delay getting back to you - darn paying job keeps interupting!!

    sushila - I agree wholeheartedly!!!!

    Looks like you folks have about solved the problem so I am off to the next task - getting ready for the weekend!!!!

     

    Darrell

  • M,

    Store the values as either session variables in ASP or state variables in ASP.NET.  (I'm assuming you are using ASP).  Once the 5th page is submitted then update your tables via a stored procedure. 

    Marvin

    Marvin Dillard
    Senior Consultant
    Claraview Inc

Viewing 15 posts - 16 through 30 (of 167 total)

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