SQL: SQL Exclusive Or

SQL
I have a table in the form: username | role ---------+------ name1 | internal name1 | admin name2 | internal name3 | admin name4 | ext...
1 year ago

SQL Query - Microsoft SQL

SQL
I have something like this: USERS (ID, name); SESSIONS (ID, userID, date) Now, I need to get all users which have at least 3 sessions and at least ...
1 year ago

merge 2 condition array from 2 query in 1

SQL
I just an amateur in script coding. I need help from somebody here.. I have a trouble here I was tried to show 2 condition merge from my code, look at...
1 year ago

VB.net SQL statement to query 1 yr old Timestamp

SQL
I want to display in my gridview all data whose timestamp is not older than 1 years from current date. My timestamp is formatted like so: 20110125-07...
1 year ago

SQL One to Many Condition Issue

SQL
I have two tables Table1 (Users) ID, NAME, COUNTRY 1, Joe Bloggs, 1 2, Joe Jnr, 1 3, Joe Snr, 2 Table2 (Orders) UsersID, ...
1 year ago

Get parent ID from two tables

SQL
I have two tables: @CATS and @NEWCATS declare @CATS table (_Group int, _Name nvarchar(50)) declare @NEWCATS table (_Name nvarchar(50)) insert into @...
1 year ago

mysql delete duplicate rows from table

SQL
i have the following table. I need to remove duplicate rows based on the zip column. id state zip 1 CA 112233 2 CA ...
1 year ago

Save in mysql from foreach

SQL
Hi friends sorry for my english. I have question how can I save links into mysql ?? I'm newbie in programming php. Thanks for all answer. <?php s...
1 year ago

Can't insert 9k words to mysql database

SQL
I am inserting data txt files to my MySQL DB. And files which have 100-400 words are inserting great. No problem with them. But today I got a file wit...
1 year ago

Php, MySql, single query with two counts

SQL
I need to perform two different counts in one single query. First Query: count number of transactions from today 30 days back. Second Query: count nu...
1 year ago

Call to a member function bind_param() on boolean

SQL
I am currently working through my code and trying to implement measures to protect from SQL injections. My other pages work fine however this page is ...
1 year ago

Solutions for INSERT OR UPDATE on SQL Server

SQL
Assume a table structure of MyTable(KEY, datafield1, datafield2...). Often I want to either update an existing record, or insert a new record if it d...
1 year ago

select random value based on probability chance

SQL
How do I select a random row from the database based on the probability chance assigned to each row. Example: Make Chance Value ALFA ROMEO 0...
1 year ago

Deleting entry with the highest value from a table

SQL
PLAYER (playerId, playerName) LEVEL (levelId, levelName) GAME (playerId, levelId, time) I want to delete the player having the highest time on leve...
1 year ago

How to fix mysql uppercase query in php and mysql

SQL
I am currently working on the website that uses ADODB library. In entire website all the queries are written in UPPERCASE. The problem is when I run ...
1 year ago

A join here seems unnecessary

SQL
TableA ------ id Name other_fields TableB ------ A_id (foreign key to TableA.id) other_fields Select entries from TableB which reference entries in...
1 year ago

making a solid basic database structure

SQL
So I'm new to database structure, and I am currently making an app. I wanted to run the structure by you guys to make sure this is the optimum way to ...
1 year ago

C# connecting to a database

SQL
I Am Trying to create a program using c# that needs to connect to a database running on a Solaris server, I am not too familiar with the server, we no...
1 year ago

If statement in select (ORACLE)

SQL
Hi I have simply select and works great: select 'CARAT Issue Open' issue_comment, i.issue_id, i.issue_status, i.issue_title, i.ISSUE_summary ,i.issue...
1 year ago

PDO UPDATE: Syntax error or access violation

SQL
I'm new in PDO, writing an update query: $sql = "UPDATE `users` SET(`uname` = :uname, `role` = :role, `fnam...
1 year ago