2,403 Solved Topics
Remove Filter ![]() | |
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 | |
I get the error #1005 - Can't create table 'db1.#sql-9e8_2c1' (errno: 150) (<a href="server_engines.php?engine=InnoDB&page=Status&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 | |
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 | |
Does anyone know how I would go about storing something from my database into a variable to use elsewhere on my PHP code? | |
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 | |
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 | |
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 | |
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 | |
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 | |
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 | |
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 … | |
I'm a beginner on MySQL. I tried to run this statement [CODE]SELECT* FROM address WHERE email=a@abc.com[/CODE] but it shown an error message. What's wrong? | |
can someone help me to write a query that will sum the information across the row and down the column (sum) in ms access table a b sum 1 10 11 2 20 22 total_all I tried the following select a,b, sum as (a+b) from table1 the error i get … Databases mysql | |
Hi everyone, Can someone please explain how to determine cardinality ratio for a relationship. For example; In a database for a hospital there is an entity Doctor and Patient. One or more doctors will treat a patient. So, is the cardinality ratio between Doctor and Patient is M:1 (one or … Databases | |
I am having some trouble. I have a Linux Server hosting 5.1 MySql. The Windows clients are running a POS Program written in C# using the .Net Connector. The Problem is that the initial connection takes around 12 Seconds which is not a big problem, but when you let it … Databases mysql windows-server | |
I've done some research on JOINs and UNIONs but haven't achieved what I want to do since something I do must be terribly wrong. I have the following SQL-statement: [CODE] SELECT posts.*, channels.channel FROM posts INNER JOIN channels ON posts.channel_id = channels.id ORDER BY posts.created DESC [/CODE] What I want … Databases mysql | |
Suppose I have two tables: [CODE] Table1: Pets PetID----------|Name----------|Type----------| 1 |Shaz |Dog | 2 |Molly |Cat | 3 |K9 |Dog | 4 |Billy |Goat | ______________________________________________ Table 2:PetAttributes PetID----------|AttributeName-|AttributeValue| 1 |HairColor |Black | 1 |Breed |GermanShepherd| 1 |Age |12 | ______________________________________________ [/CODE] As you can see from the sample, the … Databases mssql | |
Hi, I need to create a sql query that will return the sum of the total number of records in the t1 and t2 tables. Any ideas how to do it? Thnx in advance Databases mysql | |
Hi all, I have a table where it stores Process. The Process has each processNumber which is unique, & the processNumber indicates the step of a procedure. My problem is, user request to add a Process in between existing processes. In other word the new Process overwrite the existing process … Databases microsoft-access | |
Hi, I have one simple problem. PHP (CodeIgniter) code: [CODE=php] $query = $this->db->where('filename',$filename)->select('valid_until')->get('jos_reklama_banners'); $row = $query->row(); $valid_until = $row->valid_until; if($valid_until > time()) { $sql = "UPDATE `jos_reklama_banners` SET valid_until = valid_until + ? WHERE `id` = ?"; $query = $this->db->query($sql, array($days*86400 ,$filename)); //viena diena 86400 sekundziu //echo 'daugiau'; } else … Databases mysql php php-codeigniter | |
Hi Guys I have an e-commerce website. Two of the columns are for the pricing of products. What I would like to do is update the price ('prodprice') directly from the cost price ('prodcostprice'). It would be nice to set a certain markup according to price range. eg. $0-$1000 = … Databases mysql | |
Hi All, After searching the web and this specific forum I can't seem to find a suitable solution to my problem and after hours of thinking I wasn't able to come up with a solution that will fit the problem. This is the case: I need a database model that … Databases database-design web-design | |
I would like to retrieve the previous date (i.e., current date minus 1) and use it in a query through an = operator. I got the following query to retrieve the previous date: [icode]select DATEADD(DD, DATEDIFF(DY, 0, GETDATE()), -1)[/icode] It gives: 2011-03-14 00:00:00.000 I would like to get only: 2011-03-14, … | |
hi pls help me on this.. i'm using this code to get data from record: [CODE] MyNum1 = DLookup("[Outcome]", "Remark", _ "[IDRemark] = Form![SelectTxt]") OutTxt.Value = MyNum1 [/CODE] my prob is when the data in [Outcome] is null , access having error to still get the null value from the … Databases microsoft-access | |
I have an SQL Server Query: select *from table1 where column in ('list of values') When I execute this, I get all the details, however, when I do this: select *from table1 where column in ('list of values') and date_of_req='2011-03-15' I get an empty table. All the column headings are … | |
Hi friends, I am planning to develop a local hotel search engine. ive prepared the dbmodel and i've attached it with this thread. please help me to write search queries for searching hotel. there are 11 tebles country,city,state,block,street,landmark,address,hotel,rooms,and amenities . please go through the model i've attached and help me … Databases | |
Hi everyone, I am having an issue with a query i am doing for an assignment, i have made an attempt but i know i have not done it right. below is the table structures: Customer: CustomerCode,[pk] CustomerName Movie: MovieCode,[pk] Name, Rating Video: VideoCode,[pk] Name, CustomerSoldTo,[fk1] MovieCode,[fk2] What i have … | |
Afternoon All, hope someone can help as this is really doing my head in. I have a SQL View which has a field called MOP/T which shows the number like so 28.5140299679490 349.893390000000 349.893389892905 I want to format that field so that it only shows the number before the decimal … | |
Hi I have a join query which I use for a report ok I have a query to give me results for a report that will give me all the stores that sold policies from a group during a period. It works however I cannot get it to give me … Databases data-structure mysql pdf php | |
I have an XLS file. Let's assume that it has 1000 rows in all, with 10 columns. I would like to import rows 5 through 995 (say), and columns 1 though 7 and 10. How can I do this using an SQL query, either though OPENROWSET or BULK INSERT? I … Databases mssql sql windows-server | |
Hi everyone, I need some help with identifying real world entities and their attributes for a hospital scenario. I have listed below the entities and attributes that I could think of. Please comment or give suggestions on how I can improve it. [CODE]EMPLOYEE ([U][B]Employee_SSN[/B][/U], Address_ID, Contact_ID, Employee_Name, Designation, Salary) PATIENT … Databases database-design | |
hello all i am using a query [ICODE]select 'hour','filename','tot_sent_count','tot_success','tot_prm_fail','tot_switchedoff','tot_other_error' UNION select hour,filename,sum(tot_sent_count),sum(tot_success),sum(tot_prm_fail),sum(tot_switchedoff),sum(tot_other_error) INTO OUTFILE '/tmp/hourlyFileMis(2011-03-09)' FIELDS TERMINATED BY ',' LINES TERMINATED BY '\r\n' from tbl_mis where date_format(date_time,'%Y-%m-%d')='2011-03-09' group by hour,filename order by hour;[/ICODE] output is ok but one thing is not coming properly that header fields are coming at the … | |
Hi to all, I created the following table --------------------------------- create table publisher(name varchar(20), city varchar(20)) --------------------------------- I want to put following constraint, 'name is having unique with city taken only from 'mumbai', 'pune', 'nasik', 'panji''. I know about unique constraints with name. I searched many about constraint with city, but … Databases mssql | |
Hello, Building on the thread: [url]http://www.daniweb.com/forums/post1491690.html#post1491690[/url] I need to tease out the sums of three values from Rows that meet multiple parameters. Here is a sample of the dataset: id | blkidfp00 | fips | transtech | pop | hu | busfirms 1 | 55001950100100 | 550039 | 10 | … | |
Similar to the issue in [url]http://www.daniweb.com/forums/thread227151.html[/url] I have multiple rows with identical values; in this case they are Census Blocks (CB --> blkidfp00) that have 15 digit values. I have multiple rows because each is differentiated by the type of services available in each CB, and there are many different … Databases mysql | |
Hi everyone, I'm in a spot of bother. Attached is an image which should help better show what I'm about to ask for assistance with. :) [url]http://img96.imageshack.us/img96/7624/sqlm.jpg[/url] What I have, is 2 tables that associate each other with 'packholder' In the table shown, you can see Packholder - 1, 2, … | |
Hi, I have two problems regarding my database design 1. I have a table contains the details of items, available in a store. Now there are different size available for each item. How to design my table so that it will hold each item and all available size in a … Databases data-structure database-design mysql | |
Hello, I'm building an ecommerce site and I was wondering if developers usually use mysql to store credit card information? Or do they use some other service to store credit card information? I want my website to be secure for my users. Thank you | |
![]() | I have a database that has a simple search form where you enter the 'Search Text' and then mouse click the 'Search' button and the results are displayed. Alternatively if the Enter key is pressed twice, first time to enter the text and tab to the 'Search' button, and the … Databases microsoft-access seo ![]() |
Hi, I am working on a Inventory management system. No I would like to have a [B]custom bill no, which will be changed on each month[/B], i.e. the first bill of March, 2011 will have a no like "[B]Mar/2011/01[/B]", the next will be "[B]Mar/2011/02[/B]" and so on, until it is … Databases mysql | |
HI all Experites can you help me on this Query How to get perfect result set I have three table. [CODE] 1)vitalsigns ID DisplayName DisplayShort ToMetrics ToEnglish 1 Temp Temp (0.556*({1}-32)) ({1}/0.556)+32 2 BP(Systolic) BPH (NULL) (NULL) 3 Wt WtH {3}/2.2 {3}*2.2 4 Height Height 2.54*{4} {4}/2.54 5 Pulse Pulse … Databases mysql | |
Could I select a datetime record using date only? I need to show rows containing a particular date. I'm thinking to separate it into two column instead if I couldn't select only date from a datetime. Databases mssql | |
Hi I'm trying to display wordpress posts in October 2010. My best attempt was SELECT * FROM 'wp_posts' WHERE 'post_date' < 31/10/2010; but it shows an empty result and I think the dates need to be in a range. Any suggestions? Thanks, Kevin | |
Hi to all, I created following table ------------------------------------------------------------------- create table interiors(id integer, name varchar(20), type varchar(20) default 'baby cot', price integer) -------------------------------------------------------------------- but, when i doesn't inserted any value of 'type', by the definition of table, it should take default value. when i fetch all rows by 'select' query, it … Databases mssql | |
Hi to all, i created following table ------------------------------------- create table employee(name varchar(20), dob datetime) ------------------------------------- I want to extract names of all months from 'dob'. for that i wrote following query ------------------------------------- select datepart(month, dob) from employee -------------------------------------- it works and shows all months but in number format, i want … Databases mssql | |
I facing a problem where i cant update my mysql data with calculation and if statement i want to update my column answer column and make calculation between column one and two depending on column sign.whether to sum minus multiply or divide:S UPDATE calculation SET answer IF (sign = +) … Databases mysql | |
Sum of One and not the Other I have a requirement to query one figure and the sum of another. What I need is one query to produce the MonthPayment for each CompanyID for a given ContractID and the Sum of TotalPayment with matching CompanyID and ParentCompanyID for each CompanyID … Databases mssql | |
Hi to all, i created following table in SQL. =================================== create table employee(name varchar(20), dob date) =================================== But, when i ran the query, i got the massage that 'SQL can not find data type 'date''. How should i include 'date' in to table definition. Databases mysql | |
Hi Guys, Can anybody spot the error on this code? it gives me error: SQL Server Database Error: Incorrect syntax near the keyword 'inner'. 5 0 [CODE]Select e.event_number,e.start_date ,event_desc, venue_desc,s.location from events e inner join venues v on v.venue=e.venue inner join sessions s on s.event_number=e.event_number and session_type='0' (inner join contact_categories … Databases mysql | |
Hi to all, I created following table =================================================== create table man(id integer, name varchar(20), city varchar(20), age integer, dept integer) =================================================== I want name and maximum age of person residing in 'mumbai'. I wrote following query, but got the error like 'can not include name with max() fuction since it … Databases mysql |
The End.