If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > Other > Progress database - column alias for OPENUERY

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 10-12-06, 17:09
smv929 smv929 is offline
Registered User
 
Join Date: Oct 2006
Posts: 1
Progress database - column alias for OPENUERY

I have a SQL Server linked server to progress database (version 9.1d) using merant 3.70 odbc drivers. I frequently use an OPENQUERY statement to query data and it works nicely. However, in order to do a sum/group by, you have to have sql server do it. In other words, you can't put the sum/group in the progress query, as shown below...

select *
from openquery(progressdb,
'select from-id, acct, acct-unit1, amt = sum(dom-amount)
from ledger
where trans-date between 9/03/2006 and 10/7/2006
and from-id = ''WC Dist''
group by from-id, acct, acct-unit1'
)

The odbc driver won't let you do this without a precision error. And sql server requires a column alias for the sum() function, but progress symtax won't allow an alias as sql will. Anyone know how to do this (what should be a) simple task?
Thanks
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On