mercredi 20 juillet 2016

Counting same data from several column values

i am using sql server 2014.

I have five columns for responses different question, however the different users can possible response the same for different questions.

Getting individual column counts I can do.But how can I get a total of same responses/values from the 5 columns.

Column A    Column B   Column C    Column D    Column E
x           x          y           z           aa
y           z          0           0           0
0           x          x           0           x
aa          bb         0           x           aa

etc

thanks

SQL Query , sorting out the data using column values, with conditions involved

I am new to Data analysis, and just starting out at my new job. The database is Oracle 11g and query tool i am using is SQL Developer. Any tips would be greatly appreciated. I have attached a link excel file as I couldn't make table here. I am having a hard time figuring out the logic for this one. Please have a look and Thank you in advance. enter image description here

SQL Export after 50 entries and then Delete the Table entries entirely

this is my first post. I have insert form using pdo, ajax and sql and I Want to after 100 entries export to csv in back up folder . And then purge the table of all information. I need help to understand how I can do this? I was thinking a trigger or event or maybe C# program to do this but i wanted opinions on all things security, functionality and different ideas to make this happen. I truly do appreciate any time spent considering my request. . . Thank you

How to remove all the non numeric characters from column in mysql in bulk data

I want to remove all the non numeric characters from the column. I have bulk data in my database.

Currently I am using method as describe in below link:

http://venerableagents.wordpress.com/2011/01/29/mysql-numeric-functions/

The problem is that its taking too much time for preocessing.

For 1 million of row current logic takes 1 hour to process the data.

please help me..

Thank You, Ronak

Mysql remote connections

I've an application on windows forms that needs to connect to a remote server with a static ip, however I already installed mysql on the server, provided the next command

     GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'password' WITH GRANT OPTION; FLUSH PRIVILEGES;

and also put an exception in Windows Firewall, but I'm still unable to connect, I don't know if there is something else to do!, I forgot to say it is a Windows Server 2012 R2

how mysql deal with different type convert when using where clause

for example there is a type varchar(50) named by cardNo in table "bankcard",and it has a record,value is 6228480329288486759 when i query it as follows

SELECT id,cardNo  FROM BANKCARD WHERE cardNo = 6228480329288486000

it will find the record "6228480329288486759"

however,use clause like this

SELECT id,cardNo  FROM BANKCARD WHERE cardNo = "6228480329288486000"

the result dose not exist

i wonder how mysql deal with the the different type,convert numeric type to varchar

How can I store a dictionary in an Azure SQL Database? (Swift)

I want to store a dictionary in a column in an Azure SQL Database. I've tried to store a dictionary by doing :

let item = ["text":["foo":"bar"]]
    let itemTable = client.tableWithName("TodoItem")
    itemTable.insert(item) {
        (insertedItem, error) in
        if (error != nil) {
            print("Error" + error!.description);
        } else {
            print("Item: " String(insertedItem!))
        }
    }

But when I query the database I get

Item: [Object object]

How can I store and query dictionaries in the database without the items changing?