Removing header and footer

I have two files which are getting sent to a UNIX server in order to be bcp'd into a database. The bcp is failing because there's a header and footer row on the file which give the date of the file and the number of rows in it. That's because the file is also being used for another process, so we can't change it being created like that.

The file is delimited by !, so I need to either add a bunch of exclamation points to the header and footer lines so they'll go in without causing the bcp to fail and I can just delete them at a database level or remove the header and footer lines.

The formats are:

header: T_ACCEL_20120301 (that's the date)
footer: T_ACCEL_588263 (that's the number of records)

Apparently there's something which can be done with an SED command which will remove these lines since they're always the first and last lines in the file, but my google-fu has failed me and my attempts to do this just meet with random errors. Can anyone help me out?

Edit: I've gotten the header solved but can't seem to remove the footer.

Something like this? This sed one-liner will remove 1st and last line of inputfile.

$ cat inputfile
T_ACCEL_20120301
hello
world
T_ACCEL_588263
$ sed '1d; $d' inputfile
hello
world
$

Use sed -i option for in-file modification.