SunQuest
           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:
Stop making mediocre tutorials.The best tutorials are video! Camtasia Studio makes it easy to create engaging, buzz-building screen videos at any size, in any popular format. Download the free trial!
  #1  
Old June 14th, 2004, 03:59 PM
sbranly sbranly is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2004
Posts: 2 sbranly User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Why won't this Alias work???? Please help.

This is in MSQuery. I feel like a noob, but these aliases are giving me syntax errors. Any suggestions please?

Thank you,
Shane

SELECT strcustr.cust_code, strcustr.bus_name, strcustr.state, strcustr.sls_psn_code, Sum(zyosaled.amount) AS '$', SUM(zyosaled.tot_sf/1000) AS 'MSF', SUM(zyosaled.tot_wt/2000) AS 'Tons', SUM(zyosaled.amount-zyosaled.tot_dir_cst) AS 'C$'
FROM {oj informix.strcustr strcustr LEFT OUTER JOIN root.zyosaled zyosaled ON strcustr.cust_code = zyosaled.cust_code}
WHERE (zyosaled.inv_date Between {d '2004-05-01'} And {d '2004-05-31'}) AND (zyosaled.sales_type Like 'G')
GROUP BY strcustr.cust_code, strcustr.bus_name, strcustr.state, strcustr.sls_psn_code

Reply With Quote
  #2  
Old June 14th, 2004, 09:05 PM
brightlight brightlight is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2004
Posts: 371 brightlight User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 19 h 32 m 27 sec
Reputation Power: 5
Try giving alias without the quotes.
__________________
Regards,
Brightlight

Reply With Quote
  #3  
Old June 15th, 2004, 07:59 AM
sbranly sbranly is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2004
Posts: 2 sbranly User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
What I've tried

I've tried " ", ' ', { }, [ ], and nothing around my desired aliases. Always gives me syntax error.

:-(

Any other suggestions?

Reply With Quote
Reply

Viewing: Dev Shed ForumsDatabasesMS SQL Development > Why won't this Alias work???? Please help.


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