Ask Your Question
0

Select in Datasource to retreive only one row [closed]

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

this post is marked as community wiki

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

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?

edit retag flag offensive reopen merge delete

Closed for the following reason question is not relevant or outdated by Alex Kemp
close date 2015-10-22 23:13:01.126910

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 gravatar imageJohnSUN ( 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

(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.

edit flag offensive delete link more

Question Tools

1 follower

Stats

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

Seen: 110 times

Last updated: Feb 22 '13