2,403 Solved Topics

Remove Filter
Member Avatar for
Member Avatar for bLuEmEzzy

I added "DISTINCT" in my code. but seems the output is still the same, it have duplicate records. Thank u :D (note: I changed the field names and tables here) SELECT DISTINCT b.field1, b.field2, b.field3, b.field4, c.field1, c.field2, c.field3 from tbl1 b inner join tbl2 c on b.logid = c.logid …

Databases mysql php
Member Avatar for daniellemacey
0
372
Member Avatar for Maideen

Hi Pls advice me the following calculation in stored Procedure my scenario is packing the magazine Example: Order = 6042 copies. 6042 have to be packed by 20 each. so 302 bundle. balance 2 copies. If I divide 6042 /20 Result is 302.10 . How can store 302 and 2 …

Databases mssql sql
Member Avatar for Amr.Mohammad87
0
320
Member Avatar for shashigowda

Hii..this is mysql query $querry="SELECT CONCAT(`insert_id`, `type`) AS 'order_id' FROM orders WHERE email='$email'"; $order_id=mysql_query($querry); echo $order_id; i need to convert this into ** mysqli**. Any Help??

Databases mssql mysql php
Member Avatar for shashigowda
0
376
Member Avatar for shashigowda

Hiiii,Good Evening I have a code that search for data in the database but I can search for only 1 keyword in a time,which is working fine for single keyword. if I type 2 keywords separated by a space or comma's which return blank page. I would like to modify …

Databases mysql php sql
Member Avatar for pritaeas
0
2K
Member Avatar for berserk

I dont fully understand this issue at all, it makes no sense to me for several reasons but ill liust the main ones i have code elsewhere that works just fine and is identical in function and setup i dont think the issue is a registry key issue, this i …

Member Avatar for rproffitt
0
663
Member Avatar for butterflyTee

FROM: ORACLE 9i Give the SQL statements that determine the following: 1. Which customers lives in New Jersey? SELECT * customer FROM customers WHERE state = 'NJ' 2.Which orders were shipped after April 1, 2003 SELECT * FROM orders WHERE shipdate to_date('01/04/2003', DD/MM/YYYY') 3. Which books are not in Fitness …

Databases oracle seo
Member Avatar for Miris_1
0
2K
Member Avatar for James_43

Hi there, I created a new table and forgot to set the primary key with an auto_increment. I went back and use: `ALTER TABLE table ADD PRIMARY KEY AUTO_INCREMENT (column);` However, now whenever I try to insert a new row of data, I get the error message "Duplicate entry '0' …

Databases mysql
Member Avatar for James_43
0
263
Member Avatar for strRusty_gal

Can someone please help to advise below question? I need to do a SUM of the amount column based on the CreateDate date range From 10th of previous month to 10th of this month Below is the database table Amount CreateDate 151.00 5 July 2015 567.50 19 July 2015 558.00 …

Databases mssql
Member Avatar for strRusty_gal
0
188
Member Avatar for SimonIoa

Hello i want to put more than one values in a table's row

Databases mysql
Member Avatar for SimonIoa
0
344
Member Avatar for babir

Please help me.... I want to upload up to 5 photos and save in database. I want by selecting photo it will upload automatically and then the selected photo will appear in the page. It will occure with one by one photo, up to 5 photos and the photos can …

Databases file-system
Member Avatar for Reverend Jim
0
201
Member Avatar for RGStrat

Hello Everyone, So I've begun a new project, in an attempt to show off my progress with Javascript. I'm making a little text-based RPG. However, I would like for it to permanently save your character and their progress. Thus, I need a MySQL database. I won't lie, I've only used …

Databases gaming mysql
Member Avatar for RGStrat
0
3K
Member Avatar for alain.marion85

In the work I came up against a situation when the working database at the end of day went to the Suspect Mode. And the archive was in many hours before. To transfer it in normal mode, until isn't made repaired base it was impossible. DBCC checkdb also refused to …

Databases mssql sql
Member Avatar for GervaseParrish
1
252
Member Avatar for joshmac

I am not sure if this is possible or not, but I need help writing a query for a running balance report. I tried a few queries on my own; I've come close but not exactly what I need. For convenience, I've created an sqlfiddle: [Click Here](http://sqlfiddle.com/#!9/caa5c) The report needs …

Databases mysql
Member Avatar for joshmac
0
1K
Member Avatar for Azii

Hello All, I have a table with column_name as USERNAME where USERNAME is VARCHAR2(20) and I want to display it as **"USERNAME@email.com"**. How to write the select query for this. **QUERY**: SELECT USERNAME AS EMAIL FROM STUDENT Thank you.

Databases display email sql
Member Avatar for urtrivedi
0
188
Member Avatar for SimonIoa

Hello i have formatted my pc with Windows 7 and installed wamp server. My local project doesnt work. I am familiar with the difference between mysql and mysqli? Do i need to install a most recent version of Mysql than the one provided by Wamp Server?

Databases mysql
Member Avatar for diafol
0
319
Member Avatar for nitos

Converting mysql to mysqli. i need help av been scratching my head how to make necessary changes but its like am making more errors. please help or give direction what to change.. <?php session_start(); include("php/class.user.php"); $msg = ""; $msg2 = ""; //$submit = $_POST['btnaddnew']; if(isset($_POST['btnaddnew'])){ if(empty($_POST['txtUserId']) || empty($_POST['txtFname']) || empty($_POST['txtMname']) …

Databases mysql
Member Avatar for diafol
0
280
Member Avatar for Papa_Don

Hi group, I'm getting an "single-row subquery returns more than one row" error when running my routine. Looking through the table I'm querying, it is listing a date twice for some reason. Since I'm not able to remove this one row, is there a way to return the first instance …

Databases oracle sql
Member Avatar for Papa_Don
0
667
Member Avatar for k_manimuthu

Hi all, I am not able to get correct count, if col1 (percentage with respect to product) and col2 have uniq value. Below I post my sample table data and expect output and which i query I tried. Please help me to get in to right direction. CREATE TABLE mysample …

Databases mysql sql
Member Avatar for k_manimuthu
0
239
Member Avatar for Lau_1

**Hello, please help me on this. I want to select from these table,** table name: User | Register_date | --------------- | 2015-02-04 | | 2015-02-04 | | 2015-02-14 | | 2015-03-14 | | 2015-04-04 | | 2015-04-14 | table name: Reservation | Order_date | Amount | ----------- | ------ | …

Databases mysql
Member Avatar for diafol
0
29K
Member Avatar for amishraa

Hello, What seems so trivial, has been bugging me. I have a table with duplicate values on one column, while non-duplicate (date) values on the other. If I am to use DISTINCT it will only eliminate the row with the same date. But how do I use DISTINCT and only …

Databases
Member Avatar for diafol
0
247
Member Avatar for k_manimuthu

Hi all, Below is my sample data. I am trying to get the 'product' name only if the percentage count is varying. Could you please suggest your maximum no of 'Mysql' queries to approach this. Thanks in advance. Input: ============================================== percentage product ============================================== 100.00 A 100.00 A 100.00 A 2.18 …

Databases mysql
Member Avatar for k_manimuthu
0
307
Member Avatar for sanket044

Hello, I am right now having a dedicated server and when i try to execute a INSERT query in table of 2 Lakh rows it takes about 0.02 seconds. so i am having a website where i need to update all 2 Lakh rows every 15 mins. but it sims …

Databases mysql sql
Member Avatar for pritaeas
0
660
Member Avatar for Papa_Don

Group, I'm extracting some month and year values from dates. I need to ensure they are NUMBERS as I'm going to multiply, add and subtract. I'm assuming I need to DECLARE these as NUMBERs. However I'm not sure how to do this correctly as I'm getting errors preventing me to …

Databases oracle sql
0
126
Member Avatar for nimz143

Hi. Im using VS2008 and SQL Server Management Studio 2008. I want to ask, i have two different table, TableA and TableB in same database, DatabaseX. Both table have two same column, ColumnY but the data are different within this table. Example: TableA, ColumnY : A1, B2, C3, D4 TableB, …

Databases sql
Member Avatar for nimz143
0
289
Member Avatar for Papa_Don

Group, I'm using TOAD to query the Oracle database. My better expertise is in VB.net. I have very little SQL experience. My question: Can I create a variable in TOAD/SQL to prompt for a date(s)? Here is what I want to do: Question 1: Enter Beginning Date (user to enter …

Databases oracle sql
Member Avatar for Papa_Don
0
3K
Member Avatar for calebclark

Before upgrading to EXCEL 2010, I am able to open dbf files created in Visual Foxpro 7 or 9 in Excel 2003. I am not sure why after installing EXCEL 2010 I am no longer able to open the file. I get the error message when I tried opening the …

Member Avatar for caelholden
0
2K
Member Avatar for Papa_Don

Hi group! I'll be up front and say I'm very new to SQL. I'm just now getting my feet under me in my new job. So I have lots of questions. I'll start simple (I hope). I've created my own tables (2) that have multiple columns of data that looks …

Databases oracle sql
Member Avatar for Papa_Don
0
243
Member Avatar for AntonyRayan

Hi, In a representative table, I have fields, like, id, mark_id, rep_id rep_name, father name,etc, In this table, rep_id field is empty, And in rep_area table, the fields are like id, rep_id, dist_id,etc, in this table, rep_id has values. While editing the representative form i want to display rep_id from …

Databases mysql
Member Avatar for e.geofrey
0
208
Member Avatar for AntonyRayan

Hi, I am displaying list of jobs that are posted by admin from mysql db. In that Table I used requisition_id (job id) , and the datatype is varchar(255), if we click the job id , it will show the description . My problem is, if it more than one …

Databases mysql
Member Avatar for bugz313
0
192
Member Avatar for mbarandao

Hello, Is it possible to join two tables from two different databases? I have the following query whereas the table named "calendar" is in a separate database than the table named "history". Any ideas on how to join bottom? SELECT C.theDate as day, IFNULL( sum(case when DATE( CAST( H.timeentry AS …

Databases mysql
Member Avatar for mbarandao
0
2K
Member Avatar for mehnihma

Hi I have this query: `SELECT SUM(`KN`) + SUM((COALESCE(`EUR`, 0)))*7.5 FROM log WHERE `KN` IS NOT NULL and `EUR` IS NOT NULL` And it retunrs 0 SUM(`EUR`)* 7.5 should be zero but SUM(`KN`) is 60. I am not shure what I am doing wrong here, I want to add numbers …

Databases mysql
Member Avatar for lps
0
146
Member Avatar for mehnihma

Hi I am new to MySQL and not too shure how can I update row form another table while cheking if logged in user is same: `Telefonist='".$_SESSION["UserName"]." And also I need to check if date is the same so It gets to right pearson on right date in a row: …

Databases mysql
Member Avatar for mehnihma
0
189
Member Avatar for s.ganesh

Hi, Please help me, i try to fetch category list as like below, where category ids is passed in inclause, it returns two rows. mysql> select c_id,c_name from category where c_id in (870,854); +------+---------------+ | c_id | c_name | +------+---------------+ | 854 | Telugu | | 870 | Telugu Events …

Databases mysql
Member Avatar for s.ganesh
0
210
Member Avatar for SalmiSoft

I am using the MySQL C API and having problems defining a stored procedure. MY SQL script works fine in MySQL Workbench but the same script fails in my own software. A test script which shows the problem is: SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0; SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0; SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='TRADITIONAL,ALLOW_INVALID_DATES'; CREATE SCHEMA …

Databases api mysql
Member Avatar for SalmiSoft
0
255
Member Avatar for N kamatchi

i does not know about store the image in database. what is the datatype of picture in oracle?

Databases image oracle
Member Avatar for erikko
0
135
Member Avatar for mangel.murti

I have created a sp little bit confuse about it. how to count result set if data availabe then show it and if not then retun ResultStatus is zero. did not work much with sp. thanks for any help suggestions. CREATE DEFINER=`root`@`localhost` PROCEDURE `usp_GetProduct`(IN `iProductCategoryId` INT) BEGIN DECLARE ResultStatus INT …

Databases mysql php
Member Avatar for ryantroop
0
348
Member Avatar for mskat02

I am trying to insert a set of attribute rows into a table based on the range of a unique key (product_id) and three passed variables. This is on a MySQL database. The three variables are the start_product_id, the end_product_id and the batch_attr_id. The stored procedure does not return an …

Databases
Member Avatar for ryantroop
0
292
Member Avatar for SimonIoa

hello. I am getting a blank page on localhost/myproject/ i am pretcty sure th.at\ it cant connect to the database because when i am using a simple echo it returns. for example `<?php echo 'DDD'; ?>` THE THING IS THAT I AM USING WOS PORTABLE IS IT POSSIBLE THAT IT …

Databases
Member Avatar for SimonIoa
0
316
Member Avatar for SimonIoa

Does anyone know how to install phpMyAdmin on wos portable?

Databases php
Member Avatar for SimonIoa
0
87
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 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 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 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 …

Member Avatar for lps
0
305
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 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 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 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 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
324
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
180
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

The End.