[Kexi] Delete records from table (empty table)
John Jason Jordan
johnxj at comcast.net
Wed Feb 13 17:04:31 CET 2008
On Wed, 13 Feb 2008 11:17:13 +0100
Jarosław Staniek <js at iidea.pl> dijo:
> Jan Gromadzki said the following, On 2008-02-13 10:58:
> > On Tue, 12 Feb 2008 18:05:55 -0800
> > John Jason Jordan <johnxj at comcast.net> wrote:
> >> Kexi 1.1.3 (KOffice 1.6.3) (Using KDE 3.5.8) on Ubuntu Gutsy x86_64
> >> Back in the bad old MS Access days if I wanted to empty all records
> >> from a table I did so with a query. I have spent the past hour poking
> >> all over Kexi trying to figure out how to make a quick
> >> click-click-click way to empty a table of all records. Is it with a
> >> query? Do I have to learn SQL syntax to do so?
> > The simplest way to delete all the data from a table in Kexi 1.1.3 is
> > to save design of that table (after changing anything in it). This is
> > not a feature probably but only consequence of the early stage of the
> > project,
Someone else mentioned to use DROP TABLE and then recreate it. I'm
still figuring out Kexi so I was not aware that it could save the
design of a table even after it was deleted. That might be another way
to accomplish what I need.
> As I have mentioned there is even simpler and non-hacky command: "Edit->Clear
> Table Contents".
Thanks. This gets the job done. However, I need to delete the contents
of my table ("worktable") repeatedly. It would be faster and easier if
I could get the DELETE query to work. "DELETE from worktable;" and all
other variations of it that I have tried have failed. I used the
instructions on http://www.sqlite.org/lang.html.
Also, I can't find much about the query design window in the Handbook.
I am now trying to create a query that will select records from a source
table and insert them into worktable based on the values in a field in
the source table. I see Column, Table, Visible, Sorting, and Criteria,
but I can't figure out how to use the columns and rows to accomplish
what I want. Also, I keyed fields in the source table by dragging them
to the identical fields in worktable, but when I look at the SQL it
seems to be trying to select from worktable. Yet the arrows on the
lines between the two tables in the design window definitely point to
worktable. If I drag the other direction (arrows pointing to the source
table) I get the same results.
And finally, I can't figure out how to specify the criteria. There is a
field "4_susan" that contains "LQ1-xx" where xx is a two digit number
number. I want all and only the records from the source table where
"LQ1-" occurs in this field. This should be bonehead simple but i can't
figure out how to do it.
Is there a place where the use of the query design window is explained
in more detail?
More information about the Kexi