Select distinct problem

1. Member
Join Date
Dec 1969
Posts
64

## Select distinct problem

I use<BR><BR>SELECT distinct kat, kat2 <BR><BR>and result back is allmost correct. Problem is when kat2 have no value.<BR><BR>I need result like:<BR><BR><BR>Jane &#062; Nikol<BR>Jane &#062; Wood<BR>Jane &#062; Kidy<BR>John &#062;<BR>John &#062; Shilds<BR>Nicol &#062; <BR>Nicol &#062; Tree<BR><BR>And I have:<BR><BR>Jane &#062; Nikol<BR>Jane &#062; Wood<BR>Jane &#062; Kidy<BR>John &#062; Shilds<BR>Nicol &#062; Tree<BR>

2. Senior Member
Join Date
Dec 1969
Posts
415

## RE: Select distinct problem

try this:<BR><BR>Select distinct kat1, IsNull(kat2,&#039;&#039;) as &#039;kat2&#039;

3. Member
Join Date
Dec 1969
Posts
64

## RE: Select distinct problem

I was try, and result was:<BR><BR>Wrong number of arguments used with function in query expression &#039;IsNull(kat2,&#039;&#039;)&#039;. <BR><BR>Then I was try <BR>SELECT distinct kat, IsNull(kat2) as &#039;kat2&#039;<BR><BR>Then I have<BR>Item cannot be found in the collection corresponding to the requested name or ordinal. <BR><BR>He does not recognize rs("kat2")<BR><BR><BR>And If I try <BR><BR>SELECT distinct kat, IsNull(kat2) as kat2<BR><BR>I have something like<BR>forumi&#062; -1<BR>geo&#062; 0<BR>HiTech&#062; -1<BR>humor&#062; -1<BR>Internet&#062; -1<BR>Internet&#062; 0<BR>Internet magazin&#062; -1<BR>mediji&#062; -1<BR><BR><BR>I need something like:<BR><BR>geo&#062; <BR>geo&#062; gradovi<BR>geo&#062; regije<BR>geo&#062; vlade<BR>Internet&#062;<BR>Internet&#062; download<BR>Internet&#062; pretraga<BR>mediji&#062; agencije<BR>mediji&#062; dnevne novine<BR>

4. Member
Join Date
Dec 1969
Posts
45

## What database are you using?

I tried your example in Access 2000 and everything came out correct. Please inform of what database you are using?

5. Member
Join Date
Dec 1969
Posts
64

## RE: What database are you using?

Access 2000<BR><BR>It works now, I don&#039;t know whats happened : (<BR><BR><BR>Query is <BR><BR>SELECT distinct kat, kat2 FROM bookmark...

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•