Copying Inventory Items, or Importing into another instance

I am trying to import one list of inventory items into another instance of SambaPOS.

The issue being that the computers are not and cannot be linked. I was thinking along the lines of using SQL Management Studio and editing these in the tables section “Inventory Items”. Is my thinking wrong or would it be possible?

Thereafter this is both for V4 and V5. I personally try it out on V4 and then implement on V5.

Kind Regards
Theo

Are you sure that is the only table you would need to copy? If Your not concerned with recipes etc it should work.

1 Like

Yes, inventory creation takes the longest with setup, I found.

Restaurants use different recipes and combinations so much more personalised, also selling prices vary most of the time. Cutting out this basic but crucial step would save a lot of time.

As an update I found it possibe to copy the tables data as long as it doesn’t clash with a very simple script:

select * into “Database_Name_Destination”.dbo.InventoryItems from “Database_Name_From”.dbo.InventoryItems

I have not tested this yet but will keep you updated and add the entire process once tested and complete.

Further it should be possible to copy the other tables in theory. I think.

So it seems to be working just fine. I must myself state that it is probably not the best fix and that I haven’t tried it with V5 yet.
All of these steps are in completed using SQL Management Studio 2014, on Windows 10 OS.

  1. Change table name “InventoryItems” in Destination database to something else like “InventoryItems_Old”.
  2. Right click on Destination Database and select New Query.
  3. use the following script: select * into “Database_Name_Destination”.dbo.InventoryItems from “Database_Name_From”.dbo.InventoryItems
  4. Execute Script.
  5. Done.

Some notes:

  1. This was between one SambaPOS database and another, so that all of the columns align and what not.
  2. I suggest that a proper Inventory be used for this.
  3. I have not tested this for long.
  4. I cannot ensure that it would work for everybody or that it would be a good thing to do.

Here is the populated Inventory List.

And the near empty Product List which was already created before scripting.

!!IMPORTANT!! I have not put this through extensive testing

So after some testing it is not working.

Your not going between databases for different versions are you?

It not working probably had to do with renaming the default table why didn’t you just insert to the table?

Also what’s not working?

Different databases but not different versions of of SambaPos

So it is because of changing the name and creating a new Table. But simply inserting also does not work because of the ID column.

You can’t create a Recipe, which is the mistake I am stuck with. I could paste the error script if it would help you guys.

Will keep you updated.

Okay SO here is the final working product and Recipes are working. Will put it through some more testing at a later stage.
So it seems to be working just fine. I must myself state that it is probably not the best fix and that I haven’t tried it with V5 yet.
All of these steps are in completed using SQL Management Studio 2014, on Windows 10 OS.

  1. Right click on Destination Database and select New Query.

  2. use the following script:
    INSERT INTO SAMBAPOS4_Blank.dbo.InventoryItems
    (GroupCode, BaseUnit, TransactionUnit, TransactionUnitMultiplier, Warehouse, DefaultBaseUnitCost, DefaultTransactionUnitCost, Name)
    SELECT
    GroupCode, BaseUnit, TransactionUnit, TransactionUnitMultiplier, Warehouse, DefaultBaseUnitCost, DefaultTransactionUnitCost, Name
    FROM SambaPOS4_Ou_Dorp.dbo.InventoryItems

  3. Execute Script.

  4. Done.

Some notes:

  1. This was between one SambaPOS database and another, so that all of the columns align and what not.
  2. I suggest that a proper Inventory be used for this.
  3. I have not tested this for long.
  4. I cannot ensure that it would work for everybody or that it would be a good thing to do.

Here is the populated Inventory List.

And the near empty Product List which was already created before scripting.

And finally the Populated Recipe(two at least)

And a mixed recipe testing a few inventory Items

!!IMPORTANT!! I have not put this through extensive testing

The solution was to not import the ID Column into the existing Table, which bypassed the error I got by trying to insert the entire table.