merge fields into one field

giovi2002

Registered User.
Local time
Today, 10:19
Joined
Apr 12, 2005
Messages
83
I have a table and would like to merge all the fields into one text field of the table after the insert.
I'm using adp (access/sql server).

When using standard sql the null values give a problem and i don't want to use the if clause as it will give too much coding.
Example

fld 1 fld2 fld 3 mergefield
aaa bb <null> aaabb
aa <null> ee aaee
etc

when using select fld1+fld2+fld3 the null values cause whole rows to disappear. Anybody knows an easy workaround?
 
Oops think i found it.
Executed this in sql server query analyzer, this code could be entered in a stored procedure and the proc can be executed in access.

SET CONCAT_NULL_YIELDS_NULL OFF
select lijnnummer, send_key,convert(varchar(4),lijnnummer)+convert(varchar(4),send_key) As expr1 from aantal_dagen

First you see the two integers (lijnnummer, send)key) in the third column a varchar concatenation

1 1 11
1 1 11
2 1 21
1 1 11
1 1 11
3 NULL 3
4 NULL 4
5 NULL 5
6 NULL 6
7 NULL 7
 

Users who are viewing this thread

Back
Top Bottom