Skip to content
Advertisement

Counting Rows Includes JSON by Id in Codeigniter

We have one groups table name as “groups” (There is mail groups) We have one person table name as “person” (There is persons who has in mail groups) We saved person in the “person” table with json_encode by group ID. Because a person can belong to more than one group. The problem is we can not get count rows of

How to insert value to a column as a result of geometry of another column in the same table

i have the database table posted below. the two columns geometryOfCellRepresentativeToTreatment and geometryOfCellRepresentativeToBuffer are of type geometry. and their value is equal the the geometry of the column fourCornersRepresentativeToTreatmentAsGeoJSON_ and fourCornersRepresentativeToBufferAsGeoJSON respectively. how can i insert the value into the latter columns as geometry of the former columns table: data_to_be_inserted: image Answer Just set the geojson strings to the geometry

Create view with one row for each column in a table

I have a table that looks like this: I need a view with 3 columns, that has a row for each column in the original table, so it would look like this: The values on the currency column in the view need to be created by me (the EUR, JPY, etc) and are fixed values; I need to get the

sql query to pl sql procedure

this is my requirement .i want fetch the record from one table and store it in another temporary table.i wrote as query.but dont know how to make it as procedure by declaring varibales and so. Daily new customers data will gets inserted in table.I only want to fetch the customer data who signed attribute_value as ‘TOY_GIFT’ from last 10 to

Select corresponding column based on columns

In MySQL, I try to select a corresponding value based on the greatest value between columns. Let’s take as example table ‘prices’: id supplier price1 quantity1 1 Microsoft 8,27 1000 1 Apple 10,25 2000 1 IBM 12,25 3000 2 Microsoft 9,45 2000 2 Apple 7,55 4000 2 IBM 6,78 6000 The result I intend to get is: id price_microsoft price_apple

Advertisement