Skip to content
Advertisement

Tag: mysql

SQL calculating time between assignments

I have to write an SQL statement which contain a field that contain two different values consecutively but in the way I have wrote it, it return always null because it is interpreted as having the two value in the same time! My conditions should be : (ci.field = ‘Group’ and ci.oldString = ‘Triage’ ) and (ci.field=’assignee’ and ci.newString is

Storing IPv6 Addresses in MySQL

As has been requested in “ipv6-capable inet_aton and inet_ntoa functions needed”, there is currently no MySQL function for storing IPv6 addresses. What would be the recommended data type/function for …

MySQL – specific columns on join?

When making a join (inner, left outer, right outer or whatever), how can I specify which columns on the table to join into the original table? Consider the following example: This would select FirstName from user, but select everything from Provider. How can I specify which parts of Provider should be included in the resultset? Answer This will only include

How to write query for this?

Hi friends I have a table like this ID bid sub_bid cid sub_cid 1 0 2 1 0 2 5 0 3 0 3 3 0 0 4 4 2 0 4 0 on that table either (bid or sub_bid) OR (cid or sub_cid) will be null. I have to write a query for fetching like this.. if bid is

How to write condition wise result providing query?

I want to write a MySQL query that gives a condition wise result. For example. I have a table with question, answer value, user chose value fields. User can attend to answer that question many times. qid rightanz wronganz 11 4 2 11 4 4 11 4 1 25 1 1 I want out put like this qid rightanz wronganz

Advertisement