(57,2,'false');sqlite INSERT INTO data
VALUES(57,9,'true')Now Pivot Query
---*SELECT id,
GROUP_CONCAT(countryid,state) AS 'state' FROM data GROUP BY id;*
--
View this message in context:
http://sqlite.1065341.n5.nabble.com/Howto-pivot-in-SQLite
Tom,
Stop and think about what you just suggested: The invoice would look
something like this:
|Qty | Desc | Price | Total
-++---+
+| 2 | 5x7 | 9.95 | 18.90
+| 1 | 5x7 | 9.95 | 18.90
+| 1 | 8x10 | 19.95 | 19.95
+| 2 | 16x20 | 49.00 | 98.00
+| 1 |
I have a invoice system where one invoice item can have one or more sum
items (images). Example is a CD... The invoice item is a CD, there are an
infinite numbers of images associated with that CD invoice item. So I have
the following:
CREATE TABLE Invoice_Item (
Invoice_Item_Id INTEGER
On 5 Jun 2011, at 5:47pm, Sam Carleton wrote:
In one select statement, I want to return a view of all the Invoice_Items
for a particular Invoice such that there is one column that contains all the
image names in one string:
Invoice_Item_Id | Invoice_Id | Description | Image Names
On Sun, Jun 5, 2011 at 1:04 PM, Simon Slavin slav...@bigfraud.org wrote:
Take a look at the group_concat() function:
http://www.sqlite.org/lang_aggfunc.html
That is PERFECT, thank you! If the person who thought of this function
originally is reading this, thank you!!! What a time saver!
On Sun, Jun 05, 2011 at 12:47:47PM -0400, Sam Carleton scratched on the wall:
In one select statement, I want to return a view of all the Invoice_Items
for a particular Invoice such that there is one column that contains all the
image names in one string:
Invoice_Item_Id | Invoice_Id |
On Sun, Jun 5, 2011 at 5:44 PM, Jay A. Kreibich j...@kreibi.ch wrote:
On Sun, Jun 05, 2011 at 12:47:47PM -0400, Sam Carleton scratched on the
wall:
In one select statement, I want to return a view of all the Invoice_Items
for a particular Invoice such that there is one column that contains
On 06/06/2011, at 8:30 AM, Sam Carleton scarle...@miltonstreet.com wrote:
allow the user to select the line and bring up a secondary dialog to manage
the list of images
You could simply execute a second select when the user asks for the set of
images for that invoice. It's simpler and more