[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 5439 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 200 days
Recommended Popular Threads Controvertial Threads
TPS Re-registration case still pending ..
TPS for Nepal likely to extend next week
Conservative discussions
सालीको चाक
TPS To F-1 COS
Embassy of Nepal might be able to help extend TPS for Nepal
I hope all the fake Nepali refugee get deported
Homeland Security revokes temporary status for 532,000 Cubans, Haitians, Nicaraguans and Venezuelans
Venezuela TPS lawuit
ChatSansar.com Naya Nepal Chat
Who is hottest nepali female?
TPS for Venezuela is terminated, only 60 days extension for transition period
TPS to F1 Status.
Nepal TPS has been Extended !!!
Got my F1 reinstatement approved within 3 months(was out of F1 for almost 2 years)
रबि लामिछानेको दाहिने हात ICE को हिरासतमा
ICE kidnapping people off the streets over op eds
#MAGA#FAFO is delicious
TPS of Nepal to be automatically extended for 6 months based on South Sudan decision
Nepal TPS decision
Who is hottest nepali female?
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