SELECT
( SELECT SUM(aes.S2C_TTL) FROM dbo.AES_ES_2 AS aes )
+ ( SELECT SUM(aes.S2C_TTL) FROM dbo.AES_HS_2 AS aes )
AS TotalArtsSpending / (Select ENROLL_TT from AES_CONTACT_SCHOOL)AS PerPupilSpending
Im trying to take the sum of two fields and divide by another...
I need a count of all the AES_ES records without the nulls how can I do this?
SELECT dbo.AES_CONTACT_SCHOOL.SCHOOL_NAME, dbo.AES_ES_1.S1A1_D, dbo.AES_ES_1.S1A1_M, dbo.AES_ES_1.S1A1_T, dbo.AES_ES_1.S1A1_V
FROM dbo.AES_ES_1 CROSS JOIN
dbo.AES_CONTACT_SCHOOL
I am trying to select only the distinct monthyear from my table but I have to order it by eventdate DESC
SELECT DISTINCT TOP 100 PERCENT monthyear
FROM dbo.newsservices
ORDER BY eventdate DESC
But this what happens:
monthyear eventdate
May 2004 5/10/2004
April 2004 4/15/2004
March...
If I had a blog lets say in English.
What would be the best way to say create the same blog in spanish?
Is there a way to make the default English blog Spanish by copying it and simply changing the language?
Does this automatically convert English to Spanish say?
Thanks
Al
Hi I want to update my feild telephone1 to look like this
(XXX)-XXX-XXXX but the problem is some of the fields have two numbers like this
2126296602 2125631131
but most have just the one
2126296602
How could accomplish this?
Al
I want the order by for scrollercategories.id to be 2,3,1
How would I accomplish this?
SELECT TOP 200 dbo.scroller.id, dbo.scroller.srolltitle, dbo.scroller.scrolllink, dbo.scroller.scrollsource, dbo.scroller.eventdate, dbo.scroller.active,dbo.scrollercategories.scrollcategory...
I want to sort the result of this view, so that it sorts by eventdate first descending and where active = 1 then where active = 0 to follow
SELECT TOP 20 dbo.homepage.id, dbo.homepage.title, dbo.homepage.shortdescription, dbo.homepage.active, dbo.homepage.eventdate, dbo.homepage.image...
I want to create a select statement that will retrieve the id from a table the greatest number
select id from homepage
so if there are 7 records it will dispay simply the number 7 or better yet the number 8
I need to apply a javascript onChange event to a drop down list called 'child' so that when it changes it passes to a url = main.asp?id=<%=(Recordset1.Fields.Item("iddir_dir").Value)%>
I have 2 tables contact and quote, each ask someone if they want to recieve more info. I want to create a query that can query both contact and quote table for those you said 'Yes' to recieve more, and join the emails together in one new feild (distinct values if possible)sort ascending
SELECT...
Is it possible to do a find a replace say for example I want to change all Llc to LLC in my table garages in my field named garagename?
ex:Pine Water Garage Llc
Hi, how come I am getting the wrong subtotal in the following view? My results are underneith it
SELECT COALESCE (qty1, 0) * COALESCE (priceeach1, 0) AS dollars1, COALESCE (qty2, 0) * COALESCE (priceeach2, 0) AS dollars2, COALESCE (qty3, 0) * COALESCE (priceeach3, 0) AS dollars3, COALESCE...
How can I created a calculation in a column from the following. I am tryin to make a grandtotal column out of dollar1, dollar2, and dollar3 fields respectivly.
SELECT dbo.RFQ.id AS rfqid, dbo.Users.UserID, dbo.RFQ.dollars1, dbo.RFQ.dollars2, dbo.RFQ.dollars3, dbo.RFQ.dollars4...
I want to create a custom ID for my orders table so that it assigns a number like ORD00001 automatically.
As the next order is placed it will enter ORD00002 etc..
How can I accomplish this?
Al
Is it possible to have sort of a order by conditional statement for
SELECT result, BATHS_FULL, BATHS_PART, BDRMS, MLS_NUMBER, PRICE, SCHOOLS_D, SCHOOLS_E, SCHOOLS_H, SQFT, TAX, YEAR_BUILT, ZIP, TOTAL_APT_UNITS, STYLE, CITY, COUNTY, Expr1, Expr2
FROM dbo.v_mult
ORDER BY result ASC, PRICE DESC
I...
I am trying to sort by two feilds but it doesnt seem to work the way I want, I want it so sort by result ASC which is a calucation feild and Price DESC,
Also how do I edit the select statement so that when it selects results it changes any 0 value to a N/A, and ranks it higher in a sort...
Is it possible to also sort the results of my query by result ASC with the current Price DESC?
SELECT result, BATHS_FULL, BATHS_PART, BDRMS, MLS_NUMBER, PRICE, SCHOOLS_D, SCHOOLS_E, SCHOOLS_H, SQFT, TAX, YEAR_BUILT, ZIP, TOTAL_APT_UNITS, STYLE, CITY, COUNTY, Expr1, Expr2
FROM dbo.v_mult
ORDER...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.