删除历史年度数据只保留091011三个年度(Delete historical year data only for 091011 or three years)
删除历史年度数据只保留091011三个年度(Delete historical year
data only for 091011 or three years)
Delete historical year data, only retain 091011, three annual.Txt, what is optimist? This...... Like a teapot, the bottom was burned red, and the mood whistled. Life is very simple, after today is tomorrow. It is not scientific to see a woman in one's life. Delete history annual data only 091011 three year.Txt14 enthusiasm is a great force, from inside out, inspire us to play the infinite wisdom and vitality; passion is a strong pillar, no matter how difficult the situation is, always gave birth to our optimistic spirit of perseverance and tenacity...... Without passion, there is no colour in the sky of life. Because of PMC calculation and other reasons, every day from the database 2-3 times or more.
The new software in the old factory account, retained years of data.
Objectives: prepare data only for 09, 10, 11, and for the remainder of the year,
If the test backup can be deleted and INSERT returns, they will be deleted.???????????
1, backup (database backup, new big backup (start the data backup before deleting, start to delete the backup after data))
2, delete what table content, as of the date
3 and ID???
The following data is used on the database of the lxz personal computer.
The data were kept until August 29, 2008.
First, use Enterprise Manager backup database to E:\ Li Xianzhong native data backup, the time is 20110105
The backup start time is 22:13
FAT32 file system, the maximum file can not exceed 4GB how to do?
Because the E disk is a FAT32 bit partition, the backup cannot succeed
What is the maximum supported file size for the NTFS partition?
2T should refer to the supported partition size, and 64G should be the size of the file
I want to change my D disk into NTFS format. How can I transfer it? Who can say the next process?
The two floor is very good, it looks a little cumbersome! In short: start ~ run ~ CMD ~ convert d:/fs:ntfs, remember that the conversion D disk storage file will not be lost, but this process is irreversible! I don't understand direct messages! Two hundred and forty-five million four hundred and thirty-eight thousand two hundred and twenty-five
Win 2000/XP comes with a small program that converts FAT or FAT32 partitions into NTFS partitions - Convert.exe, which is fast, easy to use, and that data on this partition can continue to be saved
In the start menu - run, enter "Convert C: /fs:ntfs"; if you want to convert the D disk, just change the "C:" to the "D:". When the conversion is complete, it will report to you the disk partition you have converted.
Matters needing attention:
1, it is recommended to first perform ScanDisk and defragment.
2, if you want to convert FAT or FAT32 partition on file is used in the conversion system, so that the conversion program will ask if you want to convert the unloaded volume (i.e., the best partition) select "no", then it will ask if you start the conversion partition in the next computer "yes," and restart the machine can complete the conversion.
E:\ Li Xianzhong native data backup directory, copy the database used by the test, and prepare backup database used by the test.
Two, the establishment of a data for ng0001bf
Backup each table of the operation from the ng0001 database to the ng0001bf database
Select * into, ng0001bf.dbo.ordermst, from, ng0001.dbo.ordermst
(the number of rows affected is 42467 lines)
Select count (*) from ng0001.dbo.ordermst
Select * from ordermst
Select, substring (sysno, 1,3), count (*), from, ng0001.dbo.ordermst, group, by, substring (sysno, 1,3)
P05 381
P06 14833
P07 18211
P08 9042
Ready to delete data for 05 and 06 years.
In
In
1 ordermst orderdet
Select, substring (sysno, 1,3), count (*), from, orderdet,
group, by, substring (sysno, 1,3)
Select * from ordermst
Where, sysno, like,'P05%'or, sysno, like,'P06%', or, sysno,
like,,'P07%'or, sysno, like,'P08%'
Delete from ordermst
Where, sysno, like,'P05%'or, sysno, like,'P06%', or, sysno,
like,,'P07%'or, sysno, like,'P08%'
Delete from orderdet
Where, sysno, like,'P05%'or, sysno, like,'P06%', or, sysno,
like,,'P07%'or, sysno, like,'P08%'
In
选择sysno从sendmst
在sysno喜欢Q05 %或sysno喜欢q06 %或sysno喜欢Q07 %或sysno
喜欢Q08 %
为了sysno
删除从sendmst
在sysno喜欢Q05 %或sysno喜欢q06 %或sysno喜欢Q07 %或sysno
喜欢Q08 %
删除从senddet
在sysno喜欢Q05 %或sysno喜欢q06 %或sysno喜欢Q07 %或sysno喜欢Q08 %
-----------------------------
选择sysno从sbackdet
在sysno喜欢S05 %或sysno喜欢S06 %或sysno喜欢或者喜欢S08 sysno SO7 % %
为了sysno
删除从sbackdet
在sysno喜欢S05 %或sysno喜欢S06 %或sysno喜欢或者喜欢S08 sysno SO7 % %
删除从sbackmst
在sysno喜欢S05 %或sysno喜欢S06 %或sysno喜欢或者喜欢S08 sysno SO7 % %
-----------------------------
删除从sbillmst
在sysno喜欢S05 %或sysno喜欢S06 %或sysno喜欢或者喜欢S08 sysno SO7 % %
删除从sbilldet
在sysno喜欢S05 %或sysno喜欢S06 %或sysno喜欢或者喜欢S08 sysno SO7 % %
选择sysno从sbillmst
在sysno喜欢Q05 %或sysno喜欢q06 %或sysno喜欢Q07 %或sysno喜欢Q08 %
删除从sbillmst
在sysno喜欢Q05 %或sysno喜欢q06 %或sysno喜欢Q07 %或sysno喜欢Q08 %
删除从sbilldet
在sysno喜欢Q05 %或sysno喜欢q06 %或sysno喜欢Q07 %或sysno喜欢Q08 %
-----------------------------
选择spurno从purmst
在spurno喜欢G05 %或spurno喜欢G06 %或spurno喜欢G07 %或spurno像08 %
删除从purmst
在spurno喜欢G05 %或spurno喜欢G06 %或spurno喜欢G07 %或spurno像08 %
删除从purdec
在spurno喜欢G05 %或spurno喜欢G06 %或spurno喜欢G07 %或spurno像08 %
-----------------------------
选择srtnno从rtnmst
在srtnno喜欢J05 %或srtnno像06 %或srtnno像07 %或srtnno像08 %
删除从rtnmst
在srtnno喜欢J05 %或srtnno像06 %或srtnno像07 %或srtnno像08 %
删除从rtndec
在srtnno喜欢J05 %或srtnno像06 %或srtnno像07 %或srtnno像08 %
-----------------------------
选择srecno从recmst
在srecno像205%或srecno像206%或207%或srecno srecno喜欢像“208%”
删除从recmst
在srecno像205%或srecno像206%或207%或srecno srecno喜欢像
“208%”
删除从recdet
在srecno像205%或srecno像206%或207%或srecno srecno喜欢像“208%”
-----------------------------
选择srcvno从rcvmst
在srcvno喜欢K05 %或srcvno喜欢K06 %或srcvno喜欢k07 %或srcvno像08 %
删除从rcvmst
在srcvno喜欢K05 %或srcvno喜欢K06 %或srcvno喜欢k07 %或srcvno像08 %
删除从rcvdet
在srcvno喜欢K05 %或srcvno喜欢K06 %或srcvno喜欢k07 %或srcvno像08 %
-----------------------------
从mps_mfg_ord选择顺序号
Where No ordno like '%' or ordno like '%' or ordno N06 N07 like
'%' Or 'like'% ordno n08
Order by ordno
Delete from MPS _ MFG _ Ord
Where No ordno like '%' or ordno like '%' or ordno N06 N07 like '%' Or 'like'% ordno n08
Select ordno from MPS _ MFG _ det
Where No ordno like '%' or ordno like '%' or ordno N06 N07 like '%' Or 'like'% ordno n08
Delete from MPS _ MFG _ det
Where No ordno like '%' or ordno like '%' or ordno N06 N07 like '%' Or 'like'% ordno n08
--------------------------
Select ordno from MPS _ allocation
Where No ordno like '%' or ordno like '%' or ordno N06 N07 like '%' Or 'like'% ordno n08
Delete from MPS _ allocation
Where No ordno like '%' or ordno like '%' or ordno N06 N07 like '%' Or 'like'% ordno n08
--------------------------
Select _ not req from MRP _ req _ det
Where req _ not like '%' or _ R05 req not like '%' or _ R06 req't like '%' or _ R07 req R08 not like '%'
Delete from MRP _ req _ det
Where req _ not like '%' or _ R05 req not like '%' or _ R06 req't like '%' or _ R07 req R08 not like '%'
--------------------------
Select sysno from MDM _ _ reqdtl proc
Where sysno u05 like '%' Or '%' or sysno like u06 U07 sysno like '%' Or 'like' sysno U08%
Delete from MDM _ _ reqdtl proc
Where sysno u05 like '%' Or '%' or sysno like u06 U07 sysno like '%' Or 'like' sysno U08%
Delete from MDM _ _ reqmst proc
Where sysno u05 like '%' Or '%' or sysno like u06 U07 sysno like '%' Or 'like' sysno U08%
--------------------------
Select bmordno from MPS _ back _ Makeup
Where bmordno like '%' Or 'bmordno like 2005 2006 2007 bmordno like'% 'Or' like '%%' or bmordno 2008
Delete from MPS _ back _ Makeup
Where bmordno like '%' Or 'bmordno like 2005 2006 2007 bmordno like'% 'Or' like '%%' or bmordno 2008
--------------------------
Billbody billhead
Select from billhead transid
Where transid like '05% transid' Or 'like' 06 or 07% transid like '%' Or 'like' 08% transid
Delete from billhead
Where transid like '05% transid' Or 'like' 06 or 07% transid like '%' Or 'like' 08% transid
Delete from billbody
Where transid like '05% transid' Or 'like' 06 or 07% transid like '%' Or 'like' 08% transid
清除日志
Dump transaction ng0003 with no _ log
再收缩日志文件大小
Delete from billbody
Where transid 'like' 07%
Delete from billbody
Where transid 'like' 08%
--------------------------
Invtory
Select from invtory uyear
Where uyear 2007 uyear = = '' Or '2008'
Delete from invtory
Where uyear 2007 uyear = = '' Or '2008'