2,403 Solved Topics

Remove Filter
Member Avatar for
Member Avatar for Danny_3

I have a database with a table, jobs and i have written this query to get information from this table. But i am getting no results with this data and i have no idea why? SELECT startDateTime, endDateTime FROM jobs WHERE startDateTime BETWEEN '19/11/2013' AND '20/11/2013' Database Structure: 1 jobId …

Member Avatar for Danny_3
0
180
Member Avatar for sagisgirl

Hi guys, I have a table called "goodsbalance" qtyBalanceID | k8goodsID | goodsIn | goodsOut | qtyBalance ---------------------------------------------------------------------------- Can I do some calculation like this? $query_recgoodsbalance = "SELECT * FROM goodsbalance"; $rs_recgoodsbalance = mysql_query($query_recgoodsbalance); $rec_goodsbalance = mysql_num_rows($rs_recgoodsbalance); while (($reck9goodsout = mysql_fetch_array($rs_recgoodsbalance) )!= false) { $query_UgoodsOut = $rec_goodsbalance['goodsOut'] - $_POST['k9goodsQty']; $rs_UgoodsOut …

Databases mysql
Member Avatar for sagisgirl
0
147
Member Avatar for venkyb47

We have ERP application that store the data to ORACLE database and also we have a lot of another web applications that use the ERP database. We got the performance issues when ERP and another application use the same database. We are planning to do mirroring of oracle database into …

Databases mysql oracle
Member Avatar for venkyb47
0
602
Member Avatar for joshmac

I am trying to copy data from one database table to another. Below is the MySQL syntax I am working with: $array = []; $q1 = DB::inst()->select( "stu_term" ); foreach($q1 as $r1) { $array[] = $r1; } $bind = [ ":stuID" => $r1['stuID'],"termID" => $r1['termID'],":level" => $r1['level'] ]; $q3 = …

Databases mysql
Member Avatar for joshmac
0
209
Member Avatar for pritaeas

Am looking for a way to get the maximum value of an integer data type in a function. Since FB doesn't have an unsigned type, casting from -1 doesn't work. Nor can I find any built-in constant or function to get it. Any other ideas? (Am not looking to hardcode …

Databases
Member Avatar for pritaeas
0
787
Member Avatar for davidjennings

Hi all, I am working on the following code. In the SQL query, I am currently calling all the data from the DB using * and all works fine. I would like to be selective and call the coloumns required i.e UserID, UserFullName, UserEmail, UserLastPassword, but when I do this …

Databases mysql php
Member Avatar for davidjennings
0
367
Member Avatar for HunainHafeez

i almost spent 3 hours on EXISTS operation, used in SQL especially with subqueries, i got its purpose :) that's ok but what i don't get is that WHY TO USE IT ? e.g. couldn't understand this example: *TABLE STORES* storeName----Sales-------Txn_date *TABLE GEOGRAPHY* regionName----storeName SELECT SUM(Sales) FROM Store_Information WHERE EXISTS …

Databases mssql sql
Member Avatar for deceptikon
0
341
Member Avatar for HunainHafeez

actual differecne between SQL Server's STORE PROCEDURES and USER DEFINED FUNCTIONS ? i looked up these in google but couldn't satisfy me. Differences ? better to use ? and why does UDF can only implement SELECT statements not else , y ?

Databases mssql
Member Avatar for HunainHafeez
1
184
Member Avatar for cereal

Hello, so I was trying few relations between tables and I noted an unexpected behaviour when using `group_concat()`. Let say I have three tables: fruits, fruitstock and fruitprices. These are the structures: create table fruits ( id tinyint unsigned not null auto_increment primary key, name varchar(50) not null, quality varchar(50) …

Databases apple mariadb mysql
Member Avatar for cereal
1
4K
Member Avatar for HunainHafeez

ALTER FUNCTION [dbo].[customers_udfMin2] ( @decission tinyint ) RETURNS int AS BEGIN -- Declare the return variable here DECLARE @min int Declare @default int = 10 -- Add the T-SQL statements to compute the return value here if (@decission = 1) Begin SELECT @min = MIN(customers.cus_id) from customers End else RETURN …

Databases mssql mysql sql
Member Avatar for HunainHafeez
0
495
Member Avatar for lewashby

When I run: ---`mysql> SET PASSWORD FOR 'garrett'@'localhost' = PASSWORD('abc123');` I get: ---`ERROR 1133 (42000): Can't find any matching row in the user table` Also, when I run: ---`mysql> UPDATE mysql.user SET Password=PASSWORD('abc123') WHERE User='garrett' AND Host='localhost';` I get: ---`Query OK, 0 rows affected (0.00 sec)` ---`Rows matched: 0 Changed: …

Databases mysql
Member Avatar for lewashby
0
430
Member Avatar for GilbertB

Hi I have this list: 532790M 47448M 378267M 467981M 53661M 583783M 524687M 390963M 493436M 185366M 150370M 497092M 3660G 568961M 152693M 254278M 353173M I am running an Access Query and I am trying to figure out what criteria do I need to insert for just showing only two digits before "M" …

Databases
Member Avatar for urtrivedi
0
90
Member Avatar for HunainHafeez

i'm trying to access a database backup that i usually keep in my pc's hard disk, trying to access it via my laptop. Both pc and laptop has SQL SERVER 2008 with same server name, using windows authentication, i spent 2 days but can't figure out that how to access …

Databases mssql
Member Avatar for JorgeM
0
135
Member Avatar for riahc3

I have a table (employees) like this ID Name Group Email 1 Bob Buckland Marketing b@example.com 2 George Alaz Engineering g@example.com 3 Tom Grady Marketing t@example.com 4 Mary Jane Engineering m@example.com Im going to use this in a email form. First a combobox should load all the groups possible. This …

Databases engineering mysql
Member Avatar for riahc3
0
152
Member Avatar for fx.eko

How do I connect from another machine to SQL Server 2008 R2 Express installed on Windows Server 2008? I've setup the network configuration to be enabled and the TCP port is set to 1433, but I still can not connect to an existing database on the server when creating ODBC …

Databases client-server mssql sql
Member Avatar for fx.eko
0
335
Member Avatar for begueradj

Hello people, I declared a field in my table : [B]my_field VARCHAR(20)[/B], but I don't want it to contain any number: can you tell me how I can do that using a trigger or using a constraint ? Thank you in advance for any help

Databases oracle
Member Avatar for mohamedsayed
0
211
Member Avatar for G_S

Hello. I am currently studying database design at my local university. They use Microsoft products there (Microsoft SQL Server 2008/2012), but we can't use them at home because of the licensing. I have two questions: 1 - Is there anything in the world of Open Source that I can use …

Member Avatar for Reverend Jim
0
226
Member Avatar for lewashby

delete hash from users where email='emailaddress@hotmail.com'; Why is the above line not working? I want to delete the value in the hash column in the row the contains the specified email.

Databases sqlite
Member Avatar for pritaeas
0
100
Member Avatar for Gobble45

Hi All, Firstly I will say that this exercise is for my learning experiences through an online course. However I have spent a combined total of about 6 hours working on this question and I am completely stumped on how to get the correct answers. The question: > List the …

Databases mysql
Member Avatar for rajkumar007
0
270
Member Avatar for chdboy

I had two versions of SQLEXPRESS on my computer earlier ,now I have uninstalled 2012 SQLEXPRESS from my computer Now when I try to attach .MDF file made in 2012 version it gives me error. TITLE: Microsoft SQL Server Management Studio ------------------------------ Attach database failed for Server 'My-PC\SQLEXPRESS'. (Microsoft.SqlServer.Smo) For …

Databases mssql pay-per-click
Member Avatar for chdboy
0
292
Member Avatar for Gobble45

Hi there, I have 3 tables to extract data from. My query thus far is: SELECT `ministry`.`pm_name` AS 'Name', DATE_FORMAT(`ministry`.`min_begin`, '%Y') AS 'Election Year', `ministry`.`party` AS 'Party Led', `deputy_name` AS 'Deputy PM', COUNT(DISTINCT `ministry`.`min_begin`) AS 'Times Elected PM', `GG_name` as 'GG Name', `gg_title` as 'GG Title' FROM `ministry` JOIN `deputy_pm` …

Databases mysql
Member Avatar for Gobble45
0
288
Member Avatar for theashman88

i'm trying to alter a table's column name but i keep getting an error. alter table GelderlandDist change inauguration 'inauguration date'; but i keep getting an error: ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the …

Databases mysql
Member Avatar for JorgeM
0
194
Member Avatar for gtsiga

Hie everyone I have the below code on my console to import data from an excel sheet to a mySql database but unfortunately I am having an error which reads: NO CONNECTION TRYING TO RECONNECT.... ERROR 2005 (HY000): UNKNOWN MYSQL SERVER HOST '(ID,NAME):' (11001) ERROR: Can't connect to the server …

Member Avatar for gtsiga
0
542
Member Avatar for chrisschristou

hello friend i just wanna learn if a way exist to generate AUTO_INCREMENT i have my datble and the colum ID is an AUTO_INCREMENT and the id is from 1, 2, 3 .... i would like to diferent id for exemple : CC13445356 i want 2 letter at begin or …

Databases mysql
Member Avatar for chrisschristou
0
195
Member Avatar for PerplexedB

So I 1. downloaded the odbc drive from the oracle site, "Connector ODBC 5.2" 2. created a user datasource that tested successfully in ODBC Datasources Administrator 3. created a new db in access 4. External Data->More->odbc database->Link ..., selected the datasource i created and got "ODBC - call failed" Data …

Databases mysql oracle
Member Avatar for 1stDAN
0
324
Member Avatar for praba_web

whenever i open phpmyadmin it showing that access denied and #1045 - Access denied for user 'root'@'localhost' (using password: YES) phpMyAdmin tried to connect to the MySQL server, and the server rejected the connection. You should check the host, username and password in your configuration and make sure that they …

Databases mysql php
Member Avatar for mmcdonald
0
221
Member Avatar for Fiorentino01^

Hi need some help. Some time ago I created a database and tables doing a tutorial. After I deleted the tables(don't remember why)and now all I have is a database with no tables. Trying to clean up my db I wanted to drop the DB but get this error: ERROR …

Databases
Member Avatar for Fiorentino01^
0
528
Member Avatar for rach.palo

private void cmdlogsec_Click(object sender, EventArgs e) { try { string myConnection = "datasource=localhost; database=secretary; port=3306; username=root; password=palo"; MySqlConnection myConn = new MySqlConnection(myConnection); myConn.Open(); string userText = txtusersec.Text; string passText = txtpasssec.Text; MySqlCommand selectcomand = new MySqlCommand("select username,password from secretary.tblseclog where username=' " + this.txtusersec.Text + "' and password ='" + …

Databases mysql
Member Avatar for <M/>
-1
221
Member Avatar for joshmac

I have this search method that doesn't seem to work, and I am not sure why. I need an extra pair of eyes to see why my search query brings back false results. Thanks in advance. public function search($data) { $person = $data['person']; $bind = [ ":person" => "%$person%" ]; …

Databases mysql seo
Member Avatar for joshmac
0
1K
Member Avatar for HDRG

If I have a table like this: Table1 ID - sequence - value 1 1 6 1 2 4 2 1 3 2 2 2 3 2 6 4 1 5 5... Table2: ID - Firstname 1 Jack 2 John 3 Mark 4 Mary Querry Result I hope for: ID …

Databases mysql
Member Avatar for HDRG
0
203
Member Avatar for PriteshP23

PFA...!! **Please look at the table data carefully.** I need to delete the rows. I need urgent help..!! Table: CREATE TABLE IF NOT EXISTS `version` ( `nidt` varchar(11) NOT NULL, `noeud` tinyint(3) NOT NULL, `VERSION` float NOT NULL, `ETAT_FONCT` varchar(20) default NULL, `idnap` varchar(25) NOT NULL, `nidtint` bigint(20) NOT NULL …

Databases mysql php
Member Avatar for PriteshP23
0
324
Member Avatar for HDRG

Say I have a table like this ID -- Val1 --- Val2 1 4 5 1 7 2 1 5 9 2 9 8 2 1 2 3 9 8 3 9 5 3 7 4 3 5 7 4 7 3 5 7 9 5 4 4 How do …

Databases mysql
Member Avatar for HDRG
0
325
Member Avatar for Papa_Don

Group, I've got 1000 questions regarding this "Rocket" (Unidata) database, but I digress. To give you some background, I do have some experience with SQL, but nothing with Unidata. But given what I've read, I can't believe it is that much different from SQL, aside from the command syntax (I …

Databases windows-server
Member Avatar for pritaeas
0
311
Member Avatar for strongpot

I am completely new to Triggers but I hear they can help me with a specific problem. I have a table: picid picture recordListingID 1 danny.jpg 0 2 jane.jpg 0 3 ralph.jpg 0 In the recordListingID column (int) i would like to generate numbers sequentially upon an INSERT. Is it …

Databases mysql
Member Avatar for strongpot
0
265
Member Avatar for ncis_sg1

Hello all, I need help with part of an assignment that is due Sunday. This is my first week learning mySQL so clear and simple descriptions will be well liked. Here are the instructions. a)When adding a customer, add the customer's balance times the sales rep's commission rate to the …

Databases mysql
Member Avatar for ryantroop
0
405
Member Avatar for praveen1993

I am interested in database,how to develop myself in this field.I am learning oracle now.

Databases oracle
Member Avatar for JorgeM
0
197
Member Avatar for GilbertB

Hi all , I am trying to build a function in Access Query database which gives results of a 1 month expire invoices from the current month.Therefore when I run the query, the results will be all the invoices which will expire next month. I have tried the Data Add …

Databases microsoft-access
Member Avatar for almostbob
0
86
Member Avatar for sagisgirl

Hi, I'm confused right now about mysql statement I have four tables : form1 | form2 | form3 | form4 | ----------------------------------------------------- k8regNo | form2_ID| k9regNo | form4_ID | consignee | goods | out_date| k9regNo | moveDt | k8regNo | | form2_ID | can i join this four tables..?

Databases mysql
Member Avatar for sagisgirl
0
467
Member Avatar for ktsangop

Hello everyone! Is it possible to write a query which does the following : UPDATE db.table SET col1 = 1 WHERE col2='something' AND col3 IN ('a','b','c') ELSE SET col1 = 0 Meaning that the rows that don't match the where conditions will also be updated to another value. Note that …

Databases mysql
Member Avatar for ktsangop
0
239
Member Avatar for de Source

Hi, i want to create a query which select three columns from a table on certain condition now i have got certain with three columns and i can bind this data to a datagridview but before this i want to add a column to dgv say col_new and fill its …

Databases mssql sql
Member Avatar for M.Waqas Aslam
0
302
Member Avatar for ourloop

I have a MySQL database with a table that has a field/column labled "user8" (which is the field for users' state). I have this PHP call and its working fine if I call all states individually and I only want numbers of rows. <?PHP mysql_select_db("freeskat_promail") or die(mysql_error()); $result = mysql_query("SELECT …

Databases mysql
Member Avatar for ourloop
0
20K
Member Avatar for montjoile

hi I had a question in an exam that asked for the code of a trigger that cancels a transaction if a query result doesn't meet a condition in oracle database. is it possible? I am googleing but I can't find an answer thanks

Databases oracle
Member Avatar for montjoile
0
464
Member Avatar for Rahul47

A simple insert query works as : INSERT INTO <table-name> VALUES(val1,val2,val3); and DONE. Suppose I wanted to insert only into last two columns I will do as : INSERT INTO <table-name>(col2,col3) VALUES(val2,val3); For less no of columns its not a big deal but what if i have 10 columns and …

Databases mysql
Member Avatar for Rahul47
0
203
Member Avatar for PriteshP23

This query is not working. I need urgent help. Thanks a lot in adv. **ROWS affected: 0** I have cross checked the data in the table for the given condition. $sql = 'UPDATE LTE_noria_cellule cel_bk_up SET cel.NAP_'.$site->ur().' = '1' '. 'WHERE cel.nidt IN ( select gn from LTE_noria_candidat_bk_up can INNER …

Databases mysql
Member Avatar for PriteshP23
0
202
Member Avatar for lewashby

Any idea why this is happening? garrett@bedroom ~ $ mysql ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)

Databases mysql
Member Avatar for lewashby
0
226
Member Avatar for patk570

Hey everyone, I have an array of checkboxes that hold a value from 1-30, and when I first update the database it stores these values in a comma seperated list like 1,8,9,22 in the MYSQL database. Now my question is, can I when I go to the edit page to …

Databases mysql
Member Avatar for patk570
0
272
Member Avatar for lewashby

(Linux System) Everytime I try to log into MySQL or create a database I get "Access denied for user@localhost". I just recently installed mysql using apt-get install and I don't recal creating a password or anything for it when I installed it. Any ideas?

Databases mysql
Member Avatar for 1stDAN
0
172
Member Avatar for tieties

Ok so what i want to do is break up a string after the lenght of the string is = to 160, then i want to add a line break..but all this needs to be done in the Select...can anyone help me with this thankx in advance select case len(COD_P2_Q1) …

Databases mssql sql
Member Avatar for iamthwee
0
359
Member Avatar for crag0

Forgive me if this is something obvious or a simple question. I am having issues with my date field when loading data into my database. I am having it load using a python script using the below command and once complete the date is 0000-00-00. the file I am loading …

Databases mysql
Member Avatar for crag0
0
231
Member Avatar for somjit{}

im trying to do this : alter table project_info change column number proj_id int not null auto_increment, add primary key (proj_id); but mysql tells iv got an error. any help with whats wrong here ? i followed this from head first sql book (page 210 if anyone's interested ) .

Databases mysql
Member Avatar for somjit{}
0
302

The End.