Oracle Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsDatabasesOracle 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 Dev Shed Forums Sponsor:
  #1  
Old November 16th, 2004, 01:21 AM
h_hatzis h_hatzis is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2004
Posts: 2 h_hatzis User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Need help on Oracle Forms 6i

Dear all,

I have 2 tables:
-Table USER_ with columns ID, NAME and STATUS
-and table COMMAND with columns ID, TIMESTAMP and USER_ID.
I want to create a form that will count all commands of each user for a certain period of time. The form must have 2 fields (DATE1 and DATE2). The results (user name and number of commands) must be presented on a table in the form.
I created a Block (KOSTAS_BLOCK) based on a query "select u.name name, count(c.id) requests_served from user_ u, command c where u.id=c.user_id group by name"
Then I set a button and WHEN-BUTTON-PRESSED I tried to run
"SET_BLOCK_PROPERTY ('KOSTAS_BLOCK',
default_where,
'TIMESTAMP between ATE1 and ATE2');
go_block('kostas_block');
execute_query;"

When I try to run the form I get the error message that query cannot be executed.
Can anybody help me on that.
Thanks in advance

Reply With Quote
  #2  
Old November 17th, 2004, 12:34 AM
J@oracle J@oracle is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2004
Posts: 11 J@oracle User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Quote:
Originally Posted by h_hatzis
Dear all,

I have 2 tables:
-Table USER_ with columns ID, NAME and STATUS
-and table COMMAND with columns ID, TIMESTAMP and USER_ID.
I want to create a form that will count all commands of each user for a certain period of time. The form must have 2 fields (DATE1 and DATE2). The results (user name and number of commands) must be presented on a table in the form.
I created a Block (KOSTAS_BLOCK) based on a query "select u.name name, count(c.id) requests_served from user_ u, command c where u.id=c.user_id group by name"
Then I set a button and WHEN-BUTTON-PRESSED I tried to run
"SET_BLOCK_PROPERTY ('KOSTAS_BLOCK',
default_where,
'TIMESTAMP between ATE1 and ATE2');
go_block('kostas_block');
execute_query;"

When I try to run the form I get the error message that query cannot be executed.
Can anybody help me on that.
Thanks in advance

Add the timestamp condition in ur query.....
The date1 and date2 fields are actually the input fields on ur form as per my form(correct me if required_

Reply With Quote
  #3  
Old November 18th, 2004, 01:28 AM
h_hatzis h_hatzis is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2004
Posts: 2 h_hatzis User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Quote:
Originally Posted by J@oracle
Add the timestamp condition in ur query.....
The date1 and date2 fields are actually the input fields on ur form as per my form(correct me if required_



If I understood well your proposal, you want me to add the timestamp condition in the initial select query. The problem is that I cannot add the timestamp condition in the initial query, since I have the "group by" condition at the end of it.

Reply With Quote
  #4  
Old November 18th, 2004, 02:05 AM
J@oracle J@oracle is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2004
Posts: 11 J@oracle User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Quote:
Originally Posted by h_hatzis
If I understood well your proposal, you want me to add the timestamp condition in the initial select query. The problem is that I cannot add the timestamp condition in the initial query, since I have the "group by" condition at the end of it.


I want u to add this condition in the where clause//// so that should not be a prob

Reply With Quote
Reply

Viewing: Dev Shed ForumsDatabasesOracle Development > Need help on Oracle Forms 6i


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