[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 4175 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 365 days
Recommended Popular Threads Controvertial Threads
शीर्षक जे पनि हुन सक्छ।
NRN card pros and cons?
TPS Re-registration case still pending ..
What are your first memories of when Nepal Television Began?
Anybody gotten the TPS EAD extension alert notice (i797) thing? online or via post?
TPS Re-registration
Democrats are so sure Trump will win
Basnet or Basnyat ??
TPS EAD auto extended to June 2025 or just TPS?
nrn citizenship
Toilet paper or water?
Sajha has turned into MAGATs nest
Nas and The Bokas: Coming to a Night Club near you
Mamta kafle bhatt is still missing
ढ्याउ गर्दा दसैँको खसी गनाउच
ChatSansar.com Naya Nepal Chat
whats wrong living with your parents ?
डीभी परेन भने खुसि हुनु होस् ! अमेरिकामाधेरै का श्रीमती अर्कैसँग पोइला गएका छन् !
3 most corrupt politicians in the world
अमेरिकामा बस्ने प्राय जस्तो नेपालीहरु सबै मध्यम बर्गीय अथवा माथि (higher than middle class)
Nas and The Bokas: Coming to a Night Club near you
Mr. Dipak Gyawali-ji Talk is Cheap. US sends $ 200 million to Nepal every year.
TPS Update : Jajarkot earthquake
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