Skip to content

Tag: sql

Is this possible to calculate this?

Is this possible to store the decimal type value in number column. 1/12 will be 0.083 and wants to store that in that column. create table test(number1 int,number2 int,number float) insert into test …

Split string value and use in INSERT and UPDATE command

I Implemented a small ERP system for our kitchen. The system is used to track our groceries, so it contains the goods (referred as food) with its name and UPC code. Over the time the names and upcs started to overlap and creating a data problem. In a first attempt we started to add the manufacturer into the n…

Ignore SQL INNER JOIN if specific record exist?

i got two table joined like this I want to display results of two table joined but with condition if the status of TableB has anything in (‘CO’,’CL’) the whole join with id of TableA would be ignored not just the rows with status not in (‘CO’,’CL’). A.id and A.T…

Pivoting a string from a table function in different columns

I have a task to create a table function that receives a string and sorts it into different columns. The string itself may vary, but the columns are supposed to be the same always. The string is: ‘100^TEst¬200^TEst2¬300^Test3’, but for example if I add “¬400^Test4” that should be in th…