7,494 Archived Topics
Remove Filter ![]() | |
Please people, i'm trying to create a chat room, and .... I jst nid some guidance pls Databases mysql | |
Hi all, I'm having some trouble inserting records into my MySQL db because of how I've set up my foreign keys. The problem is, I don't know how to fix it to make it do what I need it to. Here is my schema: http://imgur.com/t5bVt Here is my php code … Databases mysql | |
The idea is to check whether if phone number already exists(data table). If the number exists, then it will create a new row under another table(output table) with the customer ID for that customer. Table data is where pre-loaded phone numbers are stored. Table input is the table where feed … Databases mssql | |
I'm trying to select rows from a table that meet a bunch of criteria, but one of the criteria is that a row doesn't already exist with two matching columns both being true at the same time. For example, suppose table t1 has columns: a, b, c and d Here's … | |
trying to create table in Access2007. CREATE TABLE user (id Text(8), last Text(25), first Text(20), class Text(10), dob DateTime); but table is not being created. ERROR: query must have at least one destination field. Databases microsoft-access | |
Hello, used tech: C# 4.0, sql-Server 2008 i have this stored proc: -- ================================================ -- Template generated from Template Explorer using: -- Create Procedure (New Menu).SQL -- -- Use the Specify Values for Template Parameters -- command (Ctrl-Shift-M) to fill in the parameter -- values below. -- -- This block … Databases mssql | |
Is there any way to set the long_query_time for the slow query log to less than < 1s? We consider anything over 0.5s something wrong. Or can you recommend any MySQL monitoring software that can handle a super high load without a super amount of storage space? Databases monitoring-software mysql storage | |
I am using Decimal data type to store time like 1.30(1 hour 30 min),0.40(40 minutes) in MySQL. I want to calculate total time. When I use SUM function it was giving result in unexpected way. example: 1.30 + 0.30 = 1.60 -> SUM function gives like this. But I want … Databases mysql | |
Can anyone suggest a good sqlite3/php tutorial for beginners? I've been using sqlite, and now wanting to learn sqlite3, am looking for a good tutorial but the only ones I seem to find are either assuming you know version 3 already, or are for command line. Databases sqlite | |
hi... i want to insert data from array using mysql from php..and now i using this code : for ($i = 0; $i < count($data1); $i++) { $insert_sql = sprintf("INSERT INTO detail_paket (id_paket, menu_paket) select paket.id,'\"%s\"' from paket where paket.nama_paket='$nama_paket'",%data1[$i]); mysql_query($insert_sql); } data1 is the array.. what is the correct … | |
Hi, I have 3 tables Description, Item, Transaction Description Item Transaction DeID Name IID Name DeID TranNo Type IID Date 1 Printer 1 Styl T10 1 1 Repair 1 2 Monitor 2 MPS 1 2 Repair 3 3 ImpSonic 2 I need to count how many printers, Monitors etc. are … | |
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 | |
Hello. I have a larger database that I want to import and I cannot do that using phpmyadmin. I tried to do this in many possible ways by command line, but I get message 'wrong syntax'. I have Windows Vista, MySQl version 5.5.24, wamp server. The path to mysql.exe is: … Databases mysql windows-vista | |
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 | |
so i want to create a database which will have information about item. so first user will have to choice main_catgory, than sub_catgory, than item info. so for ex: ------------ main_catgory ------------ apparel home decor beauty ----------- sub_catgory ------------ male female furniture accessories bath and body hair care ----------------- item … Databases | |
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 | |
I am not able to restore sql file from linux command prompt. I have used the below command. Here is the message.No table is restored. I am running this in my local machine adminuser@virtualboximagescom-VirtualBox-34s7dkv4:/$ mysqldump -u root -p replication_test </home/adminuser/Downloads/rp.sql Enter password: -- MySQL dump 10.13 Distrib 5.5.28, for debian-linux-gnu … | |
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 | |
good day, i have a table named information i created a stored procedure that will search for thier name, "firstname","middlename" and "lastname" that 3 field is concatenated and named it fullname My problem is that i want to count the result of my query that count the total number of … | |
Greetings, I'm developing an HRM application and such application including functionality like hiring decision, moving decision "for example, moving an employee from a department to another" etc. All such types of decisions done throgh the same Windows Form and each type of decision has a different data from the other … Databases mssql | |
Hi All, I have 44,000 data in a table (dbo.IA_Subscription) where I have only 2 columns; one is ID and another is Magazine_Type ID filed is filled with contact_ID and Magazine_Type is filled with 3 Magazine e.g. Papaer Type, Digital Type and Web Type. Now contact_ID is not unique...one contact_ID … Databases mssql | |
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 … | |
I used these two queries for this database and the resutl was the same in both case so what the purpose of "persons.firstname" or "orders.ordername" what the difference ?? select** persons.firstname**,orders.ordername from persons inner join orders on persons.p_id=orders.p_id select **firstname,ordername** from persons inner join orders on persons.p_id=orders.p_id CREATE TABLE Persons … Databases | |
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 | |
I want to select persons who has orders =<150 tried this query but of course it wrong anyone can point me to the correct one ? using Oracle or SQL select firstname,cost from persons,orders where cost=100 group by firstname CREATE TABLE Persons ( P_Id int NOT NULL PRIMARY KEY, FirstName … Databases oracle | |
![]() | 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 dear T-SQL community, I am working on some exciting project but my problem is not exciting and I have not been able to find a valid solution... (all related fix are arround BCP or BULK INSERT). The server where the DB is located is not allowing BCP / Bulk … | |
Please everyone share a query for all as SQL Exercises 1. nested SQL statements Databases sql | |
I have a database on both the servers with different table values and a third server with the same named db and tables in MYSQL server1-db1-table1 table1 ID Number 1 101 2 102 3 103 server2-db1-table1 table1 ID Number 4 201 5 202 6 303 How can I merge these … Databases mysql | |
How to change collation of a mysql table which is created on MYSQL 4.1.22 ? I used following query ALTER DATABASE `testdb` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci ALTER TABLE `testtab` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci It displaying following error messages ****Error SQL query: ALTER DATABASE `testdb` DEFAULT CHARACTER … Databases mysql | |
What I want to do is to select the orders that are hapened in 2001 ONLY which is "order3" here whats the SQL statment shlould be written HOW I can catch the year part from this full date ??? CREATE TABLE Persons ( P_Id int NOT NULL PRIMARY KEY, FirstName … Databases | |
hey I have table that has date column and I want to select just all the sales that hapen in the first three month between 1/1/2012 to 30/3/2012 How I am able to do this select query ?? Databases oracle | |
hi I need expliantion of Joins types and as much as example for it Thanks Databases | |
Hello everyone. I am building a small database that will hold information about volunteers and their talents. I have created a search form, in which the user can enter a keyword and it will search the tables for any match. Currently I am using a criteria of: Like "*" & … Databases microsoft-access seo | |
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 | |
I'm a bit of a SQL newbie so I'm wondering if you can help me. I've looked on Google it for some time, but maybe I'm not using the proper terms. Here is my question: I have TableA that has the following columns: ID(PK), location, departA, departB. I would like … | |
There are 5 columns in my table structure and they are: 1) Id - PK 2) Name 3) IdentityNo1 4) IdentityNo2 5) PassportNo Since duplicate records are inserted into the table I am attempting to remove the duplicate records. What makes the records unique is the IdentityNo1, IdentityNo2 and Passport … Databases mssql | |
I'm working on a database project. I avve to build a DB for medical record (hospital) but I'm not too familiar with hospital stuff. I have to come up with entity sets with their attributes, build an ER diagram and then do a Query with GUI included. What I need … | |
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 | |
I did not really understand the benifit of the alias clause... this was in the w3shools tatourial with alias SELECT po.OrderID, p.LastName, p.FirstName FROM Persons AS p, Product_Orders AS po WHERE p.LastName='Hansen' AND p.FirstName='Ola' with out alias SELECT Product_Orders.OrderID, Persons.LastName, Persons.FirstName FROM Persons, Product_Orders WHERE Persons.LastName='Hansen' AND Persons.FirstName='Ola' why we … Databases oracle |
The End.