PowerBASIC Peer Support Forums
 

Go Back   PowerBASIC Peer Support Forums > Search Forums

Showing results 1 to 25 of 500
Search took 0.08 seconds.
Search: Posts Made By: Mike Doty
Forum: Programming Today, 04:16 AM
Replies: 179
Views: 3,364
Posted By Mike Doty
Sorting 2,000,000 100-byte records should take 7...

Sorting 2,000,000 100-byte records should take 7 or 8 seconds. but John found an error in ARRAY SORT with his test file.

Demonstrate time to sort any number of records

%Records = 2000000...
Forum: Programming Yesterday, 01:18 PM
Replies: 33
Views: 408
Posted By Mike Doty
Yes, that would work. I was reading VIEWs are...

Yes, that would work.
I was reading VIEWs are not stored procedures and cannot update, delete or insert, but they can cause a trigger.
This might help performance if the view is on the server side...
Forum: Programming Yesterday, 07:49 AM
Replies: 11
Views: 685
Posted By Mike Doty
Could this be done with a browser control? ...

Could this be done with a browser control?
http://www.powerbasic.com/support/pbforums/showthread.php?t=51208
Forum: Programming Jul 5th, 2015, 06:26 AM
Replies: 33
Views: 408
Posted By Mike Doty
How would you design using a trigger? I like...

How would you design using a trigger?
I like triggers, but when one doesn't work I find it a bit difficult to see what caused the error.

The logic below fires the trigger with each line item....
Forum: Programming Jul 3rd, 2015, 01:57 PM
Replies: 33
Views: 408
Posted By Mike Doty
Michael's suggestions should work with SQLite. ...

Michael's suggestions should work with SQLite.

Integer primary won't work because multiple rows is another discussion.
Here are some other ways to get the next highest invoice number.

drop...
Forum: Programming Jul 3rd, 2015, 11:48 AM
Replies: 33
Views: 408
Posted By Mike Doty
If the column was integer primary key...

If the column was integer primary key autoincrement would assure next highest number even after a vacuum:

drop table if exists t1;
create table t1(c1 integer primary key autoincrement);
insert...
Forum: Programming Jul 3rd, 2015, 05:50 AM
Replies: 33
Views: 408
Posted By Mike Doty
As I'm sure you are aware that Edwin has/is...

As I'm sure you are aware that Edwin has/is unfortunately quiting programming.
http://sites.nofeeshost.com/hellobasic/261/

Have you tried SQLitening? http://www.sqlitening.com
Forum: Programming Jul 3rd, 2015, 05:28 AM
Replies: 33
Views: 408
Posted By Mike Doty
Verify spaces are not saved using length function...

Verify spaces are not saved using length function

drop table if exists t1;
create table t1(c1 num);
insert into t1 values( 123 );
select length (c1) from t1;

3
With no Type specified
Forum: Programming Jul 3rd, 2015, 05:05 AM
Replies: 33
Views: 408
Posted By Mike Doty
Probably don't need to convert string to number...

Probably don't need to convert string to number using VAL and then convert back to string. TRIM$ should be enough?

MACRO sNum(MyString) = TRIM$(STR$(VAL(MyString)))
$comma = ","
FUNCTION PBMAIN...
Forum: Programming Jul 2nd, 2015, 02:40 PM
Replies: 33
Views: 408
Posted By Mike Doty
There is no error in SQLite. The conversion...

There is no error in SQLite.
The conversion from text to numeric works without single quotes and
also with datatypes INT, NUM, INTEGER, NUMBER.

drop table if exists t1;
create table t1(c1 num);...
Forum: Programming Jul 2nd, 2015, 01:15 PM
Replies: 33
Views: 408
Posted By Mike Doty
I've gotten INT NUM INTEGER NUMBER to work. Is...

I've gotten INT NUM INTEGER NUMBER to work.
Is there possibly a non-numeric character in the insert value?
A comma, dash, space ...
Forum: Programming Jul 2nd, 2015, 11:22 AM
Replies: 33
Views: 408
Posted By Mike Doty
Michael, You are correct. I went back and...

Michael,
You are correct.
I went back and redefined columns as NUMERIC and INTEGER
and it did produce the correct results when inserting using single quotes.

Karl,
Did you drop the table and...
Forum: Programming Jul 2nd, 2015, 11:16 AM
Replies: 33
Views: 408
Posted By Mike Doty
SQLite will favor a column defined NUMERIC,...

SQLite will favor a column defined NUMERIC, INTEGER or REAL, but will accept anything.
The input was single quoted.
https://www.sqlite.org/datatype3.html
Forum: Programming Jul 2nd, 2015, 09:54 AM
Replies: 33
Views: 408
Posted By Mike Doty
$SQ = single quote in PowerBASIC $DQ = double...

$SQ = single quote in PowerBASIC
$DQ = double quote in PowerBASIC

If this is the invoice number, get rid of the single quotes around the number.

"('" +Kunden_Nummer+"'

Insert into t1...
Forum: Programming Jul 2nd, 2015, 09:16 AM
Replies: 33
Views: 408
Posted By Mike Doty
explain query plan and sqlitening function executor

Without index:
drop table if exists t1;
create table t1(int,txt);
insert into t1 values(9,'9');
insert into t1 values(10,'10');
insert into t1 values(1001,'1001');
select max(int) from t1; --...
Forum: Programming Jul 2nd, 2015, 08:54 AM
Replies: 33
Views: 408
Posted By Mike Doty
As Knuth says. If you insert values enclosed...

As Knuth says.
If you insert values enclosed within $SQ the values will be compared as strings.
Be sure to not insert numeric values with $SQ or align strings like:

00010
00001
' 10'
...
Forum: Cafe PowerBASIC Jul 2nd, 2015, 08:40 AM
Replies: 15
Views: 2,372
Posted By Mike Doty
Anyone get SQLCiper to work. Recompiling...

Anyone get SQLCiper to work. Recompiling SQLite3 to get like precompiled version is not easy. I get init errors on exit.
The mention of sending $100 may no longer be an option.
See a $499...
Forum: Programming Jun 28th, 2015, 09:06 AM
Replies: 8
Views: 276
Posted By Mike Doty
I haven't worked with it, but keep coming across...

I haven't worked with it, but keep coming across this, too:
http://winlirc.sourceforge.net/
Forum: Programming Jun 24th, 2015, 07:02 PM
Replies: 179
Views: 3,364
Posted By Mike Doty
Also, Dim sArr(1 to 2000000) because element 0 is...

Also, Dim sArr(1 to 2000000) because element 0 is not used.
Forum: Programming Jun 24th, 2015, 04:05 PM
Replies: 179
Views: 3,364
Posted By Mike Doty
Sorry, I should have said Keith, How long does...

Sorry, I should have said Keith, How long does this take and is it 200,000,000 bytes.
Forum: Programming Jun 24th, 2015, 03:56 PM
Replies: 179
Views: 3,364
Posted By Mike Doty
Keith, How long does this take? Does...

Keith,
How long does this take?
Does newsortdupes.dat contain 200000000 bytes?

#DEBUG ERROR ON
FUNCTION PBMAIN () AS LONG 'sortnewsortdupes.bas
ON ERROR GOTO errortrap
LOCAL...
Forum: Programming Jun 23rd, 2015, 01:29 PM
Replies: 13
Views: 485
Posted By Mike Doty
How is this helpful and what is this 128-bit DOS...

How is this helpful and what is this 128-bit DOS stuff? I hope my post #10 was helpful.
Forum: Programming Jun 23rd, 2015, 11:27 AM
Replies: 179
Views: 3,364
Posted By Mike Doty
Instead of sorting 2,000,000 records has anyone...

Instead of sorting 2,000,000 records has anyone broken the file
into smaller files, sort each smaller file then merge on the end.
That is how commercial file sorts work.

Here is how Ethan...
Forum: Cafe PowerBASIC Jun 23rd, 2015, 10:49 AM
Replies: 14
Views: 656
Posted By Mike Doty
Opttech wouldn't be needed if only a one-time...

Opttech wouldn't be needed if only a one-time thing to create indexes.
This demonstrates reading a flat file into SQLite/SQLitening.

If OptTech was used the sort control statement would be...
Forum: Cafe PowerBASIC Jun 23rd, 2015, 10:28 AM
Replies: 14
Views: 656
Posted By Mike Doty
Michael, I demonstrated in another thread that...

Michael,
I demonstrated in another thread that OptTech can read, sort and rewrite a 200 megabyte file in about 2-seconds.
It could also create an index on that file using any delimited fields when...
Showing results 1 to 25 of 500

 
Forum Jump

All times are GMT -4. The time now is 09:11 AM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2015, Jelsoft Enterprises Ltd.
Copyright 1999-2011 PowerBASIC, Inc. All Rights Reserved.
Error in my_thread_global_end(): 1 threads didn't exit