2,403 Solved Topics
Remove Filter ![]() | |
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 =) | |
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 … Databases data-structure mysql web-server | |
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 | |
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 | |
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 | |
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 | |
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 … Databases asp lan-wan microsoft-access sql | |
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 | |
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 | |
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 … | |
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 | |
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 … | |
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 | |
![]() | 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 ![]() |
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, … Databases open-source sql visual-studio | |
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 | |
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 … Databases microsoft microsoft-access seo | |
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 | |
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 | |
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. … | |
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 | |
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 … | |
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 | |
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 … | |
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 … | |
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'; … | |
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 | |
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 | |
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 | |
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 | |
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 | |
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 | |
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): … | |
![]() | 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 … |
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 | |
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 | |
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 | |
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 | |
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 | |
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 | |
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 … | |
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 … Databases asp.net client-server mssql sql | |
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 … | |
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']; … | |
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 | |
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 | |
 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 Databases mysql vb.net visual-studio | |
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 … | |
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 | |
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 |
The End.