The chemical composition of comets can be inferred using spectroscopic observations in submillimeter and radio wavelengths. We aim to compare the production rates ratio of several volatiles in two comets, C/2001 Q4 (NEAT) and C/2002 T7 (LINEAR), which are generally regarded as dynamically new comets likely to originate in the Oort cloud. This type of comets is considered to be composed of primitive material that has not undergone considerable thermal processing. The line emission in the coma was measured in the comets, C/2001 Q4 (NEAT) and C/2002 T7 (LINEAR), that were observed on five consecutive nights, 7-11 May 2004, at heliocentric distances of 1.0 and 0.7AU, respectively, by means of high resolution spectroscopic observations using the 10-m Submillimeter Telescope (SMT) at the Arizona Radio Observatory (ARO). Both objects became very bright and reached naked-eye visibility during their perihelion passage in the spring of 2004.