SQL Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsDatabaseSQL Development

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 ASP Free Forums Sponsor:
  #1  
Old September 4th, 2004, 04:46 AM
fdtoo fdtoo is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Aug 2004
Posts: 3 fdtoo User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
SQL- Calculated Field

Q2


I need some expert to help me with this Access SQL Syntax as
there is an error message that says"At most one record can be returned by this subquery"
I think it means that only one result can be return on a subquery, but I need to display
individual ItemCode Qty that are > 30 days old from the Purchase_Date

my synatx are:

"Select distinct ItemCode,Purchase_Date, (SELECT Qty FROM Access_Table WHERE Purchase_Date <Now()-30 And Purchase_Date >Now()-60 AND ItemCode = Main.ItemCode) AS > 30DYS FROM Access_Table AS Main;"


My Query result should look something like this:

Purchase_Date ItemCode > 30 DYS | > 60 DYS | Total
01/06/2004 A100 0 | 15 | 15 |
02/07/2004 A100 20 | 0 | 20 |
12/06/2004 B100 0 | 10 | 10 |
--------------------------------
20 | 25 | 45 |
================================
can you help? Thanks
Fromebbie Mcnight
e-mail:dcartford@yahoo.ca

Reply With Quote
Reply

Viewing: ASP Free ForumsDatabaseSQL Development > SQL- Calculated Field


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 4 hosted by Hostway
Stay green...Green IT