2,403 Solved Topics

Remove Filter
Member Avatar for
Member Avatar for code739

Hi guys, im kind of curious, is there a query or some way to fuse two colums like `select a.col1,b.col1 from table1 a left join table2 b on a.id=b.table_a_id` then as a result i want to display only one column containing a.col1,b.col1 thanks =)

Databases mysql sql
Member Avatar for code739
0
294
Member Avatar for LindaJ

Hi, I need a hand from a kind MySQL guru. I am running XAMPP for WinXP ver 1.6.8, phpMyAdmin ver 2.11.9.2, PHP Version 5.2.6 - on a local host (my laptop). I'm running Joomla 1.5.7 (on both my net server and on my local host). What I need to do …

Member Avatar for shafi.nce
0
578
Member Avatar for andarivaadu1

Here is my query UPDATE tracks SET People_id_Reference = (SELECT People_id FROM People RIGHT JOIN top100 ON People_name=top100.artist LIMIT 1) WHERE People_id_Reference IS NULL; But that query inserts same people_id value into all rows of People_id_reference Can some on help me with this. Thanks in advance

Databases mysql
Member Avatar for andarivaadu1
0
198
Member Avatar for john.knapp

Consider this: I have a user-defined stored procedure which returns a bit value as OUTPUT. In my calling code I want to check that value. I define it in my code as follows: Dim retval As New SqlParameter() retval.ParameterName = "@return" retval.SqlDbType = SqlDbType.Bit retval.Direction = ParameterDirection.Output DataCommand.Parameters.Add(retval) DataCommand.ExecuteNonQuery() ' …

Databases mssql
Member Avatar for john.knapp
0
532
Member Avatar for crownedzero

CREATE OR replace FUNCTION fn_findraise (dept_in IN VARCHAR2, salary_in IN FLOAT) RETURN NUMBER IS salaryraise NUMBER; BEGIN IF dept_in = 'MIS' THEN salaryraise := salary_in * .10; ELSIF dept_in = 'SALES' THEN salaryraise := salary_in * .15; ELSIF dept_in = 'HR' THEN salaryraise := salary_in * .20; END IF; RETURN …

Databases oracle
Member Avatar for pritaeas
0
164
Member Avatar for cyberdaemon

Good day, I created a simple search in sql. inside the textchange event. everythis seem to be ok for text box. i want to have another search with the other text but this time i want to use the first search and concat it with the next condition.. here is …

Databases seo
Member Avatar for cyberdaemon
0
131
Member Avatar for jay.barnes

Hello! I've got a question here that has me scratching my head - I've got a table of IP addresses. Each octet has its own field (OCT1,OCT2,OCT3,OCT4). The first two octets are fixed, and will never change (so, the IP addresses on my table are between X.Y.0.0 and X.Y.255.255). As …

Member Avatar for jay.barnes
0
312
Member Avatar for HunainHafeez

i have tblScrutiny , COLUMNS: teamid name userid now confusion is that every team has many members, so how how would i mention them, like e.g i mention 1 member in teamid =1 , then in next row the teamid changes (identity=ON) , so how to mention 2nd member ?

Databases client-server mssql sql
Member Avatar for JorgeM
0
199
Member Avatar for primzon

Hello again! Now i stucked with another little problem. I have a table: ID____Name______Age_______City 1_____Robert_____20_______London 2_____Fabio______31_______Rome 3_____Hans______35_______Berlin 5_____Josh_______25_______London Now i don't know how to get a city which has the most population in this table. With my code: SELECT City, COUNT(Name) AS Population_number FROM Person GROUP BY City; I get …

Databases mysql
Member Avatar for primzon
0
156
Member Avatar for Lethugs

Hi, I have 3 tables Description Item Transaction DeID Name IID Name DeID TranNo Type IID Date 1 Printer 1 Stylus T10 1 1 Repair 1 2 Monitor 2 HP 1 2 Repair 3 3 ViewSonic 2 I need to count how many printers, Monitors etc. are in Item and …

Databases mssql printer sql
Member Avatar for darkagn
0
309
Member Avatar for primzon

Hello guys! Please help me with a little problem. I have one table(Person) where are some values. My current syntax is: SELECT Status, COUNT(Name) AS Number FROM Person WHERE Status = 'Married'; Result: Status_________Number --------------------- Married__________3 But I want to get the result for each status. That would be something …

Databases mysql
Member Avatar for JorgeM
0
198
Member Avatar for wordtechinc

CREATE PROC [dbo].[INRv2_GetAllSavedJobs] AS SELECT plm.jobcode [Job No],si.seminartitle [Seminar Title] FROM (SELECT DISTINCT pm.jobNo jobcode FROM inr_mailinglist pm) plm INNER JOIN (SELECT js.jobno, sm.seminartitle FROM inr_seminarmaster sm INNER JOIN inr_jobshedule js ON sm.seminarid =js.seminarid) si ON plm.jobcode =si.jobno ORDER BY plm.jobcode RETURN GO > This SP retruns [Job No] rows …

Databases mysql sql
Member Avatar for wordtechinc
0
285
Member Avatar for Joey_Brown

Hello; I need to normalize a mysql database by placing it in a 3NF. Could someone please recommend a good book, topic or a webpage from where I could start learning about this matter? Thank you very much! Joey

Databases mysql
Member Avatar for bkkrishna
0
160
Member Avatar for yohgurt

Could you help me please? I have a table List: List( cinema char (15) movie char (20)) I need to get movies which are shown in most cinemas and the number of times they are shown. If there are more then one movie shown the same number of times, there …

Databases mysql
Member Avatar for yohgurt
0
126
Member Avatar for mail.sujitkulkarni

Hi, I am experiencing irritating error (undiscriptive rather), when I want to insert a single statement into my db. Following is the code: protected void Button1_Click(object sender, EventArgs e) { SqlConnection dataConnection = new SqlConnection(); dataConnection.ConnectionString =@"Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\Database.mdf;Integrated Security=True;User Instance=True"; SqlCommand dataCommand = new SqlCommand(); dataCommand.CommandText=("INSERT INTO citylist(city_id,city_name,latitude,longitude,state) VALUES ((1, …

Member Avatar for mail.sujitkulkarni
0
3K
Member Avatar for cyberdaemon

i have here my search code. i want to search for firstname, and gender, but what if firstname is empty and gender is the one were going to search. but the gender is not filtering they just filter the name. any suggestions.. SELECT --ACCOUNT_CODE --HOSPITAL_CODE MRN ,CONVERT(DATE,BIRTHDATE)BIRTHDATE ,FIRSTNAME ,MIDDLENAME ,LASTNAME …

Databases mssql
Member Avatar for cyberdaemon
0
128
Member Avatar for Geli19

Hello everyone. I have build a simple MS Access database to keep track of volunteer info (contact, address, phone etc). I have a report that displays each record in a list: record1. Last Name, First Name, phone, email record2. Last Name, First Name, phone, email etc... What I want to …

Member Avatar for Geli19
0
191
Member Avatar for Pgmer

Hi, I have my data which looks like '0/1,0/2,0/3,0/4' or '0/1,0/2,0/6,0/3,0/4' I need to select min and max of the numbers for example for first example my output should be 0/1-0/4 and for second it should be 0/1-0/6.. I am able to get like 0-1 or 0-6.. Any help would …

Databases mssql
Member Avatar for Pgmer
1
114
Member Avatar for shihab2555

hi.I have created a table named stu_info.Here present 3 column named id,name,dept.here id is primary key and every column is varchar.Now i typed the following query Update stu_info set id='0904009' and name='mr. x' and dept='CSE' where id='0904199' and name='mr. y' and dept='CSE'; But it made the id=0 instead of 0904009.What …

Databases mysql
Member Avatar for shihab2555
0
135
Member Avatar for jackbauer24-2

So I just started learning MySQL. I am learning from [Tizag](http://www.tizag.com). They are using PHP files. Now I can see that the PHP files are slightly complex, I'm only 15. And they also recommended PHPMyAdmin. This GUI tool has many complicated options. So I quite don't know what to use. …

Databases gui mysql php
Member Avatar for jackbauer24-2
0
504
Member Avatar for trishtren

Hello i am having problems creating an update query, I have two tables both have an Title column and one table has an ID column. I want to take the ID from the table that has it when the titles of both columns match one of the titles against any …

Databases mysql
Member Avatar for trishtren
0
198
Member Avatar for shihab2555

I have created a table named student including column stu_id, stu_name & Blood_group.I created a delete button to delete rows and I used the following code when delete button is pressed.I take input using jtextfield.But this can only delete by taking input in stu_id.But now i also want to delete …

Databases mysql sql
Member Avatar for shihab2555
0
259
Member Avatar for trishtren

Hello, im a beginner at sql and i am struggling at comparing data from one table to another and then copying other data. *I have 2 tables both of which have 2 columns with the same name lets call them tableA and tableB. * tableA has a column id and …

Databases mysql
Member Avatar for trishtren
0
159
Member Avatar for cigoL..:)

Hi guys! I'm currently making an integration of 2 different web apps. I would to ask if is it possible to restrict adding duplicate data in your table. for Example i have two different tables from two different databases. App1_Invoice (from Web App 1 database) e.g. transno name amount App2_Invoice …

Databases mysql php
Member Avatar for cigoL..:)
0
313
Member Avatar for Khav

Greetings, I have two tables named 'copyright' and 'logs'. Table : copyright Field : Copyr_md5 Table : logs Field : md5checksum Problem 1 Say i have a value stored in `$md5check` in php , now i want to check if the value stored in `$md5check` is found in field `Copyr_md5`.If …

Databases mysql php sql
Member Avatar for Khav
0
247
Member Avatar for PriteshP23

I want to display table by default in ascendind order with dynamically changing header. Here is my code. It is displaying the rows unordered. It should be in ascending at first look and then can change by column. $order = (isset($_GET['sortCostCode']) && strcasecmp($_GET['sortCostCode'], 'desc') == 0) ? 'DESC' : 'ASC'; …

Databases mysql php sql
Member Avatar for PriteshP23
0
257
Member Avatar for caloy007

Hi everyone! I am pretty much new to Oracle it has only been 3 months or so I guess and I have a bit of a problem now. I'm running a query which will display the downtime of a machine. It will display the Start/End Time and its difference. The …

Databases oracle
Member Avatar for caloy007
0
206
Member Avatar for PriteshP23

I need to make time difference of 24 hours from registed time. In my database, there is column datelog with type "timestamp" Default value: CURRENT_TIMESTAMP I need the result if user with data: 2012-10-02 14:51:41 Test1 Test 2 User must not be able to register for next 24 hours. Thanks …

Databases mysql
Member Avatar for PriteshP23
0
229
Member Avatar for Smeagel13

Field defined as DECIMAL(5,2), trying to INSERT (250.00). When query is performed remotely to DB server, it fails with 'Out of range value for column...', when query is performed locally on the DB server, the query works. The query works remotely when the value being inserted is 226.24 (yes, that …

Databases mysql
0
92
Member Avatar for phphit

I have two tables (points, pointsmatch) Table 'points' have following fields id (int) seriesid (int) team (varchar) points (int) id seriesid team points 1 9 Chennai 4 2 9 Delhi 0 3 9 Kolkata 0 4 9 Mumbai 0 5 9 Bangalore 0 6 9 Mohali 0 7 9 Rajasthan …

Databases mathematics mysql sql
Member Avatar for phphit
0
665
Member Avatar for bibiki

Hey there, I have these three tables: A, B, and C. A has a one-to-many relation with both B and C. Right now, what I am doing is: I run a select query on A. I put the results on an array, lets say aArray. For each row in the …

Databases mysql
Member Avatar for nduduzo
0
286
Member Avatar for adam.adamski.96155

I have two tables, author and quote: author: AID, Name, YOB, YOD. quote: ID, AuthID, Content. I currently get all the authors with one query and as I loop through them, I run a second query to get the count of quotes that have the current AID: $sql = "SELECT …

Databases mysql
Member Avatar for Icone
0
296
Member Avatar for patsfans

I have two tables that I need to get the following information but I can't seem to figure out how to structure the query: Table 1 type show max min Table 2 model height width depth In Table 1 I have the following for the first row (as an example): …

Databases mysql php
Member Avatar for Icone
0
182
Member Avatar for diafol

SELECT t.* FROM (SELECT * FROM jobs WHERE `status` IN (0,1,2,3) ORDER BY `status` DESC, job_datetime LIMIT 11, 20) AS t That's a cut down sample of my sql. It was more complicated, but I've pared it down to this just to see why I was getting some strange numbers …

Databases mysql sql
Member Avatar for pritaeas
0
183
Member Avatar for Stardemos

i need a querry to add -- in the end of a table. for example if i have a table like tb name ze ad|ID| aa | -------------- 01|02|aa01 | 02|03|aa02 | how do i add -- to the end of all fields of aa column to be like aa01--\aa02--?

Databases mysql
Member Avatar for Stardemos
0
145
Member Avatar for adishardis

Hi, I'm wondering what type of mysqlfield would be advantageous for outputting the containing text as a bullit list in php and if the text should be formatted a certain way. I would be supergrateful for an example! :p Take care Adam

Databases mysql php
Member Avatar for adishardis
0
784
Member Avatar for newprimitive

Hello, I have problem with entering default values in MYSQL database. When i insert new record using phpmyadmin it works fine (empty fields get default value), but when i use the same query in my application (written in PHP), empty fields in html form don't get default value in MYSQL …

Databases mysql
Member Avatar for ffghjk
0
245
Member Avatar for breakid

Hi I have 2 Tables: CREATE TABLE IF NOT EXISTS `questions` ( `question_id` int(11) NOT NULL AUTO_INCREMENT, `createddate` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, `updateddate` timestamp NULL DEFAULT NULL, `active_flag` tinyint(4) NOT NULL DEFAULT '0', PRIMARY KEY (`question_id`), UNIQUE KEY `id_UNIQUE` (`question_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; CREATE TABLE `alarts` …

Databases mysql
Member Avatar for ammonsutherland
0
263
Member Avatar for NinjaMediaD

I forgot the way to write a query where you can psuedo name a table, for instance I have a table named user but I have to access it twice in one query and I want the results to be different. something like select user(a).f_name, user(a).l_name, user(b).f_name, user(b).l_name from user(a), …

Databases mysql
Member Avatar for NinjaMediaD
0
203
Member Avatar for Shodow

how to do this right Select DATE_FORMAT(EventDate, '%b %d, %Y') from details Order by STR_TO_DATE(EventDate, '%d-%m-%y') Oct 24, 2012 Oct 27, 2012 Oct 28, 2012 Oct 20, 2012 Dec 22, 2012 Jan 11, 2013 Jan 19, 2013 Nov 24, 2012 Dec 29, 2012

Databases mysql
Member Avatar for dcdruck
0
144
Member Avatar for G_Waddell

Hi, I'm writing a VB.net application that runs off a SQL database. If the application can not connect to the database or the connection has not been set up I'm giving the user the option to create the database on the SQL server instance of their choice I then create …

Databases mssql sql
Member Avatar for G_Waddell
0
346
Member Avatar for HunainHafeez

if i have table in database(sql server) and has 1500 records and i run 2 applications(at same time) that will retrieve 500 records each so how can i do this app1 will retrieve first 500 records app2 will retrieve next 500 records means no over lap SET Transaction Isolation Level …

Member Avatar for HunainHafeez
0
299
Member Avatar for davy_yg

Hello, I am trying to migrate sql file from one computer to another computer. And while trying to import the sql file these error appears why is it? I am trying to migrate sql from Joomla. Pencarian SQL: -- -------------------------------------------------------- -- -- Table structure for table `nafqc_usergroups` -- CREATE TABLE …

Databases mysql sql
Member Avatar for davy_yg
0
290
Member Avatar for TonyG_cyprus

For my project, these two queries don't work. The sqlite manual says to use 'qualified-table-name' but if I do (flist.fdata) an error is returned 'no such table'. As they are below no errors are returned, but the database table is not affected. if (isset ($_POST['del'])) { $id = $_POST['id']; $titl=$_POST['titl']; …

Databases php sqlite
Member Avatar for TonyG_cyprus
0
208
Member Avatar for TonyG_cyprus

Hi all,Anyone know of a decent free sqlite manager. One that will work with sqlite not sqlite3. Ive tried some and not been able to find one that works!

Databases sqlite
Member Avatar for TonyG_cyprus
0
193
Member Avatar for showman13

Hi All... I have a simple table with 2 fields in it... mem_id and ref_id For each mem_id in the table, there is an undetermined number of ref_id records... How do I get a listing of the unique mem_ids along with a number that represents the number of records with …

Databases mysql
Member Avatar for showman13
0
145
Member Avatar for Shodow

![wqe](/attachments/small/3/wqe.jpg "align-left") Select CustomerID,SalesID,CustomerName,Num_Of_Bottles,Price,Status from sales,customer where Date = DATE_FORMAT(NOW(),'%b %d, %Y') and CustomerID>0 Order by SalesID DESC

Member Avatar for pritaeas
0
242
Member Avatar for Riu 2009

Hi everyone, just wanted to know what type should i use in mysql database to store the urls (for linking purposes) of videos(from youtube,vimeo) and slides (from slideshare)...i just want to store the urls not the whole video..for tht i wud use directory/ file functions.. please help... helpful comments will …

Databases audio mysql php video
Member Avatar for Riu 2009
0
234
Member Avatar for nickg21

Hey everyone, I'm using CTEs to try and get the totals of two different criteria queries that I want to group by Month depending on the associated Inquiry Date. Here is what I have right now; ;With CTE(total, InitDate) as ( SELECT count(Inquiry.ID), Inquiry.Date from Inquiry Inner Join Inquirer on …

Databases mssql
0
82
Member Avatar for niladri.prima

Hi All, In a table (dbo.UnquotedContacts) I have few columns from where I am trying to extract few columns. But My crcern is as follows IF the field 'Date_ABC_Updated' is NOT empty AND the field 'subscribed_to_Business_XL' = 'SUB', the contact has an ACTIVE BXL subscription IF the field 'Date_ABC_Updated' is …

Databases mssql
Member Avatar for BitBlt
0
112

The End.