Tag: mysql

SQL query to group multiple groups

I’m parsing some IIS server logs (with LogParser) and I’m having a little trouble creating a query that will give me the aggregate count of each type of browser (user agent). Here is my query so far: SELECT COUNT(*) as totalHits, CS(User-Agent) as browser FROM E:\Logs\ex111101.log WHERE (CS(User-Agent) LIKE ‘%ipad%’ OR CS(User-Agent) LIKE ‘%iphone%’ OR […]

Sql AVG included but getting Column is invalid in the select list because it is not contained in either an aggregate function or the GROUP BY clause

I am very confused as to why I am getting this error: “Column ‘City.CityID’ is invalid in the select list because it is not contained in either an aggregate function or the GROUP BY clause.” I have two tables: one called City with city info, such as id, name, etc and another table containing the […]

Is GO Supported in MySQL?

I’m sorry for the question but I am terribly a newbie in using MySQL Database. I just want to know if GO in MS SQL is supported in MySQL. Thanks,

trying to get the money members from table

I have member table member_Id Last name first name postcode reference another table memberstomships member_Id membertomship_lastdate membertomship_paymentmethod column with values money member_id membershipstatusid membershipoptionid another table membershipstatustype table membershipstatusid memberstatustype_name another table membershiptype membershiptype_id membershiptype_name another table membershipoption membershiptype_id membershipoptionid I want to get the lastname and firstname and memberstatustype_name and membershiptype_name and membertomship_lastdate for […]

How to insert multiple selected row values from other table to new table

from one Query is it possible to do? To insert Multiple selected row information from one table to other table like: Customers (register_no,CustomerName, City, Country) Suppliers(register_no,SupplierName, City, Country) INSERT INTO Customers (register_no,CustomerName, City, Country) SELECT register_no SupplierName, City, Country FROM Suppliers where register_no=10; But in one time is it possible to select register_no=1,register_no=3,register_no=10; in one […]

Is .sql file different for MySQL and SQL?

I have a .sql file and I want to load it into MySQL database. I don’t know from which database (MySQL or MS-SQL) it was created. Now, I am trying to import that file into MySQL database. It is showing errors while importing and executing that file. Q1. So, my question is whether the .sql […]

what is good, explicite cursor in backend or loop in front end?

what is good,using explicite cursor,while loop on database side OR using loop on front end (application side programm)??? Edited:- Hi,if I want to iterate and i am using ado.net asynchronous(disconnected) connection (ie.I have a datatable and i am applying for loop on datatable in front end) — In this case,If i want to iterate which […]

two basic questions about MySQL

I am a developer previously working on SQL Server and Windows platform. I am learning MySQL on Windows platform. I have two basic questions which does not find definite answer yet, Does MySQL support T-SQL to write store procedure? If not, are there similar technologies to T-SQL in MySQL world (I am referring to stable/mature […]

OR LIKE sql query boolean error

I’m trying to search an employee record but i’m getting this error message: An expression of non-boolean type specified in a context where a condition is expected, near ‘OR’. This is the code I’m using: sConn = new SqlConnection(sStr); daEmp2 = new SqlDataAdapter(” SELECT employee.*, department.Department FROM tblEmployee employee INNER JOIN tblDepartment department ON employee.DeptID=department.DeptID […]

Choosing a Platform C#/MsSql or Php/Mysql or JSP or what?

It seems like there are an inordinate number of really intelligent people here, so I thought it was the best place to ask a couple involved questions (shameless flattery). Your feedback on any item would be so appreciated. I am about to develop a very large web based operations, inventory, sales management system. I had […]

MS SQL Server is a Microsoft SQL Database product, include sql server standard, sql server management studio, sql server express and so on.