Database Management
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsDatabasesDatabase Management

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Get inside! Sample the range of functionality easily built with JMSL Library for Time Series Data Analysis, Heat Maps, Portfolio Optimization, Monte Carlo Simulation, Stock Price Charting and more. Download Now!
  #1  
Old September 16th, 2003, 08:07 AM
hawaii7569 hawaii7569 is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2003
Posts: 6 hawaii7569 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Different results with an insert...

I have a select statement which gives me the results I desire, which is anything less that 8%. If I use it in an insert which should bring anything over that is less than 8%, I get all the results as if the 8% criteria wasn't there. Any suggestions?

INSERT INTO PI_RPT
select a.t$cuno,
c.t$nama,
to_char(a.t$orno),
a.t$item,
e.t$dsca,
to_char(b.t$odat,'MM/DD/YY'),
to_char(b.t$netc, '99999.99'),
to_char(a.t$netc, '99999.99'),
to_char(a.t$netc - b.t$netc,'9999.99'),
to_char(round(((a.t$netc / b.t$netc) - 1),4) * 100, '999.99')
from 1 a, 2 b, 3 c, 4 e
where a.t$cuno = b.t$cuno
and a.t$cuno = c.t$cuno
and c.t$cfcg = ' 23'
and a.t$item = b.t$item
and a.t$item = e.t$item
and (round(((a.t$netc / b.t$netc) - 1),4) * 100) < 8
and b.t$netc <> 0
and a.t$odat >= '01-MAR-03'
and a.t$invd = trunc(sysdate - 1)
and a.t$fono <> 0
and e.t$ctyp not in (select t$ctyf
from 5)
and e.t$kitm <> 4
and (e.t$dscd = '400104'
or e.t$dscb in ('PAPER','TROPHY'))
order by 2,1,4,3

Reply With Quote
Reply

Viewing: Dev Shed ForumsDatabasesDatabase Management > Different results with an insert...


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway