Karen, exactly! I blush, it worked, it was as simple as that. Many thanks.

Bo Franzén


________________________________
Från: 'Karen Tellef' via RBASE-L <[email protected]>
Skickat: den 22 juni 2023 17:53:43
Till: [email protected]
Ämne: Re: [RBASE-L] - Second ORDER BY parameter?

Sorry Bo, I'm probably not understanding.  Are you asking if you can sort by 
two columns?  Like:  ORDER BY commodity ASC, tran_id ASC

Karen




-----Original Message-----
From: 'Bo Franzén' via RBASE-L <[email protected]>
To: R:BASE <[email protected]>
Sent: Thu, Jun 22, 2023 10:47 am
Subject: [RBASE-L] - Second ORDER BY parameter?

Dear R:BASE,

I have a coming printed volume with ca 8000 rows with Medieval Swedish 
commodity prices in (of course) R:BASE. The rows are originally in Swedish 
alphabetical order and every commodity are sorted in chronological order. All 
thanks to a unique key, tran_id, where the lower tran_id the older a price. My 
scholar colleagues in this long time-consuming project suddenly wanted the 
volume to be published in English, so I added columns for that translation. 
Only a few goods have the same name and spelling in Swedish and English and the 
publisher want an export i excel in English alphabetical order. Said and done, 
R>... ORDER BY commodity ASC.

To exemplify below with selected columns: almond comes in the beginning of my 
export in English. But when the data is being exported the chronological order 
is "forgotten". This is no cow on the ice, as we say in Sweden, because it can 
be fixed in excel by going through commodity after commodity. Just want to 
check if there is an SQL way of ORDER BY first and second?

I wish the whole R:BASE society A HAPPY MIDSUMMER!

Bo Franzén
Department of Economic History
Stockholm University



tran_id

year

vara

commodity

numeral

enhet

 price öre

39301

1470

mandel

almond

markpound

markpund

            0,66

39291

1468

mandel

almond

markpound

markpund

            0,66

39321

1473

mandel

almond

markpound

markpund

            1,00

39341

1503

mandel

almond

pound

pund

          20,00

39351

1511

mandel

almond

pound

skålpund

            2,66

39311

1472

mandel

almond

markpound

markpund

            1,33

39281

1465

mandel

almond

markpound

markpund

            1,33

39251

1463

mandel

almond

markpound

markpund

            2,66

39261

1463

mandel

almond

pound

pund

            8,00

39231

1328

mandel

almond

pound

skålpund

            0,60

39241

1462

mandel

almond

markpound

markpund

            0,83

39361

1513

mandel

almond

pound

skålpund

            1,00

39371

1515

mandel

almond

pound

pund

            2,33

39271

1464

mandel

almond

markpound

markpund

            1,00






--
For group guidelines, visit 
http://www.rbase.com/support/usersgroup_guidelines.php
---
You received this message because you are subscribed to the Google Groups 
"RBASE-L" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to 
[email protected]<mailto:[email protected]>.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rbase-l/38fed557dacc449390804213ebc16c44%40ekohist.su.se<https://groups.google.com/d/msgid/rbase-l/38fed557dacc449390804213ebc16c44%40ekohist.su.se?utm_medium=email&utm_source=footer>.

--
For group guidelines, visit 
http://www.rbase.com/support/usersgroup_guidelines.php
---
You received this message because you are subscribed to the Google Groups 
"RBASE-L" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to 
[email protected]<mailto:[email protected]>.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rbase-l/844702668.2792824.1687449223967%40mail.yahoo.com<https://groups.google.com/d/msgid/rbase-l/844702668.2792824.1687449223967%40mail.yahoo.com?utm_medium=email&utm_source=footer>.

-- 
For group guidelines, visit 
http://www.rbase.com/support/usersgroup_guidelines.php
--- 
You received this message because you are subscribed to the Google Groups 
"RBASE-L" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rbase-l/4a3b6f6a2a374264a594abc054fce30d%40ekohist.su.se.

Reply via email to