7,494 Archived Topics
Remove Filter ![]() | |
I have a table with 3 columns, a record_num, a date field, and a description. In the date field there can be some rows that have a distinct date and others that have the same date. I wanted to take a look at all the rows that have dates that … Databases mysql | |
Hello guys, I am having a weird problem. I cant understand and i have spent almost 2 hours in finding the problem. Well,Actually I have a table of id,date,comment. id and date are composite primary key. so id always starts with 1 everyday. now i want to find the max … Databases mysql | |
Hi, I need to print all the orders with the month in the Monthly Order Report.How should I do it.Can someone tel me how to do it... This is my query.Order date should equal to the relavent month... [code] $this->result = mysql_query("SELECT * FROM tbl_order,tbl_order_items WHERE tbl_order.order_id=tbl_order_items.order_id AND tbl_order.order_status='accepted' AND … Databases mysql | |
Greetings, I installed MySQL 5.1.48-2 on Fedora 13 64bit. Whenever I tried to connect using the terminal by typing : [B][user@work ~]$ mysql[/B] I get the following error: [B]ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)[/B] I also installed MySQL on Red Hat Enterprise 5 … Databases mysql | |
i have a Problem to know how much time the server take to execute an SQL command . I user Oracle Db and SQL DB thanx | |
I just got postgresql & pgAdmin III up and running. I'M trying to start the book "Simply SQL" so how do I go about getting to .sql files for the book into pgAdmin? Thanks for any and all replies. Databases mysql postgresql sql | |
how do i run a query for a variable with multiple values? i've been told a loop is not the right way to do it, which is the way i've been doing it and it has worked. I assumed putting it in a foreach loop would accomplish looping the query … Databases mysql | |
hi all, i have a little issue with SUM query from this table UNIQUEID Date Production engine1 01/12/1999 1440 engine1 01/01/2000 6061 engine1 01/02/2000 5152 engine1 01/03/2000 5347 engine1 01/04/2000 4642 engine1 01/05/2000 5264 engine1 01/06/2000 5247 engine2 01/07/1995 561 engine2 01/08/1995 3066 engine2 01/09/1995 2133 engine2 01/10/1995 2282 engine2 … Databases mathematics mysql sql | |
[CODE]SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[createaccount] @account VARCHAR(15), @password VARCHAR(32) AS SET NOCOUNT ON DECLARE @DateActivated AS CHAR(8) IF NOT EXISTS (SELECT account FROM ACCOUNT_TBL WHERE account = @account) BEGIN INSERT INTO ACCOUNT_TBL (account, [password], id_no2, isuse, member, realname) VALUES (@account, @password, @password, 'T', 'A', … Databases mssql | |
This is the error i get when im trying to Run my AccountServ.exe it pop ups an error DB LOG Connect Failed. SQLSTATE:IM002 error:[Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified Databases mssql | |
i am making a webstore and it has a table that has all the items in it. like each item has its own row in the table called like "items" or something right and each column is specific to all items. but im lost what to do with orders. i … Databases mysql web-design | |
hey all I have these lines [CODE] create table Singers(SingerName varchar(30),picture text,id int primary key auto_increment); create table Songs(id int primary key auto_increment,sid int,foreign key(sid) references Singers(id) ON DELETE CASCADE); [/CODE] In situation I want to delete a Singer for example who has the id->1 from Singer's table automaticaly to … Databases mysql | |
Hello! I have a table with the structure you can check at [URL="http://spreadsheets.google.com/ccc?key=0Ahb705_66NMOdG5RM0stQU5wVC1JUmRBbWhLeDRyM2c&hl=ca"]http://spreadsheets.google.com/ccc?key=0Ahb705_66NMOdG5RM0stQU5wVC1JUmRBbWhLeDRyM2c&hl=ca[/URL]. The table has many more rows but no more columns. Is there a way to select the rows like select all the fields from Table from row where Family is Tinamidae to the next non empty row … Databases mysql | |
hello, for my application I have created a database containing a table where my clients data is stored before they are allowed to use the website. When they are allowed, the info on this table has to be transferred to 3 different tables, using the insert...select-statement. Doing this I don't … Databases mysql | |
We have 3 shifts running at our plant, day 0720 - 1520 swing 1520 - 1120 night 2320 - 0720 I have a table storing the bags packed on each shift, and now need to display the team (tech, packer_l, packer_r etc) with the greatest number of packed bags depending … Databases java-swing mysql | |
I have to columns Positive and Negative. i use this as a rating system. e.g. For example if Positive is value 2 and Negative is value 1 and i subtract. Then the total would be 1. i have a variable $order. if i did $order="(Positive-Negative)"; I now that is incorrect. … Databases mysql | |
Hello all I have a question related to a design problem I have (not sure how important this is to the question but I use Jdeveloper 11g 11.1.1.2.0 for database development and also application development, using adf web fusion) I have a table called Stores that represents physical stores. This … Databases database-design gaming web-design | |
Greetings There are many topics on this issue over the internet but None of them addresses this issue properly, so I couldn't find a solution to the problem. I installed: *Oracle Database 10g Express Edition* After the installation was done, I opened SQL Command Line and I used the command … Databases oracle | |
hi all! I need to make a form in Ms-Access as EXE file. So that the file can be runned without opening Ms-Access. I know that, it is possible in Vbasic but whether it is possible to do in Ms-Access. Thanks Databases microsoft-access | |
I'M new to SQL and I'M reading the book "Simply SQL". I'M running Ubuntu Linux and I downloaded MySQL Workbench. I also downloaded the source .sql files for the book. I need some help getting started. How do I get the files into Workbench so I can follow along with … | |
Ok I am still unable to create a foreign key restraint in my database. I know I posted this in another post, but after 3 or 4 days with no responses, I wanted to reword and properly explain my problem. I executed two show create table commands for my two … Databases mysql | |
Hi all ! I 'll a lucky guy if there 's someone who had experiences in using SQL Developer - connected with Oracle Database ( 10g Express ) ^^ I created a simple TRIGGER to print something out, for example : [CODE] create or replace trigger AUTO_OUT before insert on … | |
Hi, I have a table which stores 2 values as follow REC_TEST Id_Customer Id_Apply Id_Apply can take 2 values, "YES" or "NO" if he passes the test I've designed or not. I want to know if there is a way to take all "YES" and all "NO" from the same … Databases oracle | |
How to calculate no of days between two dates? eg: how i can calculate number of days between 1/12/2009 and 10/06/2010.(dd/mm/yyyy) Databases oracle | |
Hey guys, What would the best / most efficient way to incorporate an achievement system be for a MySQL database? I have a users table with users in it. Should I make a whole new table for achievements called "achievements"? How would I most efficiently link this table to the … Databases | |
I just got a new book on sql. So what software do I need to get started to and play around with these statements and load the querys supplied by the book. Thanks. By the way I'M running Ubuntu Linux | |
Dear SQL sharks.... Please somebody help me with this struggle. I have been searching the web for hours now. I have a table with sales data. In this table i have a columne called SalesAmount, CustomerName and SalesDate(the format i smalldatetime) Now I would like to retreive all the records … Databases mssql | |
hello every one I am a student of CS and in this semester i have a subject DBMS, i haven't do any programming with sql till now, i am completely new to it, here i want to know that about different DBMS software. in our coll we have oracle 8i, … Databases oracle | |
hello i want to read 12 values (datetime data type) named s1,s2,s3,s4....,s12 from database. compare these 12 fields with current date. if difference lies between 10 days i want to show corrosponding result. please tell me code for this in c# Databases mssql | |
How to create database in oracle. Is the tablespace and database same? Do we need to install client from oracle 9i? I have the code as follows Create Tablespace SCT_DATA Datafile 'sct_data.dat' size 10M online; and i come across the error as follows Create Tablespace SCT_DATA * ERROR at line … Databases oracle | |
I have table that has students classes and grades. They are allowed to fail a test twice but if they fail twice they have to retake the couse in which they have two more tries. I would like to show only the most recent grade. Here is the table structure … Databases mssql | |
To help increase sales, your management decides to give customers a one-time bonus. Here are the credit rules: for 1-15 credits, add 1 credit for 16-30 credits, add 2 credits for 31+ credits, add 10% and round up (10% of 35 is 3.5, rounded up to 4) Write an update … | |
I have a table that looks like the one below: Name Score1 Score2 Score3 TOTAL Dan 71 85 23 ? Tom 58 84 87 ? sam 76 65 64 ? I dont know d command that will dynamically get the total score for each student and put it in the … Databases mssql | |
Hi, I need to update the product quantity in the product table according to the quantity which the customers ordered...Since I am new to this field I dont know how to do it with a query. This is what I want to do in more details.As the administrator checks for … Databases mysql | |
Hi, I looked for any posts on this but couldn't find any, it should be pretty easy. I have a Company table with parent_id that points to a company itself. I want to get the names of the parent, if any. So if I have my table as cpy_id cpy_name … Databases mysql | |
Hi experts, I have a problem which is I can't write arabic text as values of table , here is the steps I have done , please help me and correct me if I am mistaken this is what I did: ************************************************** set names utf8 COLLATE utf8_general_ci; create database see; … Databases client-server mysql | |
Im getting an sql error saying "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 '' at line 1" These are the 2 queries... $sql = "DELETE FROM tbl_category WHERE cat_id=$cid"; $sql2="INSERT INTO tbl_sales … Databases mysql | |
Hi i am new in oracle. i am having a problem. i need to collect datewise max time and min time from my table "dailyAtt" here is the data formate in my table.. ID Code Ptime 1 2570 14/10/2010 1:00 Pm 2 2570 14/10/2010 2:00 Pm 3 2570 15/10/2010 7:00 … Databases oracle | |
I'm trying to create a Web Form Application for my class final. I downloaded the zipped file and extracted it of course. When I go to Data/Add New Data Source and follow the prompts in the Wizard I get to the screen that you choose your Database Objects, I get … Databases assembly microsoft-access open-source | |
Can anyone help me? Can i know what is the difference between superkey and primary key? what is actually candidatekey? Databases mysql | |
I"m very new to SQL but need to insert LOT numbers to inventory. I have my table (cards) and my column (lot). The cards come in lots of 25 units. Each lot increments by 1. So rows 1-25 would have lot 0001, 26-50 would have a lot of 0002, etc. … Databases mssql | |
Hi I am using Navicat and have two tables that have a one to many relationship. I have a table called rlbbulbs and a table called rlbbrand. brandID is the primary key in rlbbrand and is supposed to be the foreign key in rlbbulbs. Navicat has a way of creating … Databases mysql | |
userid | personID | positionID 712 | 912 | 8 713 | 814 | 15 516 | 811 | 9 712 | 912 | 9 713 | 814 | 15 from the above table i have to find out userID of the person who has different multiple postion. i.e my … Databases mssql | |
Briefcase application Access 2003 two way replication Are there any open source databases that allow two way replication exactly the way Access 2003 handles it? I have a desktop app that I would also like to have live on the web but I have to use Open Source software like … Databases mssql mysql open-source web-server | |
I have the following scenario: There are several trips, each with several people, and each people has several data, like... idk., height, weight, hair color, and of course passport number, name... So the point is to retrieve these from several sources, store them, then make statistics. I'm only interested in … Databases apache | |
I have an error I don't understand how to get rid of. I want to compare a string consisting of: ID + " " + date + " " + time + ":00" to a string in the database (data type = text). Here's an example of what I fetch … Databases mssql | |
Hi all, I try to view latest date and amount from history table for each branch (branch table :viscawangan). But accouter problem to view [B]amount [/B]value. [CODE] SELECT b.kod_cawangan,b.nama_cawangan, MAX( a.tkh_data ) AS tarikh_data,[B]a.amount[/B] FROM history a, viscawangan b WHERE a.kod_caw = b.kod_cawangan GROUP BY kod_caw [/CODE] Here i give … Databases mysql | |
Hi all I'd just like to know if it's possible to specify two different values for the same column in a WHERE in MySQL. For example [CODE=mysql]...WHERE column1 = 0 OR WHERE column1 = 20[/CODE] That's what I'm using at the moment but it only returns a result where column1 … Databases mysql | |
I am in school and as a project I am building a mock Database from SQL Statements. I like having clean code and since I am at home building these statements on notepad to execute at school later I have a questions about white space. When I use CREATE TABLE … Databases data-structure | |
Does anyone know why the following subquery is using filesort and scanning all rows in the table according to EXPLAIN? I am trying to get the total of the top ten scores and the result is fine. [CODE]EXPLAIN SELECT SUM( score ) AS top10_total FROM ( SELECT score FROM answers … Databases mathematics mysql sql |
The End.