Select MIN() & MAX()

Started by Krasnow, Gregover 27 years ago3 messagesgeneral
Jump to latest
#1Krasnow, Greg
gak@hnc.com

oops... my goof... I read it too quickly...

ok... one more stupid question... can you not do an "insert into t1 (select
'a','b',min(f)-1 from t2)"?

- Greg

Greg Krasnow
HNC Software Inc.
Financial Solutions Group
Senior Software Engineer
Email: gak@hnc.com
Direct Phone: 619.799.8341
Fax: 619.799.8036

#2Dimitri
dimitri@France.Sun.COM
In reply to: Krasnow, Greg (#1)
Re: [GENERAL] Select MIN() & MAX()

On Wed, 12 Aug 1998, you wrote:

oops... my goof... I read it too quickly...

ok... one more stupid question... can you not do an "insert into t1 (select
'a','b',min(f)-1 from t2)"?

Of course:

insert into t1
select 'a', 'b', min(f) - 1
from t2;

it's standard SQL

- Greg

Greg Krasnow
HNC Software Inc.
Financial Solutions Group
Senior Software Engineer
Email: gak@hnc.com
Direct Phone: 619.799.8341
Fax: 619.799.8036

--
=====================================================
Dimitri KRAVTCHUK (dim) Sun Microsystems
Benchmark Engineer France
dimitri@France.Sun.COM
=====================================================

#3Bruce Momjian
bruce@momjian.us
In reply to: Krasnow, Greg (#1)
Re: [GENERAL] Select MIN() & MAX()

oops... my goof... I read it too quickly...

ok... one more stupid question... can you not do an "insert into t1 (select
'a','b',min(f)-1 from t2)"?

Do:

insert into t1
select 'a','b',min(f)-1 from t2

I think that should work.

-- 
Bruce Momjian                          |  830 Blythe Avenue
maillist@candle.pha.pa.us              |  Drexel Hill, Pennsylvania 19026
  +  If your life is a hard drive,     |  (610) 353-9879(w)
  +  Christ can be your backup.        |  (610) 853-3000(h)