[sqlite] Select Multiple rows in one row
Hi. I have two Tables with the follwing structure *EmpTable* Empid* * Empname 1* Raja * 2Kumar *DeptTable* DeptidDeptnameEmpid 101 * xxx* 1 102 *yyy*1 103*zzz*1 104bbb2 105ccc2 i need a Sqlite query to display the data in one row (concatenate the deptdetail rows in one row instead of 3 rows) EmpidEmpname DeptDetail 1Raja * xx - yy-zz* 2 Kumar bbb-ccc Thanks ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] Foreign key mismatch Error
Thank you all for your Reply.. I figured out the problem.. I added constraint for the Primary Key in Employee Table, then it got solved. I have missed to add constraint,, and it was the issue. On Wed, Sep 28, 2011 at 1:41 AM, Kees Nuyt k.n...@zonnet.nl wrote: On Tue, 27 Sep 2011 14:58:06 +0400, Madhan Kumar askmad...@gmail.com wrote: Hello.. In sqlite (version 3.7.7.1), I created two tables with foreign keys as shown below CREATE TABLE [*Employee*] ( [*EmpId*] INT NOT NULL, [EmpName] VARCHAR2(50)); CREATE TABLE [*Department*] ( [DeptID] INTEGER NOT NULL, [DeptName] VARCHAR2(20), [*EmpID*] INTEGER NOT NULL CONSTRAINT [FK_EMP_Dept] REFERENCES [Employee]([*EmpId*])); Using sqlite Expert Tool, I inserted a row in *Employee* Table - Success when i want to delete the same row from Employee table - gives error foreign key mismatch. When i try to insert a row in *Department* Table, gives error foreign key mismatch. I tried executing PRAGMA foreign_keys = ON and it returns 1 But still i am getting errors. Pls assist me to fix this issue. Thanks in advance. I think you have the reference the wrong way around. Employee should reference Department, the relation is n:1. The way you have it now, Department references employee, which means a department can only have one employee. -- ( Kees Nuyt ) c[_] ___ 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] Storing and Retreiving Image in Blob
Hello, Can you send me the code(C#-windows) for storing and retreiving an Jpg image in sqlite (blob). My retreive code works fine in oracle database, but not in sqlite db. It gives an error as shown below. Thanks byte[] byteData = new byte[0]; byteData = (byte[])(dsISO.Tables[0].Rows[0][ownerlogo]); MemoryStream ms = new MemoryStream(byteData); *System.Drawing.**Image img = System.Drawing.Image**.FromStream(ms); -- Error (Parameter is not valid)* pictureBox1.Image = img; Thanks ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
[sqlite] Foreign key mismatch Error
Hello.. In sqlite (version 3.7.7.1), I created two tables with foreign keys as shown below CREATE TABLE [*Employee*] ( [*EmpId*] INT NOT NULL, [EmpName] VARCHAR2(50)); CREATE TABLE [*Department*] ( [DeptID] INTEGER NOT NULL, [DeptName] VARCHAR2(20), [*EmpID*] INTEGER NOT NULL CONSTRAINT [FK_EMP_Dept] REFERENCES [Employee]([*EmpId*])); Using sqlite Expert Tool, I inserted a row in *Employee* Table - Success when i want to delete the same row from Employee table - gives error foreign key mismatch. When i try to insert a row in *Department* Table, gives error foreign key mismatch. I tried executing PRAGMA foreign_keys = ON and it returns 1 But still i am getting errors. Pls assist me to fix this issue. Thanks in advance. ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
[sqlite] Tool for database designer
Hi, I want to design the table structure and create scripts with a database designer Do we have any tool(Free or cost) for Sqlite to design the tables, similar like powerdesigner. Thanks ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
[sqlite] how to Add a Table in the existing Sqlite database at client machine
I, I am using C# windows application(.Net2010) with sqlite, Can you pls let me know, how to add or modify a new column/ table in the existing Sqlite database that is in my client desktop machine. I want the existing database to have its data(not disturbed), and only add a new table/column. Is there any way something like bat file - to execute and update the database file in client machine. or any other way to execute the scripts( like oracle updation of script) Waiting for your reply. Thanks ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users