SQLitening Support Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

Welcome to the SQLitening support forums!

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Topics - Fim

Pages: [1] 2 3 4
1
You've got Questions? We've got Answers! / Can not start the server
« on: December 04, 2018, 12:35:54 PM »
All I've done is to change sqlite3.dll from versions 3.14 to 3.26. Then I get wrong. There is nothing in the log file.

2
You've got Questions? We've got Answers! / Using rowid zero
« on: November 19, 2018, 07:40:22 AM »
I have a database of just over 60 tables. The names are always 3 letters, such as ARB, ART, FAB. Now I intend to insert a table description in each table on rowid = 0.
Is it good or bad?
/Fim W.

3
You've got Questions? We've got Answers! / Finding min and max
« on: August 04, 2018, 06:19:00 AM »
Code: [Select]
MIN_MAX_START:
    TEMP_MIN = 100
    TEMP_MAX = -100

MIN_MAX_SELECT:
    SQL_SATS = "SELECT TEMP FROM TEMPERATUR WHERE DATE LIKE " + $SQ + 2017% +$SQ
    slSel(SQL_SATS)

MIN_MAX_READING:
    IF slGetRow = 0 THEN EXIT FUNCTION
    TEMP_=  VAL(slFN("TEMP" ))

MIN_OCH_MAX_LAGRING:
    TEMP_MAX = MAX(TEMP_MAX, TEMP)
    TEMP_MIN = MIN(TEMP_MIN, TEMP)
    GOTO MIN_MAX_READING

Is it possible to solve this in an SQL statement only?
/Fim

4
You've got Questions? We've got Answers! / UTF-16
« on: May 19, 2018, 06:53:43 AM »
How to put strings coded with UTF-16 in a SQLite databas using SQLItening?

This does not work:
Code: [Select]
DIM RAD_IN AS WSTRING
slExe(RAD_IN, "E2")
Parameter mismatches definition says the compiler.
/Fim W.

5
You've got Questions? We've got Answers! / Division with zero
« on: April 13, 2018, 11:45:44 AM »
SELECT BES_KVANT * PRIS / PRISKVANT FROM IRA

Works as i should, but...
For some records PRISKVANT  is zero.
In that case I will use 1 instead.
But how to put an if-statment in that SELECT-command?
Like  SELECT BES_KVANT * PRIS / (if PRISKVANT = 0 then 1 else PRISKVANT) FROM IRA
Pls, don't say RTM, i have tried.
/Fim

6
You've got Questions? We've got Answers! / Many Insert's
« on: March 05, 2018, 05:23:02 AM »
I have a conversion program, it reads a sequential file of about 4,000,000 records with 19 fields. For each record I make an INSERT in a table. It takes about 13 hours because compilation of each INSERT takes about 12 ms. Is there any way to use that function in slExeBind that tells SQLite3 to only compile the
SQL statement once and then insert each row re-using the compiled statement?

/Fim W.

7
Are there any differences between
CREATE TABLE HIS (AA PRIMARY KEY, BB, CC);

and

CREATE TABLE HIS (AA, BB, CC);
CREATE UNIQUE INDEX HIS_INDEX0 ON HIS (AA);

/Fim W.

8
I have a Item Master Table ITE with 100,000 items. I want all the items whose item name contains all the keywords. The number of keywords can be 1 to 5.     
Current solution is shown below (maybe something wrong in the translation from Swedish to English)
Is it possible to solve the selection in the server using LIKE or like() ?
Code: [Select]
STARTING:
    slSel "SELECT ITEM_NO, ITEM_NAMN FROM ITE ORDER BY ITEM_NO"

FETCH_NEXT_ITEM:
    IF slGetRow = %FALSE THEN GOTO ENDING
    ITE.ITEM_NO   = slF(01)
    ITE.ITEM_NAME = slF(02)
    ITEM_NAME = SHRINK$(ITEM_NAME)

SELECT_ITEM:
    IF INSTR(ITEM_NAME, KEYWORD1) = 0 THEN GOTO FETCH_NEXT_ITEM
    IF LEN(KEYWORD2) = 0 THEN GOTO SELECT_ITEM_END
    IF INSTR(ITEM_NAME, KEYWORD2) = 0 THEN GOTO FETCH_NEXT_ITEM
    IF LEN(KEYWORD2) = 0 THEN GOTO SELECT_ITEM_END
    IF INSTR(ITEM_NAME, KEYWORD2) = 0 THEN GOTO FETCH_NEXT_ITEM
    IF LEN(KEYWORD3) = 0 THEN GOTO SELECT_ITEM_END
    IF INSTR(ITEM_NAME, KEYWORD3) = 0 THEN GOTO FETCH_NEXT_ITEM
    IF LEN(KEYWORD4) = 0 THEN GOTO SELECT_ITEM_END
    IF INSTR(ITEM_NAME, KEYWORD4) = 0 THEN GOTO FETCH_NEXT_ITEM
    IF LEN(KEYWORD5) = 0 THEN GOTO SELECT_ITEM_END
    IF INSTR(ITEM_NAME, KEYWORD5) = 0 THEN GOTO FETCH_NEXT_ITEM
SELECT_ITEM_END:

    PRINT ITEM_NO, ITEM_NAMN
    GOTO FETCH_NEXT_ITEM   
   
ENDING:   
     
     
Example:
KEWORD1 = "FOR"
KEWORD2 = "SS"       

Item Names
1 CHASSI FOR SWITCH    <-- Hit
2 CHASSI-STOMME
3 FORMAT-BAND     
4 KASSERAD OMFORMARE   <-- Hit

/Fim W.

9
If a client does not call the server in x minutes, you will get an error -18 at the next call.
Is there any good way to stay connected?
/Fim W.

10
You've got Questions? We've got Answers! / UPDATE in a TRIGGER
« on: November 30, 2017, 11:45:27 AM »
This triggers does not work, what am I doing wrong?
Code: [Select]
CREATE TRIGGER ARB_TRIGG_05 UPDATE OF FK_KOST ON ARB FOR EACH ROW BEGIN UPDATE VOR SET FK_KOSTN_ARB_SUM = FK_KOSTN_ARB_SUM - OLD.FK_KOSTN + NEW.FK_KOSTN WHERE ORDERNR = NEW.ORDERNR; ENDI am making a change of FK_KOST in ARB and want change to update an overruled table VOR.
But FK_KOSTN_ARB_SUM in VOR does not update.

/Fim W.

11
You've got Questions? We've got Answers! / WHEN in a trigger
« on: November 30, 2017, 05:15:46 AM »
This works well:
Code: [Select]
CREATE TRIGGER ARB_TRIGG_01 INSERT ON ARB FOR EACH ROW BEGIN UPDATE VOR SET FK_KOSTN_ARB_SUM = FK_KOSTN_ARB_SUM + NEW.FK_KOSTN WHERE ORDERNR = NEW.ORDERNR; END
But not this:
Code: [Select]
CREATE TRIGGER ARB_TRIGG_01 INSERT ON ARB FOR EACH ROW WHEN OPKOD = 'LEGO' BEGIN UPDATE VOR SET FK_KOSTN_ARB_SUM = FK_KOSTN_ARB_SUM + NEW.FK_KOSTN WHERE ORDERNR = NEW.ORDERNR; ENDI do not understand what it's wrong.
Pls help
/Fim W.

12
I have two tables. One ART with all data (except inventory on hand) about all parts.
The other table is LPL with inventory on hand with one record for each part and each stock location.
Now I want a list, for each part where total inventory on hand for each part is less then the reorder point.
Is it possible to put these two SQL-statement into one statement?
SELECT PARTNO, SUM(QOH) AS QOH_SUM FROM LPL GROUP BY PARTNO
SELECT PARTNO, REORDEP, QOH_SUM FROM ART WHERE QOH_SUM < REORDP
As you see QOH_SUM a computed term and not a term in any table.

/Fim W.

13
You've got Questions? We've got Answers! / Two databases
« on: October 04, 2017, 07:29:34 AM »
Can I have two databases simultaneously on a server, such as "Winova.db3" and "Winova-test.db3" without doing anything special on the server? In my progarm, I open one or other database. I think right?

Fim W.

14
Is there any way to unlock a locked database from a client besides going to the server and stopping the service?
/Fim W.

15
You've got Questions? We've got Answers! / slSetRelNamedLocks
« on: June 17, 2017, 08:13:48 AM »
How to avoid slSetRelNamedLock displaying an error message?
I will only have a ReturnCode -11, no display.
Code: [Select]
    SlSetProcessMods ("E0")
    SVAR = slSetRelNamedLocks("+" + PA_NR_X)
    MSGBOX "SVAR=" + STR$(SVAR)

Pages: [1] 2 3 4