MacChojnacki@googlemail.com
3/15/2007 2:14:00 PM
On 15 Mar, 15:01, "Uri Dimant" <u...@iscar.co.il> wrote:
> At the first glance you don't use ORDER BY clause, have you try it?
> Also why you are using TOP 100 PERCENT ? What does it give you?
>
> <MacChojna...@googlemail.com> wrote in message
>
> news:1173966901.837580.61880@y66g2000hsf.googlegroups.com...
>
>
>
> > Hello,
> > I stucked on strange problem with data order in dataset.
> > Any clue or suggests will be appreciated.
> > Let's start from the beggining. We have to tables:
>
> > Table1:
> > Import Nr
> > 18
> > 19
> > 20
> > 21
> > 22
> > 23
> > 24
> > 25
> > 26
> > 27
> > 28
> > 29
> > 32
> > 33
> > 34
>
> > Table2:
> > Import Nr
> > 20
> > 21
> > 23
> > 25
> > 26
> > 28
> > 29
> > 32
> > 34
> > 36
> > 37
> > 39
>
> > This is my result which doesn't statisfy me:
> > Import Nr ImportNr2
> > 18
> > 19
> > 20 20
> > 21 21
> > 22
> > 23 23
> > 24
> > 25 25
> > 26 26
> > 27
> > 28 28
> > 29 29
> > 33
> > 34 34
> > 32
> > 36
> > 39
> > 37
>
> > The Code:
> > SELECT TOP 100 PERCENT dbo.temp1.[Import Nr], dbo.temp2.[Import
> > Nr] AS Expr1
> > FROM dbo.temp1 FULL OUTER JOIN
> > dbo.temp2 ON dbo.temp1.[Import Nr] = dbo.temp2.
> > [Import Nr]
>
> > As you can see there are some problems with sorting in second column.
> > I would like to get the result like below:
> > Import Nr ImportNr2
> > 18
> > 19
> > 20 20
> > 21 21
> > 22
> > 23 23
> > 24
> > 25 25
> > 26 26
> > 27
> > 28 28
> > 29 29
> > 32
> > 33
> > 34 34
> > 36
> > 37
> > 39- Ukryj cytowany tekst -
>
> - Pokaz cytowany tekst -
Thanks Russel You're suggestion helped me!
I've tried ORDER BY , but not with ISNULL, and it doesn't work.
But when I used ISNULL it is all as i wanted.
So simple.
Uri Sorry for TOP 100 PERCENT , this is a remain from Sql server
2000 wich have add it and i haven't noticed it !
Thanks again for your help.