Solved

SELECT and MULTYRECORD result

Posted on 2011-02-18
5
869 Views
Last Modified: 2012-06-21
Non-standards question :o)

I have data approx of this structure

record_id         var_01
==================
1                       Andy
2                       Alex
3                       Anny
.....

My task to select specific records and return Var_01
I need to return them as ONE record separated by ";" - something like

Andy;Alex;Anny;

Currently I use loop to get them separately and combine them on "client" side

The question - can I create query to return them in one record?
I cannot use stored procedures or functions (Access DB)
0
Comment
Question by:C_sharp_beaver
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
5 Comments
 
LVL 77

Accepted Solution

by:
peter57r earned 500 total points
ID: 34926220
"The question - can I create query to return them in one record?
I cannot use stored procedures or functions (Access DB) "

NO. Can't be done without a function.
0
 

Author Comment

by:C_sharp_beaver
ID: 34926426
Can you please concentrate deeper in your mind ?  :o)
My boss asking about single SELECT query
0
 
LVL 77

Expert Comment

by:peter57r
ID: 34927749
Still the same answer.  There is no feature in Access/JET SQl which will create a single field from multiple records.
Yes I know you can do it in other DBMSs but you can't do it in Access without using a VBA function.
0
 

Author Closing Comment

by:C_sharp_beaver
ID: 34928076
Unfortunatelly it's "no win" situation but it was important expert opinion to backup my personal position in this request
0
 
LVL 77

Expert Comment

by:peter57r
ID: 34928210
If you google for
Access concatenate records
you will find enough sample functions to convince anyone that you can't do it without one.
0

Featured Post

Revamp Your Training Process

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When it comes to protecting Oracle Database servers and systems, there are a ton of myths out there. Here are the most common.
Azure Functions is a solution for easily running small pieces of code, or "functions," in the cloud. This article shows how to create one of these functions to write directly to Azure Table Storage.
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…

738 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question