MS SQL Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsDatabasesMS SQL 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:
Get inside! Sample the range of functionality easily built with JMSL Library for Time Series Data Analysis, Heat Maps, Portfolio Optimization, Monte Carlo Simulation, Stock Price Charting and more. Download Now!
  #1  
Old August 26th, 2004, 07:40 AM
djavet djavet is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2004
Posts: 31 djavet User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 59 m
Reputation Power: 5
Question As in sub-select?

Hello,

Is is possible to have a " AS mynewname" in a sub-select ?
For me that's work not!

SELECT
count(ANZSUCHEN.ID) AS totalsuchen_perkanton,
ANZSUCHEN.KANTON,
(SELECT count(*) AS total FROM ANZSUCHEN)
FROM
ANZSUCHEN
GROUP BY
ANZSUCHEN.KANTON
ORDER BY
ANZSUCHEN.totalsuchen_perkanton DESC

Reply With Quote
  #2  
Old August 26th, 2004, 09:35 AM
swampBoogie swampBoogie is offline
Contributing User
Dev Shed Intermediate (1500 - 1999 posts)
 
Join Date: Jan 2003
Location: Paris Uppland
Posts: 1,766 swampBoogie User rank is Sergeant Major (2000 - 5000 Reputation Level)swampBoogie User rank is Sergeant Major (2000 - 5000 Reputation Level)swampBoogie User rank is Sergeant Major (2000 - 5000 Reputation Level)swampBoogie User rank is Sergeant Major (2000 - 5000 Reputation Level)swampBoogie User rank is Sergeant Major (2000 - 5000 Reputation Level)swampBoogie User rank is Sergeant Major (2000 - 5000 Reputation Level) 
Time spent in forums: 2 Weeks 4 Days 6 h 24 m 8 sec
Reputation Power: 37
Code:
SELECT
count(ANZSUCHEN.ID) AS totalsuchen_perkanton,
ANZSUCHEN.KANTON,
(SELECT count(*) FROM ANZSUCHEN) as total
FROM
ANZSUCHEN
GROUP BY
ANZSUCHEN.KANTON
ORDER BY
ANZSUCHEN.totalsuchen_perkanton DESC

Reply With Quote
  #3  
Old August 26th, 2004, 10:32 AM
djavet djavet is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2004
Posts: 31 djavet User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 59 m
Reputation Power: 5

Thx a lot!

Regards, Dominique

Reply With Quote
Reply

Viewing: Dev Shed ForumsDatabasesMS SQL Development > As in sub-select?


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