Ask Your Question
0

Select in Datasource to retreive only one row

asked 2012-08-15 07:18:24 +0200

this post is marked as community wiki

This post is a wiki. Anyone with karma >750 is welcome to improve it.

updated 2012-08-15 07:18:24 +0200

anonymous user

Anonymous

I have 2 collumns in a single calc spreadsheet. The first is a number code for a company (a primary key). The second, I must populate with the name of this company.

I also have one table with 2 fields into a MySQL, accessed thought jdbc by my Libreoffice.This table have 2 fields: company_id is the first one and it's a number, the primary key of the register. company_name, the second one, it's the name I must retreive to the calc spreadsheet.

How can I query the mysql db, using the first column of the spreadsheet to retreive the company_name to put at second column?

delete close flag offensive retag edit

Comments

1

Would you take the entire table from MySQL on a separate sheet in the workbook (just drag it with the mouse to a blank space), and then use a normal VLOOKUP() in the second column to find the correct value?

JohnSUN ( 2012-08-18 12:02:41 +0200 )edit

1 Answer

Sort by » oldest newest most voted
1

answered 2013-02-22 06:41:08 +0200

qubit gravatar image qubit flag of United States
5693 3 48 41

(Answer for resolution)

As @JohnSUN comments above:

[Why don't] you take the entire table from MySQL on a separate sheet in the workbook (just drag it with the mouse to a blank space), and then use a normal VLOOKUP() in the second column to find the correct value.

link delete flag offensive edit

Login/Signup to Answer

Donate

LibreOffice is made available by volunteers around the globe, backed by a charitable Foundation. Please support our efforts: Your donation helps us to deliver a better product!

Question tools

Follow
1 follower

subscribe to rss feed

Stats

Asked: 2012-08-15 07:18:24 +0200

Seen: 46 times

Last updated: Feb 22