Tag: database

Accessing SQL insert function doesn't work?

That is my access code: namespace DataBaseApp { class DB_Access { SqlConnection conn = new SqlConnection(); public DB_Access() { conn = DB_Connection.GetConnection(); // Bağlantıyı sağlamak için DB_Connection classından metodu aldım değere atadım // } public void add_student(string RegNo, string FName, string LName, string Phone) // Burada programdan veritabanina nasil veri eklenir // { if (conn.State.ToString() […]

Find the Points of Interest of a certain city

what I try to do, and have found a naive solution so far, is to get all the Points Of Interest of a certain city using APIs like Foursquare API and Google Places and insert them into an SQL server instance. My naive solution was to get the latitude and longitude of certain cities from […]

Computing a column based on comparisons of other columns in table

Ok I am working on a database table with 4 columns, lets say a first name, middle name, last name and a group id. I want to group people based on the fact that they have the same first and last names regardless of their middle name. I also want to, if a new entry […]

Fatal Error: Could Not find Driver

I am trying to connect to SQL Server using PHP PDO however it keeps giving me error. And, i already have file php_pdo_sqlsrv_53nts.dll in following directory xampp->php Fatal error: Uncaught exception ‘PDOException’ with message ‘could not find driver’ in C:\xampp\htdocs\config.php:35 Stack trace: #0 C:\xampp\htdocs\config.php(35): PDO->__construct(‘sqlsrv:server=C…’, ‘username…’, ‘pass’) #1 {main} thrown in C:\xampp\htdocs\config.php on line 35 […]

SSIS Package that removes or ignores multiple rows in flat file

I’m learning how to develop SSIS packages for ETL systems this week. One of my first objectives is to discover different ways to import flat files into a database. As this is pretty straight forward for the most part, I’ve been playing around with different flat files that contain a variety of data. One issue […]

Convert MySQL query to Microsoft SQL Server

I need to convert this MySQL query to a SQL Server query where the syntax ‘LIMIT ?, ?’ is my main main problem because isn’t compatible with SQL Server. At the same time I don’t know the meaning of the clause at the end SELECT FOUND_ROW(). I am beginner with databases so I would appreciate […]

How to return multiple rows in sql from same table

Pretty new here and could really use some help. I have a table with TimeID(pk), DateEntry(date), EntryTiem(time), ProjID(int), ProjName(varchar), Phone(bit), Research(bit), Notes(varchar), ProjActive(bit), TimeDateStamp(date). I’m trying to return multiple rows of data into each ProjName but am not having any luck. Here is what I’ve come up with so far… SELECT ProjName AS ‘Project Name’, […]

How to Synchronize SQLServer Database and MySQL Database

My Scenario: I have two applications. First one is a website which is connected to MySQL Database and 2nd one is a Desktop Application which is connected to SQL Server2008 R2 Database. The Desktop application updates records locally and the MySQL database is updated online though the website. Problem: Two different databases, how can we […]

i want to make conditional trigger in sql server…

i have a table named test and another table named trigg….. what i want is…. whenever data having ‘name’ as ‘rakesh’ is being inserted to test…it should fire a trigger to insert the age in the ‘trigg’ table…. i tried by my self…. chk it… create trigger trigger1 on test after insert as if((select name […]

Creating a superset in SQL Server

I have a query that returns a few columns and some information. I want to hardcode a list, and have each row returned each value from my list. So, currently my SELECT is returning, for example, ID Name Value 1 Mike 404 2 John 404 And lets say, for example, I wish to add a […]

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