I tried changing that line of the query just to try to get past it to this:
select RIGHT(C.barcode, 12),
C.description,
C.size,
SUM( U.stock_count) AS "TotalCount",
SUM( U.stock_count - C.inventory ) AS "Variance",
SUM(U.stock_count - C.inventory * C.cost ) AS...
Strange,
Copy/pasted the new syntax, same error, well almost the same, position is different this time.
SQL ERROR - [position 175, near '(' in ' SUM( (U.stock_count'] function label expected.
I am using Openbase, if that makes a difference.
Darron
Thanks for the reply.
I tried your query (copy / pasted) and got this error
SQL ERROR - [position 162, near '(' in ' SUM((U.stock_count '] function label expected.
I am a complete newbie at SQL, so I am unsure how to fix. It appears to me that there is a function label (TotalCount) so...
I have a query for an inventory catalog that looks like this.
select RIGHT(C.barcode, 12), C.description, C.size, (select sum(stock_count) from count_update where barcode = RIGHT(C.barcode, 12)) TotalCount, (select stock_count from count_update where barcode = RIGHT(C.barcode,12))-(select...
OK,
I think I got it!!
SELECT RIGHT(barcode,6), stock, location, (SELECT description FROM slow s where RIGHT(s.barcode,6) = RIGHT(l.barcode,6)) FROM last_count l WHERE RIGHT(l.barcode,6) IN (SELECT RIGHT(barcode,6) FROM slow)
Seems to work.
Thanks again for the help!!!
Couldn't have...
Thanks for the reply,
That is almost what I am needing, I think. Except, the description is in the other table (slow) - the last_count table does not contain the description.
I modified the query as follows;
(I am only using the right 6 numbers of the barcode because the "slow" table was...
Oops,
I listed the wrong query.
Here is the one that sorta works.
select RIGHT(S.barcode, 6), S.description, (select location from last_count where RIGHT(barcode,6) = RIGHT(S.barcode,6)) Location, (select stock from last_count where RIGHT(barcode,6) = RIGHT(S.barcode,6)) Count from slow s ;
I am having a hard time creating a simple query.
I have two tables. "last_count" which has the columns "barcode" "location", and "count"
and "slow" which has columns "barcode" and "description".
The basic idea, is that "last_count" contains an inventory count of my entire catalog with seperate...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.