Yes...It would be great if SQLite had control-flow statements and variables just like Transact-SQL(MS/Sybase) as it would allow one to put all the data manipulation into one script and run it like a stored procedure... I do like the fine control that SQLite gives my application but I also think declarative programming is far more productive for most of my data manipulation tasks. Are there any pans to add any more SQL commands or at least implement the current SQL commands more fully such as CHECK, auto increment/identy, named parameters, etc..??? I do use as many of the sqlite_... "c" function in my .net managed code as needed but I am increasingly using more SQL to rapidly implement solutions by calling it as a script. Any custom function I implement in "c" but over 95% of my data manipulation problems are solved easily in SQL. SQLite Version 3.0 does not seem to implement any enhancements to the SQL language and I think that needs to be seriously looked at. But if version 3.0 is a foundation move to implement enhanced language functionality later, then this would be a good step forward...
-----Original Message----- From: Greg Obleshchuk [mailto:[EMAIL PROTECTED] Sent: Tuesday, April 13, 2004 7:20 PM To: Thomas, Basil; [EMAIL PROTECTED] Subject: Re: [sqlite] Adding SQL commands Hi Basil, The first use of IF is same syntax as the case statement so I don't think it is required and as IF isn't SQL92 I doubt it will be included so your command is replaced by case when (select count(*) from foo) = 100 then 'good' else 'bad' end I like the idea of exist but then again you can do this (in a query) count where (Select count(*) from foo where col1 ='a') = 1 but what I really think you are talking about is a command language like TSQL for Microsoft or P/SQL for Oracle (is it P/SQL what ever?) At the moment you can't do that type of thing is SQLite. I think the reason here is the it is a Database system that is included in your application and therefore you application can make these decisions far better that a SQL language Greg O Don't for get www.SQL-Scripts.Com <http://www.SQL-Scripts.Com> ----- Original Message ----- From: [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> To: [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> Sent: Wednesday, April 14, 2004 8:03 AM Subject: [sqlite] Adding SQL commands I would like to add some commands to SQLite to make my SQL(ite) programming life easier!!! The commands are: IF - e.g IF ((select count(*) from foo) = 100) select "good"; ELSE select "bad"; END EXISTS - e.g IF EXISTS(select * from sqlite_master where name = 'foo') DROP TABLE foo; END local variables - e.g. DECLARE @var TEXT; select @var = name from foo; I am not familiar with how compilers work but would be willing to write the "c" code to make these commands work. Does anyone have a simple way to add a command using the lemon parser??? I find the documentation hard to understand and I would like to add these command s using the c++ compiler from Visual Studio.Net B.Thomas ------------------------------------------------------------This e-mail may be privileged and/or confidential, and the sender does not waive any related rights and obligations. Any distribution, use or copying of this e-mail or the information it contains by other than an intended recipient is unauthorized. If you received this e-mail in error, please advise me (by return e-mail or otherwise) immediately. Ce courrier électronique est confidentiel et protégé. L'expéditeur ne renonce pas aux droits et obligations qui s'y rapportent. Toute diffusion, utilisation ou copie de ce message ou des renseignements qu'il contient par une personne autre que le (les) destinataire(s) désigné(s) est interdite. Si vous recevez ce courrier électronique par erreur, veuillez m'en aviser immédiatement, par retour de courrier électronique ou par un autre moyen. ============================================================ ------------------------------------------------------------This e-mail may be privileged and/or confidential, and the sender does not waive any related rights and obligations. Any distribution, use or copying of this e-mail or the information it contains by other than an intended recipient is unauthorized. If you received this e-mail in error, please advise me (by return e-mail or otherwise) immediately. Ce courrier électronique est confidentiel et protégé. L'expéditeur ne renonce pas aux droits et obligations qui s'y rapportent. Toute diffusion, utilisation ou copie de ce message ou des renseignements qu'il contient par une personne autre que le (les) destinataire(s) désigné(s) est interdite. Si vous recevez ce courrier électronique par erreur, veuillez m'en aviser immédiatement, par retour de courrier électronique ou par un autre moyen. ============================================================