Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Concatenation Help - FAQ701-4233

Status
Not open for further replies.

flaviooooo

Programmer
Feb 24, 2003
496
0
0
FR
I am trying to use the FAQ701-4233 , but can't get it to work.

I have 3 tables:

STRUCTUUR1 : contains all structures

STRUCTUUR2 : contains all layers (LAAG) per structure

LAGEN: contains all layers, + an indication if the layer should be shown in the query.

To only filter the layers that are to be shown, I created a query Q_LAGEN_PER_STRUCT_STELROL. This contains:

STRUCTUUR, LAAG

I then try to create this query:

SELECT structuur, concatenate (select laag from Q_LAGEN_PER_STRUCT_STELROL where STRUCTUUR = " & [STRUCTUUR] & " ) AS STEL
FROM STRUCTUUR1

Unfortunately, I get the following error:

Data type mismatch in criteria expression.

When I change the query, so that it would only concatenate 1 structure, like this:
SELECT structuur, concatenate (select stelrollaag from Q_LAGEN_PER_STRUCT_STELROL where STRUCTUUR = 1001 ) AS STEL
FROM STRUCTUUR1;

I get:
At most one record can be returned by this subquery.

I have no idea what I'm doing wrong, maybe someone can help?

 
Oops, sorry. I have found the problem.

I had forgotten to put the concatenate- select in quotes

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top