Q:
how to copy table
A:
The WHILE clause causes the scope to be REST. COPY TO with no additional clauses will copy all the records. A FOR clause is also supported - this has a scope of ALL.
I'm assuming you just want to copy the structure and that you have the database and the original table repuk open. From the Console Lianja/VFP tab:
If you switch back to the Data Workspace, you should click Refresh from the Additional Commands under Tables|Table Names to refresh the list.Code:copy to repeu while .f.
Logical fields will be displayed as checkboxes automatically in edit mode. There is also the CheckListView gadget (demonstrated in the example_checklistview App) where you can have multiple checkboxes or a set of radio buttons depending on the 'Allow multiple selections' attribute.
Fields with the 'Choices' attribute set will be displayed as comboboxes allowing the defined choices to be selected.
Q:
I try to append the records of one cursor to another
A:
Code:open database southwind
use shippers
select 0
select * from shippers into cursor cursor2
insert into shippers select * from cursor2 // or from &(alias(2))
Q:
xxtable use again in 0 alias newAlias
the clause "again" does not work
A:
It depends if table already in use has the records you want, rather than just being a subset of the data. If it does, just select the workarea (this is demonstrated in lianjademo quickreport.rsp and in Library report.rsp). If not, use a virtual table.
... Alternatively, you've just run the report more than once without closing the table in between runs, so it does the equivalent of:
If the table wasn't already USED() and you don't need it afterwards, just issue a USE to close it.Code:use roster in 0 current
use roster in 0 current
Q:
do not work.. the Like is case sensitive..Code:select id, id,name from filterTable where id = 0 OR name Like("sfoggia*")
A:
Code:select ... where id = 0 OR lower(trim(name)) Like("sfoggia")
Q:
Can the console handle an sql query with multiple inner joins?
A:
It should be fine - just remember it needs to be a single line as you can't use the ; continuation in the Console.
Code:open database southwind
SELECT customers.customerid, customers.companyname, orders.customerid, orders.orderid, order_details.orderid, order_details.productid FROM customers INNER JOIN orders ON customers.customerid = orders.customerid, orders INNER JOIN order_details ON orders.orderid = order_details.orderid
Q:
Is it possible to move one table and it's records from one database to another?
A:
With the target database open, from the Console, you could do this:
Then just delete/drop the original sourceTable when you are ready.Code:select * from sourceDatabase!sourceTable into table targetTable
list of tables in a database" then atables() can be used to get the tables in a database or SELECT * FROM systables
When using parent / child related sections when you add new records to the child Lianja automatically inserts the parent key value into the child key.
in order to be able to do this the parent key can be a composite key i.e. an expression, but the child key has to be a single column which can contain the evaluated parent key expression.
So you need to create a foreign key column in the child table for that purpose.
Q:
How would I structure a page to show a list of searchable criteria that could be entered BEFORE the data is retreived?
A:
You need to build a custom query form as a custom canvas then have some buttons that do the retrieval and then change the datasource on a grid (assuming you want to populate a grid).
The onbeforeupdare delegate is called just prior to the record being saved when you click on the save icon or click on another row.
All topics in [Answers] alphabetically:http://www.lianja.com/community/show...ll=1#post12352