7,494 Archived Topics

Remove Filter
Member Avatar for
Member Avatar for Silent-Regret

Okay, I have a table called InGameTime with the following columns: CharName varchar(30) InTime datetime OutTime datetime HH int MM int SS int I am trying to make a trigger, that will once data is updated, it will update the HH,MM,SS to add the total hours, minutes, seconds spent in …

Databases mssql
Member Avatar for Silent-Regret
0
239
Member Avatar for Derice

Column A (datetime) ----------------------- 2011-04-01 00:00:00.000 2011-04-01 00:00:00.000 2011-04-09 00:00:00.000 2011-04-01 00:00:00.000 2011-03-31 00:00:00.000 Column B (datetime) ----------------------- 2011-03-25 15:45:56.457 2011-03-25 15:52:37.933 2011-03-25 15:54:37.197 2011-03-25 16:05:30.023 2011-03-27 00:43:23.713 When i try to query the above record [CODE] Select * from table where A between '1900-01-01' and '2012-01-01' [/CODE] this work …

Databases mssql
Member Avatar for Derice
0
175
Member Avatar for saj_amo

Hi someone help in distinct command i have created 2 tables department and balance, 1. Department dep_id, dep_code, dep_name 2 001 Bloom Room 3 002 Tahmeco Th 4 003 Kniting 2. Balance dep_id, Date, Amount 2 01/Mar/2011 10000 3 02/Mar/2011 15000 4 20/Mar/2011 25000 3 22/Mar/2011 10000 2 26/Apr/2011 27000 …

Databases mssql
Member Avatar for Knvn
0
83
Member Avatar for mohansinhf

I am having records in a field (field_id) of a table (in mysql database), which is having ID stored per line, for example [B] 1 2 3 10 11 13[/B] above is one record, and I have many records similar to that. and, when I am writing the query [B]SELECT …

Databases mysql
Member Avatar for mohansinhf
0
82
Member Avatar for RJ_Dev

Hello Everyone, Specifications:- Yahoo Small Business Domain. MySQL Version:- 4.1.14 phpMyAdmin Version:- 2.11.9.6 The problem I'm facing is that I've a created a database in phpmyadmin and there are two users:- one is the username I created for myself and the other is yroot. I can't grant the username I …

Databases mysql wordpress
Member Avatar for aawisdom
0
501
Member Avatar for jayanandan

I am designing my own site to learn English words. Attached is the image of my DB design. Can some one suggest/direct me to design the DB more perfectly?

Databases mysql
Member Avatar for jayanandan
0
139
Member Avatar for debasishgang7

Hi all i am trying to make a script which will select nth (1st,2nd blah blah..)highest record from Database. Suppose i have a table with two columns "id" and "score".And for example i wanna select the "id" of member with the 5th highest score?? I am doing this with php …

Databases mysql
Member Avatar for debasishgang7
0
136
Member Avatar for jmckumar

<?php $con = mysql_connect("localhost","root",""); if (!$con) { die('Could not connect: ' . mysql_error()); } mysql_select_db("db_ldlp", $con); $result = mysql_query("SELECT * FROM LB_table"); echo "<table border='8' color='white' > <tr> <th>Person Id</th> <th>Name</th> <th>Participant Status</th> <th>Organiztion</th> <th>Arrival Date</th> <th>Departure Date</th> <th>No Of Days</th> <th>Room Status</th> <th>Room Charge</th> <th>Registeration</th> <th>Total Expense </th> </tr>"; …

Databases mysql
Member Avatar for jmckumar
0
153
Member Avatar for moone009

Does anyone know how to turn this excel function into an sql statement? The function looks at my address and route. If it is different than the one prior it increments column G by 1 if it is the same it keeps column G as the same number. Ive been …

Databases mssql
Member Avatar for Fortinbra
0
101
Member Avatar for Venom Rush

Hi all I've been trawling the net trying to find out how MySQL would handle partitioning if I don't specify any values for RANGE. My code is as follows: [CODE=MySQL]PARTITION BY RANGE(vehicle_id) PARTITIONS 10()[/CODE] The table will most likely end up having roughly 50 000+ records. Can anyone perhaps give …

Databases mysql storage
Member Avatar for debasisdas
0
211
Member Avatar for deolalkar_pooja

I created the following tables and inserted few values. create table books(bookid integer primary key, booktitle varchar(20), year integer, publisherid integer foreign key references publisher(publisherid), price integer, number integer) create table publisher(publisherid integer primary key, publishername varchar(20)) create table author(authorid integer primary key, authorname varchar(20)) create table bookauthor(bookid integer foreign …

Databases client-server mssql sql
Member Avatar for deolalkar_pooja
0
209
Member Avatar for ashvamedh

hey friends... i am using fedora 13... when i am trying to access a database i am getting this error-- mysql> use bgm_scr; ERROR 1044 (42000): Access denied for user ''@'localhost' to database 'bgm_scr' --------------------------------------- i also tried accessing by switching to superuser.. but i get this error -- [CODE][user@localhost …

Member Avatar for davidchilders
0
209
Member Avatar for Acute

Hello there, I'm selecting only one column, so if I have 20 rows in result, how to merge all these rows into [U]one row[/U] where all the rows will be [U]comma separated[/U]? Thnx in advance

Databases mysql
Member Avatar for smantscheff
0
94
Member Avatar for charlybones

Ok, so after hours and hours of testing and searching online I'm almost convinced that this can't be done, but I'm asking here for help maybe someone can give me any idea as to why this isn't working. I'm doing this query: [CODE]SELECT * FROM( (SELECT t1.PAG5 from table1 t1 …

Databases microsoft-access
Member Avatar for boblarson
0
135
Member Avatar for Hyo

I have done this query : Balance:[Medical]![Price]-750 but calculation total didn't show up , and it show up to enter parameter value? help me....

Databases microsoft-access
Member Avatar for boblarson
0
91
Member Avatar for adamworld

I am working on a site and I want to be able to query the appropriate table based on their location. For example, if they input they live in NY, it should query the NY table. If they input they live in CA, it should query the CA table and …

Databases mysql php
Member Avatar for adamworld
0
94
Member Avatar for jrotunda85

I keep getting the following error whenever I try to run this query on my "spot" table: [CODE]#1054 - Unknown column 'a.Longitude' in 'field list'[/CODE] The weird thing is though that the column DOES in fact exist, is spelled the same way, and has thousands of rows of data. Even …

Databases mysql php
Member Avatar for jrotunda85
0
114
Member Avatar for nychick

Not sure if this is the right forum for SQL statement problems. I've searched all over but don't know how to output formatted SQL queries. Like Selecting the first letter of the first name and then last name with proper spacing.

Databases oracle sql
Member Avatar for pratik_garg
0
166
Member Avatar for JerieLsky

Hi, I'm having a problem on how to query from the following tables. Here are the tables. PATIENT: PK - PatientNo - FirstName - LastName - MiddleName - Address - Age FK - PageNo PAGE PK - PageNo BOOK PK - BookNo BOOKPAGE 'Junction Table PK - BookNo PK - …

Databases mysql sql
Member Avatar for pratik_garg
0
145
Member Avatar for arsheena.alam

Hi, I have a variable @FranchiseId declared in my stored procedure If I try the following select command, will it work???? SELECT @FranciseId=(select FranchiseName FROM franchise WHERE username=@username),username FROM MyTable I hope you Understood My problem!!

Databases mysql
Member Avatar for arsheena.alam
0
127
Member Avatar for serkan sendur

Copy a table from one database to another database in another ms sql server using sql server management studio : If your table was in the same ms sql server but in another database, you would copy it using t-sql like this : SELECT * INTO NewTable FROM existingdb.dbo.existingtable; However, …

Databases mssql sql
Member Avatar for mrroad
0
843
Member Avatar for kay21

Hi everyone, I need help in determining functional dependencies of the given entity sets below. I have also included my answers, please check and advice. Thank you. [CODE][B]OWNER[/B] ([B][U]Owner_SSN[/U][/B], Owner_Name, Owner_Address, {Owner_TelNo}) Owner_SSN -> Owner_Name Owner_Name -> Owner_Address, Owner_TelNo [B]CAR[/B] ([U][B]Car_RegNo[/B][/U], Car_Make, Car_Model, Production_Year, First_Registration, Fuel_Type, Pax_Capacity, First_Purchase_Price, Original_Price) Car_RegNO …

Databases
Member Avatar for kay21
0
138
Member Avatar for Venom Rush

Hi there I'd like to know if it's possible to combine an update and insert query into one query. What I'd like to do is insert new data into one table and update a colum in another table at the same time. For example, there are 3 different baskets (puppy …

Databases mysql
Member Avatar for nuraini
0
10K
Member Avatar for VipinDugaya

Hi , i am vipin facing a problem in mysql table i hava two table, primary key of one table is used as a foreign key of another table. but when i inserting some values in first table it gives [B][COLOR="Red"]error:Cannot add or update a child row: a foreign key …

Databases mysql
Member Avatar for debasisdas
0
365
Member Avatar for adamworld

I am trying to store millions of records with address, city, state, zip, etc. I originally had one table with 17 different fields with the primary key being id. However, I soon realized after inserting almost a million, the website began to lag and was slow. What is the best …

Databases mysql php
Member Avatar for debasisdas
0
264
Member Avatar for anip1610

hello!!!...i want to start program a to store video record to database using vb2008 and mysql..but i dont know how to start since i still new to this whole thing about programming..can someone help me???

Databases mysql video
Member Avatar for debasisdas
0
105
Member Avatar for wewehalim

Hi, I am running this line of code to insert some data into table. I am using select case on one of the data. When I run it, this error was generated: "Syntax error (missing operator) in query expression 'CASE dbo_tblFinanceApp.UPADisclosed WHEN 0 THEN 'Undisclosed' WHEN -1 THEN 'Disclosed' END' …

Databases microsoft-access
Member Avatar for wewehalim
0
250
Member Avatar for like_to_learn

hai, My requirement is given below. In my application one LOV is there to show Insured names.In that if we query for the name like ahemd's% then it is showing wrong(junk) data..................So,my question is how to add single quote to already existing single quote.........................I tried in many ways but I …

Databases oracle sql
Member Avatar for pratik_garg
0
3K
Member Avatar for shruti1210

Create a trigger for insert/update/delete to the table shruti. if insert/update/delete happens then trigger needs be executed.

Databases oracle
Member Avatar for pratik_garg
0
95
Member Avatar for maichy

hi all, can someone please help out.i am using php to insert data into an oracle 11g database.i have a table bus which has a foreign key franchisee name,i want when i am filling in the form,at the text box containing the franchisee name instead of inputting anything i have …

Databases oracle
Member Avatar for pratik_garg
0
270
Member Avatar for 54uydf

I get the error #1005 - Can't create table 'db1.#sql-9e8_2c1' (errno: 150) (<a href="server_engines.php?engine=InnoDB&amp;page=Status&amp;token=3947cba14f7c39305d6f460b76698c5e">Details...</a>) I have 2 tables that I want to connect as a 1-1 relationship. table1:[U] a ,b[/U] ,c ,d table2: [U]a ,b[/U] the plan is that table2 will hold the keys of some of the records that …

Databases mysql
Member Avatar for 54uydf
0
127
Member Avatar for waqar100

in a table having the fields of starttime & endtime ,I want to fetch only the records having starttime & endtime of same days.

Databases mssql sql
Member Avatar for buddylee17
0
106
Member Avatar for moone009

create table #TempRouting( id int, routetype char(4), routesequence int) insert into #TempRouting (id,routetype) values (1,'MON') insert into #TempRouting (id,routetype) values (1,'MON') insert into #TempRouting (id,routetype) values (2,'MON') insert into #TempRouting (id,routetype) values (3,'MON') insert into #TempRouting (id,routetype) values (4,'MON') insert into #TempRouting (id,routetype) values (5,'MON') insert into #TempRouting (id,routetype) values …

Databases mssql sql
Member Avatar for moone009
0
186
Member Avatar for mcld

Please I need help, I don't know what I'm doing wrong here, [CODE] $query=( "UPDATE $tblname SET totwrong =".$wrongAnswers."', SET Test_score ='".$percentage."' WHERE UserName = '".$UserName."'"); [/CODE] It does not update the table, please please

Databases mysql php
Member Avatar for debasisdas
0
107
Member Avatar for FlowerPower1

Does anyone know how I would go about storing something from my database into a variable to use elsewhere on my PHP code?

Databases mysql php
Member Avatar for debasisdas
0
96
Member Avatar for hyuugurt

Hi, I'm building out a social network system, and when trying to pull user info for a user's friends, I'm stumbling into a problem with the query. The issue is I'm trying to keep the lookup table from listing redundant entries. For instance, [CODE]FRIENDS TABLE ------------- uid | fid ------------- …

Databases mysql
Member Avatar for tcatt
0
153
Member Avatar for 54uydf

Hey, the data in my DB isn't going to be in english, and I'm wondering if I should name the tables and the fields not in english as well, or there might be problems later when using the names in PHP or SQL code? any one had experience with that?

Databases mysql
Member Avatar for smantscheff
0
126
Member Avatar for gspeedtech

I have a stored procedure that retrieves customer data from one table and calls 2 UDFs to perform a calculation on data obtained from joined tables for accounting data. The calculation needs to be performed for every row based on matching criteria of previous records. The query returns very few …

Databases mssql
Member Avatar for Fortinbra
0
234
Member Avatar for kay21

Hi everyone, I have a couple of questions regarding ER to Relational Schema Translation. 1. Do I treat a subclass entity as strong entity 2. Do I need to merge entities where most of the attributes are the same Please advice. Thank you

Databases
Member Avatar for kay21
0
288
Member Avatar for 54uydf

Hey, I think my DB has very standard parts and I don't want to reinvent the wheel again so I wonder if there are some ready and widely used DB templates for what I need - My database is all about customers, so I got a bunch of tables related …

Member Avatar for BitBlt
0
143
Member Avatar for ryan1987

table: hometeam awayteam homepoints awaypoints leeds man u 3 0 leeds man u 3 0 man u leeds 0 3 i want to calculate how many points each team has. with the above data leeds should have 9 and man u 0. i have come up wth the following sql …

Databases mysql
Member Avatar for tomato.pgn
0
128
Member Avatar for stevempeterson

I am using Access 2010 and have 2 tables: ORGANIZATIONS [id], [categoryID], [requirements], [address], [city], [state], [zip], [web], [person], [title], [phone], [fax], [email], [paperwork], [brochures], and [dateModified] LIST [ID] and [list] The data types are either text, number, attachment, memo, hyperlink, or date I have a form with a listbox …

Databases microsoft-access
Member Avatar for stevempeterson
0
124
Member Avatar for mmlmitchell

I have two tables: CDDemographics and CBTechProviderData. Both have 200,000+ rows. A common column between these tables is CensusBlockID, of which the first 5 integers are the fips code - in this case I am defining that code as 55001. I am trying to sum the population of CensusBlockIDs where …

Databases mysql sql
Member Avatar for debasisdas
0
209
Member Avatar for Kniggles

Morning,afternoon,evening and av a great night to all, solution needed plaese. secnario. players eneter log on screen and enter name ,password, (id is index on base) then go to check_logon.php if happy end up at logon_success.php this run ok :) am now trying to display players id number on logon_success.php. …

Databases mysql
Member Avatar for debasisdas
0
112
Member Avatar for Fentontech

I have 2 tables, MPW1400 LeaseRecNo PropNo BldgNo UnitNo LeaseStartDate MPW1482 LeaseRecNo EffectiveDate AnnualAmount CertNo My Objective is to get the total of 'AnnualAmount' Where MPW1400.LeaseRecNo = MPW1482.LeaseRecNo and CertNo = '1' Example: MPW1400 ------------------------------------------------------- LeaseRecNo | PropNo | BldgNo | UnitNo | LeaseStartDate ------------------------------------------------------- 12345 | RG52 | 24 …

Databases mathematics mssql sql
Member Avatar for Fentontech
0
181
Member Avatar for maydhyam

Hi All, I am working in Oracle10g and I have been trying to run the following query, and am getting an error: [B]Query:[/B] [CODE=sql] SET VERIFY OFF VARIABLE emp_salary NUMBER ACCEPT empno PROMPT 'Please enter a valid employee number: ' SET AUTOPRINT ON DECLARE empno NUMBER(6):= &empno; BEGIN SELECT salary …

Databases oracle
Member Avatar for maydhyam
0
672
Member Avatar for Mike Bishop

I have a view that pulls in a field, the feild has data in the following format. A1-an987389 B21-At081l0 AA1-ath01882 how would i get the infoamtion before the "-" IE A1 B21 AA1 the size of the data before the "-" can be anything from 1 up 5 charcters i …

Databases mssql sql
Member Avatar for BitBlt
0
105
Member Avatar for tinymark

Hello to everyone. I have an old flat database with a couple of hundred entries that I want to convert to a relational design. It was a user database for simple login and some preferences. I would like to know if there is a simple way to convert from one …

Member Avatar for tinymark
0
181
Member Avatar for KirstyHunter

Hi, I have replication configured on a SQL 2008 Database. The tables involved are something like this; [INDENT]tbl.Product ProductID Int ProductName NVarchar(max) ImageID Int FK_Product_Image FOREIGN KEY(ImageID) REFERENCES tbl.Image (ImageID) tbl.Image ImageID Int Image Image[/INDENT] tbl.Product is part of a Transactional publication with updatable subscriptions. tbl.Image is part of a …

Databases mssql sql
Member Avatar for KirstyHunter
0
180
Member Avatar for user2030

[B]hello everyone ,,,,, i have an assignment that is difficult on me ,,,, its about ((Normalization)) could anyone help me in doing the assignment ,,,plz plz:icon_sad: "please check the attachment" [/B]

Databases oracle
Member Avatar for debasisdas
0
71

The End.