Welcome to the dBforums forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions, articles and access our other FREE features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload your own photos and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact contact support.

If you prefer not to see double-underlined words and corresponding ads, place your cursor
here for ContentLink opt out.

Go Back  dBforums > Database Server Software > Pervasive.SQL > Grouped view joins are not supported.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 10-03-07, 12:52
cablalock cablalock is offline
Registered User
 
Join Date: Oct 2007
Posts: 4
Grouped view joins are not supported.

Trying to select specific records from a view that is made from selections pointing to two other views.

Done this many times in MS SQL Database enviro... no joy in Pervasive...

Ideas besides building a separate view? (counter to my goal of one view serving many reports, etc...)
Reply With Quote
  #2 (permalink)  
Old 10-03-07, 13:06
mirtheil mirtheil is offline
Registered User
 
Join Date: Dec 2001
Posts: 813
WHat version of PSQL are you using?
Do you get an error message? If so, what?
__________________
Mirtheil Software
Certified Pervasive Developer
Certified Pervasive Technician
Custom Btrieve/VB development
http://www.mirtheil.com
I do not answer questions by email. Please post on the forum.
Reply With Quote
  #3 (permalink)  
Old 10-03-07, 13:28
cablalock cablalock is offline
Registered User
 
Join Date: Oct 2007
Posts: 4
Grouped View error

Thanks for the post...

Error is...
ODBC Error: SQLSTATE = S1000, Native error code = 0
Grouped view joins are not supported.

database version is 8.00.114
Reply With Quote
  #4 (permalink)  
Old 10-03-07, 13:31
cablalock cablalock is offline
Registered User
 
Join Date: Oct 2007
Posts: 4
Here's the syntax for the view i'm trying to pull select fields from... .

create view vv_tmt_open_so_lines as

SELECT DISTINCT
If(Month(ol.DATE_ITEM_PROM)<Month(Current_Date()) And Year(ol.DATE_ITEM_PROM)<=Year(Current_Date()),'01 - Previous Month',
If(Month(ol.DATE_ITEM_PROM)>Month(Current_Date()) And Year(ol.DATE_ITEM_PROM)<Year(Current_Date()),'01 - Previous Month',
If(Year(ol.DATE_ITEM_PROM)>Year(Current_Date()),'0 3 - Future Month',
If(Month(ol.DATE_ITEM_PROM)>Month(Current_Date()) And Year(ol.DATE_ITEM_PROM)=Year(Current_Date()),'03 - Future Month',
If(Month(ol.DATE_ITEM_PROM)=Month(Current_Date()) And Year(ol.DATE_ITEM_PROM)=Year(Current_Date()),'02 - Current Month',
'Undefined'))))) AS "Month",

ol.DATE_ITEM_PROM-Current_Date() AS "Days_Left",
ol.CUSTOMER AS "Customer",
ol.ORDER_NO AS "Order",
ol.RECORD_NO AS "Line",
ol.PART AS "Part",
ol.DESCRIPTION AS "Description",
ol.QTY_BO AS "Qty_BO",
ol.QTY_SHIPPED AS "Ship_TD",
oh.CUSTOMER_PO AS "Cust_PO",
oh.date_order as "Date_Enter",
ol.DATE_ITEM_PROM AS "Date_Prom",
DayName(ol.DATE_ITEM_PROM) as "Day_Prom",
(ol.price*ol.QTY_BO) AS "BO_Price_Ext"


FROM v_order_header oh, v_order_lines ol

where oh.ORDER_NO = ol.ORDER_NO
and ol.RECORD_TYPE ='L'
and oh.RECORD_TYPE ='A'
Reply With Quote
  #5 (permalink)  
Old 10-03-07, 15:38
mirtheil mirtheil is offline
Registered User
 
Join Date: Dec 2001
Posts: 813
I can't try it with your data but one of the new features in PSQL 9.5 is "Grouped View Support" (at http://www.pervasive.com/library/doc...html#wp122493).

PSQL 8.0 is very old. It's had 4 service releases and is currently at 8.7 (SP3). There's also been PSQL 9.0, 9.1, 9.5 and now 10.0. It might be time to upgrade to the current version.
__________________
Mirtheil Software
Certified Pervasive Developer
Certified Pervasive Technician
Custom Btrieve/VB development
http://www.mirtheil.com
I do not answer questions by email. Please post on the forum.
Reply With Quote
  #6 (permalink)  
Old 10-03-07, 15:44
cablalock cablalock is offline
Registered User
 
Join Date: Oct 2007
Posts: 4
Thanks - upgrade is in the plans...

thanks for the help.

feel like answering another one for me?
Reply With Quote
  #7 (permalink)  
Old 10-03-07, 15:48
mirtheil mirtheil is offline
Registered User
 
Join Date: Dec 2001
Posts: 813
Post up.. I'll try.
__________________
Mirtheil Software
Certified Pervasive Developer
Certified Pervasive Technician
Custom Btrieve/VB development
http://www.mirtheil.com
I do not answer questions by email. Please post on the forum.
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

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