Hi Paul,
   I got it sorted out I ended up with this using my SQLite Expert 
Professional (if it matters).

update tableB set column2 = (select column2 from tableA where 
tableA.rowid = tableB.rowid)

Of course I did not figure that out myself and asked for help on the 
forum of the software and got an answer within 30 minutes. :-)

Thanks,
schemer



On 3/7/2015 1:35 PM, Paul Sanderson wrote:
> Dave
>
> I'm not sure exactly what you are trying to do from your description -
> the schema of  the tables you have and those that you want may help.
>
> But as a general idea you might be able to use something along the lines of
>
> create table newtable as select x, y, z from oldtable
>
> More info here:
>
> https://www.sqlite.org/lang_createtable.html
> Paul
> www.sandersonforensics.com
> skype: r3scue193
> twitter: @sandersonforens
> Tel +44 (0)1326 572786
> http://sandersonforensics.com/forum/content.php?195-SQLite-Forensic-Toolkit
> -Forensic Toolkit for SQLite
> email from a work address for a fully functional demo licence
>
>
> On 7 March 2015 at 19:08, Dave <theschemer at cox.net> wrote:
>> Thanks Simon. If I can't figure that out I will just type all the data in
>> manually and learn from the school of hard knocks. :-) I googles it and it
>> seems that I am not the only one that has tried to do this and it seems like
>> it should be easy. I think in regular SQL it might be easier. Oh well, I had
>> my app data "hard coded" in the past and decided to use a database to make
>> it easier. I am sure it will be, once I get more experience.
>> schemer
>>
>>
>> On 3/7/2015 11:59 AM, Simon Slavin wrote:
>>> On 7 Mar 2015, at 4:42pm, Dave <theschemer at cox.net> wrote:
>>>
>>>> I am fairly new at this although I have wanted to learn and tried again
>>>> and again...But I have a problem. I created a database and probably did it
>>>> wrong and I am trying to fix it. I made a database with 7 tables in it all
>>>> with a primary key and a record ID that matches the primary key. Now when
>>>> trying to use the database I see that I should have made 1 table with all
>>>> the related data (I think) and am trying to copy one column of data at a
>>>> time to the "main" table. Can that be done and if so how?
>>> Without going into your situation in detail, I have a suggestion which may
>>> help you approach the problem another way.  The SQLite shell tool has a
>>> '.dump' command which turns a database into SQL commands, and a '.read'
>>> command which uses the commands to create schema and data in a new database.
>>>
>>> So dump the database into a text file.  Then you can use editing tools
>>> (usually global find-and-replace) mess with the text file so that all the
>>> inserting is done to the same table.  Then you can create your new database
>>> by reading the altered text file.
>>>
>>> Simon.
>>>

Reply via email to