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
Solved

SELECT and MULTYRECORD result

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

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

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

As technology users and professionals, we’re always learning. Our universal interest in advancing our knowledge of the trade is unmatched by most industries. It’s a curiosity that makes sense, given the climate of change. Within that, there lies a…
When table data gets too large to manage or queries take too long to execute the solution is often to buy bigger hardware or assign more CPUs and memory resources to the machine to solve the problem. However, the best, cheapest and most effective so…
Learn how to number pages in an Access report over each group. Activate two pass printing by referencing the pages property: Add code to the Page Footers OnFormat event to capture the pages as there occur for each group. Use the pages property to …
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

828 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