Re: [sqlite] Getting declared datatype of a column in C
-- 追求自由,崇尚简单~ -- Original -- From: "Jay A. Kreibich"; Date: 2010年7月7日(星期三) 下午4:41 To: "General Discussion of SQLite Database"; Subject: Re: [sqlite] Getting declared datatype of a column in C On Tue, Jul 06, 2010 at 11:27:09PM +0100, Andrew Wood scratched on the wall: > Ive been looking at the function > > sqlite3_column_decltype > > and am a little confused as to its use. > > How can I find out the declared type of a column. If you just want to know the declared type of a column you already know about, it use "PRAGMA table_info". http://www.sqlite.org/pragma.html -j -- Jay A. Kreibich < J A Y @ K R E I B I.C H > "Intelligence is like underwear: it is important that you have it, but showing it to the wrong people has the tendency to make them feel uncomfortable." -- Angela Johnson ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
[sqlite] Re: Purging the mailing list roles.
The real [EMAIL PROTECTED] wrote: >And yet somehow, the spammer still managed to get signed up >using a "paypal.com" address. How did they do that? Perhaps the spoofed an address that *is* subscribed to the list? -jonathan
[sqlite] Problems with v3.9.0: entry point sqlite3_finalize could not be located
Thanks. Works great! Thanks. From: Richard Hipp Sent: Wednesday, October 14, 2015 5:37 PM To: General Discussion of SQLite Database Subject: Re: [sqlite] Problems with v3.9.0: entry point sqlite3_finalize could not be located On 10/14/15, jose isaias cabrera wrote: > -Original Message- > From: Random Coder > Sent: Wednesday, October 14, 2015 2:17 PM > To: General Discussion of SQLite Database > Subject: Re: [sqlite] Problems with v3.9.0: entry point sqlite3_finalize > could not be located > > On Wed, Oct 14, 2015 at 9:55 AM, jose isaias cabrera > wrote: >> "The procedure entry point sqlite3_finalize could not be located in the >> dynamic link library SQLITE3.DLL." >> >> and the program aborts. I had to go back to v3.8.11.1 to make the >> program >> work again. Any thoughts? I thought that this had happened before and >> it >> was some compiler issue. Thoughts? > > There appears to be a problem with the officially provided DLL. It > only has sqlite3_json_init exported in the DLL. > ___ > > When can we expect a new DLL? It's on the website now. -- D. Richard Hipp drh at sqlite.org ___ sqlite-users mailing list sqlite-users at mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
[sqlite] Last time analyze was ran
Greetings! Is there a way to know when was the last time Analyze was ran on a database? My apologies if this was asked before, but I google a few searches to try to find the answer, but there were none that showed anything regarding the question. So, I thought to ask the gurus. Thanks. jos?
[sqlite] Last time analyze was ran
Just resending, as I didn't see a post for this one. Thanks. On Monday, April 11, 2016 12:20 PM, Jose I. Cabrera wrote: Greetings! Is there a way to know when was the last time Analyze was ran on a database? My apologies if this was asked before, but I google a few searches to try to find the answer, but there were none that showed anything regarding the question. So, I thought to ask the gurus. Thanks. jos?
[sqlite] Last time analyze was ran
Maybe this should be something to think about, and perhaps add it as part of the results or reported items of .schema. Also, only update the date if completion successful. The reason why it's important is that I have a script that runs every week, but lately, it appears as if it is failing, but the log files say it is running. However, the searches are getting slower and slower. It should not be too hard to add it as part of the .schema repor, **I think**. Thanks. On Monday, April 11, 2016 3:40 PM, Simon Slavin wrote: On 11 Apr 2016, at 8:32pm, Jose I. Cabrera wrote: > Just resending, as I didn't see a post for this one. Thanks. I don't think anyone can think of a way to do it. Therefore no responses. You could have your software make a note and store it in the database but SQLite doesn't note it itself. Simon. ___ sqlite-users mailing list sqlite-users at mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
[sqlite] 64bit DLL vs 32bit
Greetings! I have found that the Windows 32bit DLL works slower on a 64bit machine than on a 32bit. I would have thought that the calls from the applications would have the same response for both machines since the application is a 32 bit application. Anyone thinks otherwise? Thanks. jos?
[sqlite] v3.14.1 Speed is real
I just wanted to say thank you for the fixes on this version. It has speed up many of my updates. I have not really found how fast, but, I have notice the increase in speed on the system with the updates. Thanks. josé ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
[sqlite] Access Temp Tables/Views in background thread
Hi All, I have an application where I create a temp table/view in one thread. I then try to perform some operations in background and I don’t have access to those temp objects. I thought that those were process scoped. Is it possible to access temp tables/views from across threads? I am currently doing this in Objective-C and am using blocks to open a connection, perform operations, then close the connection in the background on a concurrent dispatch queue. Is there a better multi-threaded approach? Thanks, Carl ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
[sqlite] adding two tables together
imagine...create table t0 (a,b,c);insert into t0 values ('d','e','f');create table t1 (a,b,c,de,e,f);insert into t1 values ('a','b','c',(select * from t0));Error: table t1 has 6 columns but 4 values were supplied What I would like is to add t0 to t1 so that t1 now hasa|b|c|d|e|f What would be the command? thanks. ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] adding two tables together
Thanks, Igor. On Thursday, January 22, 2015 4:23 PM, Igor Tandetnik wrote: On 1/22/2015 4:05 PM, Jose I. Cabrera wrote: > imagine...create table t0 (a,b,c);insert into t0 values ('d','e','f');create >table t1 (a,b,c,de,e,f);insert into t1 values ('a','b','c',(select * from >t0));Error: table t1 has 6 columns but 4 values were supplied > What I would like is to add t0 to t1 so that t1 now hasa|b|c|d|e|f insert into t1 select 'a', 'b', 'c', * from t0; -- Igor Tandetnik ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
[sqlite] PRAGMA cache_size and ATTACHED DBs
Greetings! When connecting to a DB, and setting a PRAGMA cache_size, will the attached DB also respond/behave the same way/size set by the original connection? Thanks. jos?
[sqlite] PRAGMA cache_size and ATTACHED DBs
thanks. On 8/24/2015 1:34 PM, R.Smith wrote: > The cache size pragma dictates to (and affects) the connection, not > the DB. > > So yes. > > > On 2015-08-24 07:30 PM, jose i cabrera wrote: >> >> Greetings! >> >> When connecting to a DB, and setting a PRAGMA cache_size, will the >> attached DB also respond/behave the same way/size set by the original >> connection? >> >> Thanks. >> >> jos? >> ___ >> sqlite-users mailing list >> sqlite-users at mailinglists.sqlite.org >> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users > > ___ > sqlite-users mailing list > sqlite-users at mailinglists.sqlite.org > http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users > >
[sqlite] Trigger help or how to update id based on column content
Greetings! I have this table CREATE TABLE LSOpenJobs ( id integer primary key, ProjID integer, PSubClass, lang, ProjFund, RateType ); Imagine this set of records... 171421|132959|DOC-Trans|DE-DE|860.69|PER-WORD 171422|132959|DOC-Trans|ES-LA|624.96|PER-WORD 171423|132959|DOC-Trans|IT-IT|712.28|PER-WORD 171424|132959|DOC-Trans|PT-BR|738.91|PER-WORD 171425|132959|File-Proc|DE-DE|10.63|HOURS 171426|132959|File-Proc|ES-LA|10.63|HOURS 171427|132959|File-Proc|IT-IT|10.63|HOURS 171428|132959|File-Proc|PT-BR|10.63|HOURS 171429|132959|PM|DE-DE|116.86|10% 171430|132959|PM|ES-LA|96.91|10% 171431|132959|PM|IT-IT|102.02|10% 171432|132959|PM|PT-BR|119.55|10% 171433|132959|Trans-Create|DE-DE|297.28|HOURS 171434|132959|Trans-Create|ES-LA|333.52|HOURS 171435|132959|Trans-Create|IT-IT|297.28|HOURS 171436|132959|Trans-Create|PT-BR|445.92|HOURS 171437|132959|QuoteAppr|DE-DE ES-LA IT-IT PT-BR||HOURS 171438|132959|XTranslate|DE-DE ES-LA IT-IT PT-BR||HOURS 171439|132959|Delivery|DE-DE ES-LA IT-IT PT-BR||HOURS 171440|132959|Q-Notes|DE-DE ES-LA IT-IT PT-BR||Deliverable 171932|132959|Validation|DE-DE||PER-WORD 171933|132959|Validation|ES-LA||PER-WORD 171934|132959|Validation|IT-IT||PER-WORD 171935|132959|Validation|PT-BR||PER-WORD 172979|132959|TTX-Update|DE-DE|0.00|PER-WORD What I would like to do is to Update the ProjFund of all PM PSubClass automatically. I have a two step process, but I am wondering if there is a way to do this without the two steps or every time I update one of these records. these are my two steps: 1. SELECT RateType FROM LSOpenJobs WHERE ProjID=132959 AND PSubClass='PM' AND lang='DE-DE'; 2. Use the RateType, let's say it's 10%, to create a this update BEGIN; UPDATE LSOpenJobs SET ProjFund = ( SELECT round(sum(ProjFund) * 0.20,2) FROM LSOpenJobs WHERE ProjID = 132959 AND lang = 'DE-DE' AND PSubClass != 'PM' ) WHERE ProjID = 132959 AND lang = 'DE-DE' AND RateType = '10%' AND PSubClass = 'PM';COMMIT TRANSACTION; So, is there any way to kill this two-step process into one, or even better, create a trigger for PM that have "%" on the RateType? Any help would be greatly appreciated. Thanks. jos?
[sqlite] Trigger help or how to update id based on column content
On 2/18/2015 3:59 PM, Igor Tandetnik wrote: > On 2/18/2015 2:36 PM, Jose I. Cabrera wrote: >> these are my two steps: >> 1. SELECT RateType FROM LSOpenJobs WHERE ProjID=132959 AND >> PSubClass='PM' AND lang='DE-DE'; > > What is the point of this step? I don't see where and how the value > you obtain therefrom is required for step 2. I need to know what the percentage for this specific project ID, 132959, and language is going to be calculated. This may be different depending on the project. So, it may be 3%, 5%, 10%, 20%, 25%, etc. That is my problem, I don't know how to grab that without this step. > >> 2. Use the RateType, let's say it's 10%, to create a this update >> UPDATE LSOpenJobs SET ProjFund =... >> WHERE >>ProjID = 132959 AND lang = 'DE-DE' AND RateType = '10%' AND >> PSubClass = 'PM'; > > If (ProjID=132959 AND PSubClass='PM' AND lang='DE-DE') condition was > good enough to retrieve a unique RateType in step 1, then it should be > good enough to identify a unique record to update in step 2. Why do > you believe an extra condition of (RateType = '10%') is necessary? I have to change the 20% to .20 to create the UPDATE. Correct?
[sqlite] Trigger help or how to update id based on column content
On 2/18/2015 4:37 PM, Igor Tandetnik wrote: > On 2/18/2015 4:19 PM, jose i cabrera wrote: >> I need to know what the percentage for this specific project ID, 132959, >> and language is going to be calculated. This may be different depending >> on the project. So, it may be 3%, 5%, 10%, 20%, 25%, etc. That is my >> problem, I don't know how to grab that without this step. > > Where is this information coming from? How do you know that RateType = > '10%' corresponds to 0.20 multiplier? How is your hypothetical trigger > supposed to know that? Ok, maybe a little explanation is needed... The PM task may be calculated by a percentage, which is what I am trying to figure out with this set, or other by other rates like HOURLY, FIX Amounts, etc. The percentage calculation is based on all the tasks for the project of like "lang" excluding the PM task. So, let's use an example: The user chooses to calculate the DOC-Trans task for DE-DE and after reading a log with word counts and figuring the amount of cost for the DOC-Trans task, a final price for the task is set to 860.69. What should happen now is that the DE-DE PM task be updated by the descriptive value set in RateType, which on this instance is 10%, but maybe different in different projects or by different languages. So, now, just with this 860.69 value for DE-DE DOC-Trans, the PM value must be updated with the calculation of the percentage being help by RateType on 860.69. On this instance, again, is 10%. So, in reality, all the tasks of the project of like "lang" minus the PM, have to be added and 10% of that total be calculated to the (on this instance) DE-DE PM task. So, if there were only these two tasks in this project, the records would be, 171421|132959|DOC-Trans|DE-DE|860.69|PER-WORD 171429|132959|PM|DE-DE|86.07|10% I hope this helps.
[sqlite] Trigger help or how to update id based on column content
On 2/18/2015 6:48 PM, Igor Tandetnik wrote: > On 2/18/2015 5:10 PM, jose i cabrera wrote: >> So, in reality, all the tasks of the project of >> like "lang" minus the PM, have to be added and 10% of that total be >> calculated to the (on this instance) DE-DE PM task. > > UPDATE LSOpenJobs SET ProjFund = > ( >SELECT round(sum(t2.ProjFund) * cast(LSOpenJobs.RateType as > integer)/100.0 , 2) >FROM LSOpenJobs t2 >where LSOpenJobs.ProjID=t2.ProjID and LSOpenJobs.lang=t2.lang >and t2.PSubClass != 'PM' > ) > WHERE PSubClass = 'PM'; > > This updates all PM projects at once, in the whole table. To be more > selective, add conditions in the last WHERE clause to taste. If I ever meet you, I will buy you lunch. ;-) Thanks, man.
[sqlite] access to SQLite with OO
Hello all! Is it possible to access and work with SQLite databases with Open Office Base? Thanks
[sqlite] How can I deal with hexadecimal numerical value?
sqlite doesn't support 0xFF in SQL, such as: select 0xFF; insert into t values(0xFF); Error: unrecognized token: "0xFF" But sometime, this is not convenient. ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users