1,079 Recommended Topics

Remove Filter
Member Avatar for
Member Avatar for Sutarusu

Ok, here is what I get when I run the query. 1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near newmessage`int(4) unsigned NOT NULL DEFAULT `0`,`companyi' at line 4 Here is what …

Databases mysql sql
Member Avatar for Sutarusu
0
2K
Member Avatar for kadriirdak

Hi I have a query and I like to see the result until the condition match. I am trying to find if the end date(+1day) is equal to next row start date if so list it. I have the below query does the job but it also list whole table …

Databases mysql
Member Avatar for kadriirdak
0
151
Member Avatar for niranjanjee
Member Avatar for lps

I currently wish to write a query to duplicate data in database while modifying one column. First of all, my database structure: table code CURCD NOT NULL VARCHAR2(3) CODE NOT NULL VARCHAR2(2) ITEM NUMBER(1) DSCPT VARCHAR2(20) The unique idx is the curcd,code,item. What I wish to achieve is duplicate data …

Databases oracle
Member Avatar for lps
0
304
Member Avatar for Nicko21

Hello everyone! My Access MDB file has "disappeared" from his documents folder. I haven't deleted it, I have checked recycle bin, system restored, searched and so on. No luck! Any suggestions on what else I could do to recover the file?

Databases microsoft-access
Member Avatar for erikko
0
1K
Member Avatar for evandrosiqueira

I work for a small company made up of a salesman, a graphic artist, and an engineer. The engineer writes and maintains all of his own software to run a network of interactive kiosks around the globe. As artist, I use his tools to maintain and update the network content. …

Databases mysql web-server
Member Avatar for diafol
0
1K
Member Avatar for soraa

hello, i m working on connecting sqlData with C# form showing data detail on text boxess like ID,name,occupation.and doing the search by entering the ID on textbox then clicking the button to show the details i'm just a beginner in C# so i did the the coding like this and …

Databases c# seo
Member Avatar for soraa
0
611
Member Avatar for sanjay@srvmedia

id name class marks 1 H 1 60 2 H 2 50 3 S 1 70 4 S 2 60 5 V 1 55 6 V 2 80 7 K 1 60 8 K 2 70 This is my table structure. I want mysql query to get result like id …

Databases mysql sql
Member Avatar for jj.dcruz
0
298
Member Avatar for PulsarScript

Please,help to set the relational notations in database table.Would much appreceate the help. ![database.png](/attachments/large/4/7de31bb1f14ab6db9af54e4c91d912a7.png "align-center")

Databases
Member Avatar for diafol
0
136
Member Avatar for SimonIoa

i want to retrieve a single row from my database i use this and i get nothing `$session_country = mysql_result("SELECT name FROM countries WHERE country_id='15'");` i found this online but still the same `$session_country = mysql_result(mysql_result("SELECT name FROM countries WHERE country_id='15'"), 0);`

Databases
Member Avatar for SimonIoa
0
281
Member Avatar for AntonyRayan

Hi, How to calculate no of days working of an employee and no of days absent in a current month.

Databases mysql
Member Avatar for kalxas
0
374
Member Avatar for mbarandao

Hello, I was wondering if the following mysql query can be constructed in a much more efficient way? SELECT distinct(cr.email), m.fname, m.lname, m.email, (SELECT count(*) FROM campaignRecipts where email=cr.email )as ttlsent, (SELECT count(received) FROM campaignRecipts where received='yes' and email=cr.email )as ttlreceived, ((SELECT count(received) FROM campaignRecipts where received='yes' and email=cr.email )/(SELECT …

Databases mysql sql
Member Avatar for mbarandao
0
363
Member Avatar for olegb

SQL Gurus, help !! I have a table with 3 fields, ID, Answer_5, Answer_6. Answer_5 & Answer_6 both hold a date value, but the fields are defined as string (for other reasons). In Answer_6 it is possible to have the string of 'Now'. I am trying to do a simple …

Databases mssql
Member Avatar for AleMonteiro
0
351
Member Avatar for logicaweb

I'm trying to make average consumption of fuel in my db. But I do not know how to do it. This is an little explanation: I have 2 tables: Tabe CONSUM: ID CARID LI KM DATETIME ------------------------------------------------ 6 9 70.17 174857 2015-02-10 10:58:51 5 5 51.00 154785 2015-02-09 19:11:19 4 …

Databases mysql
Member Avatar for kalxas
0
244
Member Avatar for ramsiva

I am getting id's 3 times. count will be 3 but i am getting 9. i dont know where i did mistake. any body help me $result = mysql_query("SELECT * FROM candidate where user_id ='$username' and password='$password' and status='0' " ); $num=mysql_num_rows($result); if($num>0) { $row1=mysql_fetch_array($result); $cand_id=$row1['cand_id']; $f_mobile=$row1['f_mobile']; $d2=mysql_query("select * from …

Databases mysql
Member Avatar for kalxas
0
181
Member Avatar for london-G

I am developing a software which will connect to the same database as another application. Is there a term for that? Also any tips on what sort of methods I can use?

Databases
Member Avatar for JorgeM
0
126
Member Avatar for Kcachilove

Hello I have an SQL query that i want to concatenate the fields and display it in a way that those concatenated fields will be displayed first row will have 4 columns,second row will also have 4 columns....etc. for instance the query `SELECT imageurl, caption, template FROM template; The Result …

Databases display mysql sql
Member Avatar for anejose
0
1K
Member Avatar for rouse

I’m trying to patch a routine and I finally found the problem. I am given the following string: [code] $query = "SELECT title, DATE_FORMAT(event_date, '%Y-%c-%e') AS event_date FROM $dbTable WHERE event_date LIKE '$year-$month%'"; [/code] In the month variable at the end, for the months January through September I am returned …

Databases mysql sql
Member Avatar for rouse
0
323
Member Avatar for UK-1991

I have created a vendors page where I want to show how many vendors exist in the database. I have succcssfully done but main problem is that how do i show that which vendor contains how many products There are 2 tables I have created 1 is products 2nd is …

Databases mysql
Member Avatar for UK-1991
0
221
Member Avatar for Azii

Hello All, I want to write the plsql stored procedure to insert multiple rows in a table. Table t1, table t2. Table t1 column names(c1,c2,c3,c4,c5) table t2 column name (c2,c3,c4) column names c2, c3, c4 are same in both tables. now I want to insert the data into t1 by …

Databases
Member Avatar for Azii
0
187
Member Avatar for rouse

I am looking for help to write a query. I have a database with an ID a Date_Field and a Description. I want to find out two things What Date_Field and Description and Description are the same? {duplicate records} [code] SELECT * FROM TIME_TABLE t1 WHERE EXISTS ( SELECT * …

Databases mysql sql
Member Avatar for rouse
0
179
Member Avatar for Andrew de Beer

Hi All I use MS Access to import information from Excel, check for duplicates and post it to an Access data table. The amount of data is making this process extremely slow. I am attempting to move the data tables to MySQL and then running a Stored Procedure to do …

Member Avatar for DaveAmour
0
175
Member Avatar for rouse

I the found the link below when I was researching how to get a random record for a database. This article is about speed in retrieving a random record and I found in my test that speediest solution brought about the most duplicates. [url]http://akinas.com/pages/en/blog/mysql_random_row/[/url] I am hoping some one has …

Databases mysql
Member Avatar for rouse
0
101
Member Avatar for Robshaw236

Hi i need a validation rule for MS Access so that only a time can be entered that is between 18:00 and 23:00 The validation rules must allow for the above numbers inclsuively Please Help

Databases microsoft-access
Member Avatar for jonobugs
-1
990
Member Avatar for mattyd

Hello. I am beginning the process of coverting all of my MySQL to MySQLi. I have been doing much research on this but find it a bit confusing. I have two questions at this point regarding the matter: 1) What does it exactly mean to "escape" a string and where …

Databases mysql
Member Avatar for deceptikon
0
411
Member Avatar for berserk

I am in need of help on this one :( i cannot seem to figure out what i have done wrong, i set up my code just like in teh examples i read and i dont really see anything wrong with the logic (as far as i can tell) but …

Databases html-css mysql php
Member Avatar for berserk
0
323
Member Avatar for mattyd

I posted earlier today about converting my MySQL to MySQLi - Upon further research I came across the following, Prepared Statements. It seems that this may be a good way to go but I am a bit confused about how to implement it. I am simply taking User-entered data from …

Databases mysql
Member Avatar for pritaeas
0
238
Member Avatar for hwoarang69

below, I have created 4 tables using oracle sql. I want to change the code so that when deleting a student will delete all enrollments for that student. any idea how can I do this? # COURSES table # CREATE TABLE COURSES (COURSE VARCHAR(6), DESCRIPTION VARCHAR(60), CREDITS INT, CONSTRAINT pk …

Databases mysql oracle sql
Member Avatar for diafol
0
226
Member Avatar for hwoarang69

below, I have create a table using oracle sql. How can I change so that number of credits for a course is always between 0 and 6. Any idea how can i do this? CREATE TABLE COURSES (COURSE VARCHAR(6), DESCRIPTION VARCHAR(60), CREDITS INT, CONSTRAINT pk PRIMARY KEY (COURSE));

Databases oracle sql
Member Avatar for diafol
0
224
Member Avatar for DGULLIVER

Hi, I want to create a SP in mySQL to insert records and return the Primary Key. But when I try and create the SP I get error: mysql said #1064, You have an error in your SQL Syntax, Check the manual that corresponds to your MySSQL server version for …

Databases mysql
Member Avatar for pritaeas
0
6K
Member Avatar for ranasingh1984

I was wondering if you could help me with a current issue I am having whilst developing an ER diagram. The problem I am having is with identifying the correct Entities. The scenario I am trying to complete is given below. I have also included a list of entities which …

Databases
Member Avatar for mtto44
0
1K
Member Avatar for aakashchopra121

what is the best DB to host the cloud? Give me some idea?

Databases
Member Avatar for diafol
0
90
Member Avatar for donz365

I am sorta new to MySQL and not 100% sure of what I can and can not do with it yet. I have an xml file with course information such as ReferenceNo. CourseName, CourseType, CourseLocation, and I want to load in into a database table that has column names such …

Databases mysql xml
Member Avatar for diafol
0
2K
Member Avatar for ruhestorer

Hi, I have a problem with exercise 51 from sql-ex.ru, please help. Thanks in advance. # Short database description "Ships" # The database of naval ships that took part in World War II is under consideration. The database has the following relations: Classes(class, type, country, numGuns, bore, displacement) Ships(name, class, …

Databases mysql sql
Member Avatar for SOURABH_2
0
1K
Member Avatar for fthmad

I was designed a database model for my social network project. It has follower system. If you follow him the follower can see the status. All these operations are for one page. (This page is name **user_wall.php**) Its has a GET value and this is **userName**. For this case about …

Databases mysql social-media
Member Avatar for fthmad
0
561
Member Avatar for Maideen

Hi I am working in weekly Newspaper company. There are 15000 subscriber, subscribed for next 3 to 4 years.Per year 52 weeks and I have to generate issue number based on week(1001......3000) for each subscriber and store into data table. I am using mssql 2012. I have written the Store …

Databases client-server mssql sql
Member Avatar for erikko
0
328
Member Avatar for Kubilay Doğukan

This is the table that gives error -- ----------------------------------------------------- -- Table `mydb`.`Supervise1` -- ----------------------------------------------------- CREATE TABLE IF NOT EXISTS `mydb`.`Supervise1` ( `S1_Date` VARCHAR(45) NOT NULL, `S1_Contracter` VARCHAR(45) NOT NULL, `S1_Contractee` VARCHAR(45) NOT NULL, `S1_ID` VARCHAR(45) NOT NULL, PRIMARY KEY (`S1_Contracter`, `S1_Contractee`, `S1_Date`, `S1_ID`), INDEX `Contracter_idx` (`S1_Contracter` ASC), INDEX `Contractee_idx` (`S1_Contractee` …

Databases mysql
Member Avatar for Kubilay Doğukan
0
289
Member Avatar for Joemeister

I'm trying to do a simple a database SQL script where I simply need tocreate a database as well as 4 tables within. So far I'm getting a very annoying error that states: There is already an object named 'DEVICE_TYPE' in the database. Why, I don't know? Any help regarding …

Databases mssql
Member Avatar for erikko
0
285
Member Avatar for olavbundgaard

The database that I'm working for has been suddenly corrupted. Fortunately, I performed a backup on it and save to a backup tape. Therefore, I reinstalled SQL Server and I tried to restore those backup. However, it failed and I suspect that maybe the backup is corrupted too as well. …

Databases client-server mssql sql
Member Avatar for theodorrinder
-1
1K
Member Avatar for donz365

Hi, I am working on a test site locally. I am loading an xml file into my database with teh following sql query: LOAD XML LOCAL INFILE 'C:/courseInfo18.xml' INTO TABLE wp_courses ROWS IDENTIFIED BY '<Course>' (ReferenceNo, ProviderCode, ProviderName, CourseID, CourseName, CourseTypeID, CourseTypeName, LocationCode, LocationName, StartDate, FinishDate) ; It works fine …

Databases mysql xml
Member Avatar for DaveAmour
0
966
Member Avatar for Nyck24

Hi, Please I'm new in database and I need your help, I'm working on my database project and before to continue I would like to be sure that my NORMALIZATION 3NF and my ER Diagram are correct. **Normalization 3NF** DESIGN PARTS SPECIFIED IN DESIGN PARTS PARTS USED AS SPECIFIED IN …

Databases web-design
Member Avatar for AleMonteiro
1
786
Member Avatar for slyme

Hello, I am getting a bit confused regarding apostrophes in my SQL statement. I can get it to work but I would like to understand why it works when it does or, conversely, why it doesn't work when it doesn't. If you know what I mean. Anyway - here goes: …

Databases mysql sql
Member Avatar for pritaeas
0
272
Member Avatar for gharris55

In writing a Conditional Control Case Statement in PL/SQL, I got this error. My code is below. Is there a particular way I need to do the > and < signs or did I overlook something. Any help would be great. ORA-06550: line 11, column 6: PLS-00103: Encountered the symbol …

Databases
Member Avatar for pritaeas
0
390
Member Avatar for Yaw_1

I have been trying fruitlessly to populate my datagridview using multiple tables from my ms access database. My code is shown below. Thanks in advance for your help. Imports System.Data.OleDb Public Class Stock_Check_Options Dim MyConnection As OleDbConnection Dim MyDataAdapter As OleDbDataAdapter Dim MyDataAdapter1 As OleDbDataAdapter Dim MyDataSet As DataSet Dim …

Member Avatar for Yaw_1
0
338
Member Avatar for naui95

Can somebody explain me why does this mysql query SELECT * FROM mytable WHERE F='d2f2' AND Tot>Pmin AND Tot<Pmax omit this row ID ¦IDa¦F ¦Pmax¦Pmin¦Tot --------------------------- 124¦160¦d2f2¦200 ¦12 ¦182 thanks!

Databases mysql
Member Avatar for Reverend Jim
0
202
Member Avatar for boney

Hi, My query: $query = "select * from ( select * from students union all select * from students ) as tmp order by rand() limit 5"; $myquery = mysqli_query($db_connect, $query); while($students = mysqli_fetch_assoc($myquery)){ $stdid =$students['stdid']; $name = $students['name']; $dept = $students['dept']; echo "<br><br>".$stdid."<br>".$name."<br>".$dept; } There are 20 rows for …

Databases mysql sql
Member Avatar for JorgeM
0
157
Member Avatar for davy_yg

// this works sql = "SELECT * FROM `image_upload` WHERE location='article' AND image_id='7'"; // this works sql = "SELECT * FROM `image_upload` WHERE location='article' AND image_id='9'"; // this does not work sql = "SELECT * FROM `image_upload` WHERE location='article' AND image_id='7' AND image_id='9'"; // I wonder why?

Databases mysql
Member Avatar for DaveAmour
0
150
Member Avatar for rchawdhari

when i run select on temporary table in mysql it gives all records. But when i tried in my php page it give blank reason. Please help me out.

Databases html-css mysql
Member Avatar for rchawdhari
0
95
Member Avatar for Dani

Hi, I hope someone out there can help me. Envision this ... an accounts receivable / accounts payable super simple spreadsheet, to ultimately be maintained by someone who is not computer literate. It needs to be accessible from within the cloud (Google Spreadsheet, some other free SaaS product, etc) with …

Member Avatar for Dani
0
253
Member Avatar for k_manimuthu

Hi All, I want to copy the missing 'data' field from 'tb1' to 'tb2' based on the 'id' value. Please suggest the possible queries. mysql> select * from tb1; +------+------+ | id | data | +------+------+ | 1 | A | | 2 | B | | 3 | C …

Databases mysql
Member Avatar for k_manimuthu
0
317

The End.