|
Posted by Craig on December 27, 2007, 5:18 pm
Please log in for more thread options Are you sure serial numbers are taking up that much space? It seems to me
that serial numbers wouldn't take up that much room in the database. You
would probably be better off deleting old journals, that way you would
retain the sales info on all serial numbers. There has been a lot of
discussion about deleting journals to free up space. Search the NG and you
will get all the info you need.
Craig
> Hi Gill - first confirm your item id by typing your serial item
> itemlookupcode in XXX below (keep the single quotes)
> select id from item where itemlookupcode = 'XXX'
> -- confirm and jot down the id assigned to the item - let's say its ID
> is123
>
> The status field gets flagged with a "1" when the serial number has been
> sold - you could use this as a constraint in a where clause to only delete
> sold serial numbers -
>
> BACKUP THE DB FIRST then run
> delete from serial
> where itemid = 123
> -- this will delete ALL serial numbers associated with that item id
>
> Have all of the serial numbers been sold? or are some still available for
> sale that you want to keep active? - hope this helps....
>
> "Gill" wrote:
>
>> I need to delet hundereds of old sold serial number because I need to
>> shrink
>> my DB. Is there way I can get
>> script ? All the serials are under one item.
>>
>>
>>
>> --
>> Thank You
>> Harjit SherGill /DBA
>> Altaville Market
>> 324 South Main st po box 370
>> Altaville CA 95221
>> Tel : 209-729-1410
>> vendaliajat@yahoo.com
>>
>>
>>
|