Solved

SELECT and MULTYRECORD result

Posted on 2011-02-18
5
839 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
  • 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

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
MS Access 2016 Debugging 7 42
subtract 1 in Access 2003 query 7 36
Session that filled up my transaction logs 1 38
VBA MS Word "Table of Contents" extractor` 4 18
Overview: This article:       (a) explains one principle method to cross-reference invoice items in Quickbooks®       (b) explores the reasons one might need to cross-reference invoice items       (c) provides a sample process for creating a M…
This article explains all about SQL Server Piecemeal Restore with examples in step by step manner.
Familiarize people with the process of utilizing SQL Server stored procedures from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Micr…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

929 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now