Knowledge of initial inventory warehousing

Source: Internet
Author: User

Knowledge of initial inventory warehousing (KCRKD1,KCRKD2,LSPCSX)

Knowledge of initial inventory warehousing
Business aspects:
Do the initial inventory receipt, save. No bookkeeping. Affects only kcrkd1 and KCRKD2 tables
Inbound bill: Affects the LSPCSX table. (Make library use).
SELECT TOP 2 * from KCRKD2
SELECT TOP 2 * from LSPCSX
SELECT * from AAAAA
INSERT into LSPCSX (lspcsx_wlbh,lspcsx_pch) SELECT kcrkd2_wlbh,kcrkd2_pch from AAAAA

SELECT * into Lspcsxbak19 from LSPCSX
SELECT kcrkd2_wlbh,kcrkd2_pch to AAAAA from KCRKD2

SELECT * from LSPCSX
UPDATE lspcsx SET Lspcsx_sxrq=convert (VARCHAR (+20000), (CONVERT (NUMERIC,LSPCSX_RKRQ)))
, Lspcsx_fjrq=convert (VARCHAR), (CONVERT (NUMERIC,LSPCSX_RKRQ) +20000)) from LSPCSX

SELECT CONVERT (VARCHAR), (CONVERT (NUMERIC,LSPCSX_RKRQ) +20000)) from LSPCSX
UPDATE LSPCSX SET lspcsx_ysph=lspcsx_pch

=convert (VARCHAR (lspcsx_pch,8)) from LSPCSX

SELECT CONVERT (VARCHAR (), (left (lspcsx_pch,8))) from LSPCSX
---TRUNCATE TABLE lspcsx

SELECT * from Kcrkd2 GROUP by KCRKD2_WLBH,KCRKD2_PCH have COUNT (KCRKD2_WLBH) >0


SELECT * from Kcrkd2 WHERE kcrkd2_wlbh= ' 101030101 ' and kcrkd2_pch= ' 20050101 '

SELECT kcrkd2_wlbh,kcrkd2_pch, COUNT (*) from KCRKD2 GROUP by KCRKD2_WLBH,KCRKD2_PCH have COUNT (KCRKD2_WLBH) >1

SELECT *
From lc0079999. KCRKD2
WHERE (kcrkd2_wlbh = ' 101020201 ') and (kcrkd2_pch = ' 20071201 ')
SELECT * from LSPCSX

20051111-029

Select F_phonecode,f_text, COUNT (*) from sendsms where f_time= ' 2007-08-22 '
GROUP BY F_phonecode,f_text have Count (f_phonecode) >1

-----TRUNCATE TABLE LSPCSX

INSERT into LSPCSX (lspcsx_wlbh,lspcsx_pch) SELECT kcrkd2_wlbh,kcrkd2_pch from AAAA

SELECT * from KCRKD2 WHERE kcrkd2_pch= ' 20070701-040 '
SELECT * from Lspcsx WHERE lspcsx_pch in (' 20060803-035 ', ' 20071201 ')
SELECT * from Lspcsx WHERE lspcsx_wlbh in (' 101010201 ', ' 101040201 ')
SELECT * from Kcrkd2 WHERE kcrkd2_wlbh= ' 101020201 ' and kcrkd2_flbh= ' 0000000103 '
SELECT left (kcrkd2_pch,8) from Kcrkd2 WHERE len (kcrkd2_pch) >8
SELECT * into Kcrkd2bak from KCRKD2
UPDATE kcrkd2 SET kcrkd2_pch =
UPDATE kcrkd2 SET kcrkd2_pch = Left (kcrkd2_pch,8) + '-' + Right (kcrkd2_pch,3) WHERE len (kcrkd2_pch) >10
SELECT Left (kcrkd2_pch,8) + '-' + Right (kcrkd2_pch,3) from Kcrkd2 WHERE len (kcrkd2_pch) >10
SELECT * from Kcrkd2 WHERE kcrkd2_wlbh= ' 101040201 ' and kcrkd2_pch= ' 20060406-041 '
SELECT * from sysobjects WHERE name like '%wlzd% ' and xtype= ' u '
SELECT * from Lswlzd WHERE lswlzd_wlbh= ' 1010207 '
SELECT * from Kcrkd2 WHERE kcrkd2_





SELECT * from LSPCSX

SELECT * from Kcrkd2 WHERE kcrkd2_wlbh= ' 101020201 ' and kcrkd2_flbh= ' 0000000103 '

SELECT left (kcrkd2_pch,8) from Kcrkd2 WHERE len (kcrkd2_pch) >8

SELECT * into Kcrkd2bak from KCRKD2

UPDATE kcrkd2 SET kcrkd2_pch =

UPDATE kcrkd2 SET kcrkd2_pch = Left (kcrkd2_pch,8) + '-' + Right (kcrkd2_pch,3) WHERE len (kcrkd2_pch) >10

SELECT Left (kcrkd2_pch,8) + '-' + Right (kcrkd2_pch,3) from Kcrkd2 WHERE len (kcrkd2_pch) >10

Knowledge of initial inventory warehousing

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.