Insert Data from 1 table to another 1(data exist already)
abhinavmehra
Member Posts: 34
Hello
I am Abhinav Mehra...
I have more confusion.....
I have 2 tables.
1) Branch Plant - Cutomized (Fields are -> Branch Plant Code,Distributor code,Default Branch Plant,Branch Plant, Company Name)
2) Location
In a branch plant Table already some data is there. I want to enter the data from Location table to Branch Plant Table but after the existing data. There is no any Line No. & Serial No....So how i can match...
Thanks In advance......Please Reply Soon....
If u help me to give the code so Please.....
I am Abhinav Mehra...
I have more confusion.....
I have 2 tables.
1) Branch Plant - Cutomized (Fields are -> Branch Plant Code,Distributor code,Default Branch Plant,Branch Plant, Company Name)
2) Location
In a branch plant Table already some data is there. I want to enter the data from Location table to Branch Plant Table but after the existing data. There is no any Line No. & Serial No....So how i can match...
Thanks In advance......Please Reply Soon....
If u help me to give the code so Please.....
0
Comments
-
What is the Primary key in Brach Planet table?0
-
Branch Plant Table :-
Primary Key are :- Branch plaant Code & Distributor code
Bcoz 1 Branch plant code has many distributors.....0 -
What is the relation between Location table and branch Planet table?
Which fields you want to fill from Location table to Branch Planet table?0 -
Exactly in my customize table(Branch Plant) there are define the branch plant code for every distributor as default. I have that data in my Branch plant table.....but i also need the branch plant code those are not define for any distributor.
So i want to show default branch plant for that distributor plus All branch plant those are in Location table.
I want to match this branch plant code to location's code field if its matched i dont need it otherwise i need those branch plant from location table to branch plant customized table...0 -
could you sketch an ERD? Because the relations are still not quite clear.0
-
ERP Diagram :-
[Location Table] [Branch Plant Table]
Fields: Fields:
1)CODE (IN1001,IN1003) 1)Branch Plant Code (IN1001,IN1002)
2)Branch Plant (Yes) 2)Distributor Code (ABC warehouse,Roodkie Warehouse)
3)Company Name 3)Default Branch Plant(Yes)
4)Branch Plant(Yes)
Primary Key: CODE Primary Key: Branch Plant Code & Distributor Code
I need
Form:
Branch Plant Code Distributor Code Default Branch Plant Branch Plant
IN1001 ABC WH Yes Yes
IN1002 ABC WH Yes Yes
IN1003 No yes
IN1004 No yes
IN1005 NO yes
I need this form format
where all branch plant code yes in Location Table & In Branch Plant Table Default yes & also Branch Plant yes
If Branch Plant Code set in Branch Plant Table then I don't i don't want to put in Branch Plant Table except this i need to show all branch Plant code in Location table in a from.
I hope this will help....
I have a problem to solve to how i can compare to Default & Branch Plant for distinct it..
Thanks in advance....
I wrote a code
Location.RESET;
Location.SETRANGE(Location."Branch Plant",TRUE);
IF Location.FINDFIRST THEN BEGIN
REPEAT
BranchPlantMapping.INIT;
BranchPlantMapping."Branch/Plant Code":= Location.Code;
BranchPlantMapping."State Code":=Location."State Code";
BranchPlantMapping."Branch/Plant":=Location."Branch Plant";
BranchPlantMapping.INSERT;
UNTIL Location.NEXT=0;
END;
Can u please help to modify it.....
Thanks0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 323 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions
