On 22 Apr 2015, at 4:49pm, Manoj Kumar Pasumarthi <manojkumar.pa at hcl.com>
wrote:
> attach 'SP_R3.s3db' as sprdb;
>
> BEGIN TRANSACTION;
>
>
> CREATE view sprdb.[view1] as select model from sprdb.[windturbine];
>
> COMMIT;
>
> .exit
>
> After executing this script, DB is getting corrupted.
Please run
PRAGMA integrity_check;
on 'SP_R3.s3db' before you create the view to check that it is not already
corrupt.
Do the commands corrupt the script if you type them into the shell tool
manually instead of running them as a script ?
If so, please try this instead of your text:
ATTACH 'SP_R3.s3db' AS sprdb;
CREATE VIEW sprdb.view1 AS SELECT model FROM sprdb.windturbine;
and tell us whether that works.
Simon.