You searched for the word(s): Invalid Row-count
Thanks for your reply
The code field is unique and thus returns only one record.
The key point is the union of two tables. As mentioned above the subquery
( select name form CUSTOMERS ... ) works on each individual table ie dr_sales_jnl and
The version of the server is PSQL v12 - it was upgraded without me being aware ...
How many records does each of the individual queries return? I believe each one should only return one or you could get the error you are seeing. I ran a test query in v11 and did not get the error SELECT * FROM "Student" where ID = (SELECT top 1 student_id FROM "Billing");
If you see the error in PSQL v11.31 I would ...
How many records does the query below return:
FROM DBACOPY.BKICMSTR WHERE BKIC_PROD_CODE = SKU
WHERE BKICMSTR.BKIC_PROD_CODE = INV_LASTUSED.SKU
Each query should return only ...
I tried this against Demodata in v10.31, and it worked:
select * from "Class" where Max_Size = (select max(Max_Size) from Class)
We are not doing fixes on PSQL 9 anymore, so you can try the IN workaround - does that get you the correct result?
Are you getting the error "Invalid row-count in subquery"?
when i run the query below
select code, date0, amt,
( select name from CUSTOMERS as c where code = c.code ) as name
select sjdebtor as code, sjdate as date0, sjnett as amt
where sjdate >= '2012-01-01' and sjdate < '2014-01-01' and sjnett <> 0
I know this SQL doesn't make any sense, but I need to execute a similar one with the data we have. The one below works fine in MS SQL Server, but Pervasive returns:
''Invalid row-count in subquery.''
P.SQL should be smart enough to check for top 1. Is there a workaround to force this SQL to execute?
SELECT * FROM ''Student'' where ID =
What I am doing wrong here?
SET SKU_NAME = (SELECT BKIC_PROD_DESC
FROM DBACOPY.BKICMSTR WHERE BKIC_PROD_CODE = SKU)
SET INV_LASTUSED.SKU_NAME =
( SELECT BKICMSTR.BKIC_PROD_DESC
Can you provide the exact version of PSQL? The best way is to look in \Program Files\Pervasive Software\PSQL\Bin. Find w3odbcei.dll, right-click and select properties. Click on the version tab.
That was the problem. one of my tables had duplicate records. My update query if working fine now.
select distinct BKIC_PROD_CODE from BKICMSTR
group by BKIC_PROD_CODE
having count(BKIC_PROD_CODE ) > 1
order by BKIC_PROD_CODE
Thank you very much
What am I missing? I get 'Invalid row-count in sub query' when I run the following SQL statement:
select Month(hl1.DDate) MonthOfInvoice, Year(hl1.DDate) YearOfInvoice,
hl1.ItemCode, Sum(hl1.Qty) Quantity,
from "HistoryLines" hl2