[Show all top banners]

sukuti
Replies to this thread:

What people are reading
Subscribers
:: Subscribe
Back to: Kurakani General Refresh page to view new replies
 SQL HelpII
[VIEWED 4182 TIMES]
SAVE! for ease of future access.
Posted on 07-07-04 9:22 AM     Reply [Subscribe]
Login in to Rate this Post:     0       ?    
 

I am trying to display the result of more than two queries in one table. Is there anyway of doing it?


 
Posted on 07-07-04 10:11 AM     Reply [Subscribe]
Login in to Rate this Post:     0       ?    
 

You gotta be a little more specific that that.

Are you looking for something like:

"select item1, item2, item3 from table"

????

Who are the two queries?
 
Posted on 07-07-04 10:15 AM     Reply [Subscribe]
Login in to Rate this Post:     0       ?    
 

I really don't know what you really looking for Sukuti..but I am assuming that you want something like this:

(asp display)

Execute SQL1

Set it to RecordSet --- RS1

Similarly, Execute SQL2

Set it to RecordSet -- RS2

Now,

Loop RS1 to display...something like

With Response

.write ""
While RS1.EOF = False
.write ""
RS1.MoveNext ' move forward
Wend

' Now repeat the same process for RS2
While RS2.EOF = False
.write ""
RS2.MoveNext ' move forward
Wend

' finally close table
.write "
" & RS1("Value") & "
" & RS2("Value") & "
"
End With


OR.....

You can join those two tables and create a view....and treat it like a single talbe....

I hope it helped a little...



 
Posted on 07-07-04 10:47 AM     Reply [Subscribe]
Login in to Rate this Post:     0       ?    
 

I was trying to create a view.
I got it working now.

Thanks a lot guys...


select count(dns_name) as units_completed_today,
count(distinct store_number) as stores_completed_today,
(select count(distinct store_number) from asda.stores where scheduled_on = '2004-07-07') as stores_scheduled_today,
(select count(dns_name) from asda.dns_names where replaced ='Yes' and serviced = '2004-07-07') as units_replaced_today,
(select count(distinct store_number) from asda.dns_names where serviced is not NULL ) as total_stores_completed,
(select count(dns_name) from asda.dns_names where serviced is not NULL) as total_units_completed,
(select count(dns_name) from asda.dns_names where replaced = 'Yes') as total_units_replaced
from asda.dns_names
where serviced = '2004-07-07'
 
Posted on 07-07-04 10:57 AM     Reply [Subscribe]
Login in to Rate this Post:     0       ?    
 
 
Posted on 07-09-04 7:10 AM     Reply [Subscribe]
Login in to Rate this Post:     0       ?    
 

I have created a view for a report that shows the summary of events that took place on everyday basis. so I set the timestamp as now(). but what happened was, on my view now() converted into a fixed date (the date I wrote the view), and the summary is not showing the info about the current day, but it is still showing the info about the day i created the view.
how do i get it to where i am seeing the events that happened today, i mean on current day?
 


Please Log in! to be able to reply! If you don't have a login, please register here.

YOU CAN ALSO



IN ORDER TO POST!




Within last 90 days
Recommended Popular Threads Controvertial Threads
TPS Re-registration case still pending ..
Toilet paper or water?
and it begins - on Day 1 Trump will begin operations to deport millions of undocumented immigrants
Tourist Visa - Seeking Suggestions and Guidance
From Trump “I will revoke TPS, and deport them back to their country.”
advanced parole
Sajha Poll: Who is your favorite Nepali actress?
Mamta kafle bhatt is still missing
ढ्याउ गर्दा दसैँको खसी गनाउच
To Sajha admin
Problems of Nepalese students in US
अरुणिमाले दोस्रो पोई भेट्टाइछिन्
seriously, when applying for tech jobs in TPS, what you guys say when they ask if you have green card?
MAGA denaturalization proposal!!
Are Nepalese cheapstakes?
Nepali Psycho
How to Retrieve a Copy of Domestic Violence Complaint???
wanna be ruled by stupid or an Idiot ?
Travel Document for TPS (approved)
All the Qatar ailines from Nepal canceled to USA
NOTE: The opinions here represent the opinions of the individual posters, and not of Sajha.com. It is not possible for sajha.com to monitor all the postings, since sajha.com merely seeks to provide a cyber location for discussing ideas and concerns related to Nepal and the Nepalis. Please send an email to admin@sajha.com using a valid email address if you want any posting to be considered for deletion. Your request will be handled on a one to one basis. Sajha.com is a service please don't abuse it. - Thanks.

Sajha.com Privacy Policy

Like us in Facebook!

↑ Back to Top
free counters