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 wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Concatenating column into 1 field

Status
Not open for further replies.

flaviooooo

Programmer
Feb 24, 2003
496
FR
Hey,

I have the following situation, and have no idea how to solve this:

A table (actually a view, but let's call it table1) contains the following:

Mat Our Material Importdate
1 123 1/10/2007
1 124 1/10/2007
2 321 1/10/2007
3 456 1/10/2007
1 123 2/10/2007
1 124 2/10/2007
2 321 2/10/2007
3 456 2/10/2007

Now I would like to achieve the following, after I filter on the Importdate (via a combobox in my program, I select 1/10/2007)

1 123/124
2 321
3 456

As you see, the values linked to mat 1 are 'concatenated'

I can't find a way to do this in SQL and do it now in my MS Access frontend (with a loop that runs awfully long...)

Any help would be appreciated :)

Grtz
Fabian
 
You could search here in FAQ for concatenation functions. But I have one question: What will happen if you have 732 records for ONE Mat in the same DATE?
Your record will look like this:
Code:
1 123/124/125/125/126/127...............
  ......................................
  ................................../732
And don't tell me that would never happens :)

Borislav Borissov
VFP9 SP1, SQL Server 2000/2005.
Microsoft MVP VFP
 
That never happens ;)

It's about 3 or 4 records for 1 mat maximum

I'll check the FAQ for answers...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top