Problem with Excel with Query

  • Thread starter Thread starter Ashish Kanoongo
  • Start date Start date
A

Ashish Kanoongo

I have a table with following information

Code - c(6)
Name - c(20)
txnCode1 - c(3)
txnCode1Value n(12,2)
txnCode2 - c(3)
txnCode2Value n(12,2)
txnCode3 - c(3)
txnCode3Value n(12,2)


In txncode1, txncode2, txncode 3 field, value can be placed in any of these 3 field i.e "aa" can be exist in any of one in every record. Now my problem how do I present under one column for exg. 'aa' column.

I want to export in excel in following format

Code Name Txncode1 txncode2 txncode3
 
SELECT Table1.Code, Table1.Name, Table1.Txncode1 & "; " &
Table1.txncode2 & "; " & Table1.txncode3 AS aa
FROM Table1
WHERE (((Table1.Txncode1) Like "aa*") OR
((Table1.Txncode2) Like "aa*") OR ((Table1.Txncode3)
Like "aa*"));

-----Original Message-----
I have a table with following information

Code - c(6)
Name - c(20)
txnCode1 - c(3)
txnCode1Value n(12,2)
txnCode2 - c(3)
txnCode2Value n(12,2)
txnCode3 - c(3)
txnCode3Value n(12,2)


In txncode1, txncode2, txncode 3 field, value can be
placed in any of these 3 field i.e "aa" can be exist in
any of one in every record. Now my problem how do I
present under one column for exg. 'aa' column.
I want to export in excel in following format

Code Name Txncode1 txncode2 txncode3
---------------------------------------------------------- -------------------------
10/11/2003
 
Back
Top