2,403 Solved Topics
Remove Filter ![]() | |
So I have this line of code: $results = mysql_query('SELECT * FROM members WHERE category1="Photographers" ORDER BY premium DESC, featured DESC, company ASC'); Everything works great, Premium members show up above featured. Featured above regular members, and they are all in alphabetical order. However I want to have featured members … Databases mysql | |
Using SQL I have to SUM the total of each game but I can only select the games that have more than 10 scores in total . So `select GameNo,sum(goals) from tblGame, tblAthlete.` But I'm stuck on the 'where' bit.....`select GameNO where (sum(goals)>=10);` So not only do I have to … | |
Hi All, I have 5 product tables(product_table_1,product_table_2 and so on), category table and sub category table I need to get number of products mapped for each category. i.e count of products accross categories. Below are the table structure and the query which i have written, I need to optimize the … | |
hi recently i have installed oracle 11g and i try to work through oracle enterprise manager browser to start up the local host there i found "Host Credentials" i have not set any user name and password for my os while installing i am using windows 7 what will be … Databases oracle | |
This is my SQL statement.. SQL Statement: SELECT tbl_subjectsenrolled.SubjectID, tbl_subject.SubjectDesc, studentsubjectgrade.Finals FROM tbl_subject INNER JOIN tbl_subjectsenrolled ON tbl_subject.SubjectID=tbl_subjectsenrolled.SubjectID INNER JOIN studentsubjectgrade ON tbl_subjectsenrolled.SubjectID=studentsubjectgrade.subjectID WHERE studentsubjectgrade.StudentID='04-0044' But the OUTPUT is this: SubjectID1 SubjectDesc1 Finals1 SubjectID1 SubjectDesc1 Finals1 SubjectID2 SubjectDesc2 Finals2 SubjectID2 SubjectDesc2 Finals2 Instead of this: SubjectID1 SubjectDesc1 Finals1 SubjectID2 SubjectDesc2 … Databases mysql | |
Hi all I am currently working on a Battlefield player / server statistics application that i have written in C#. I am storing RAW player / server data in a table at the moment. My question is what is a recommended maximum columns per table as this statistical data which … Databases mssql | |
I have a scenario that I am assisting with. I am not sure how to advise in this case. I am hoping that someone with a lot more database design/normalizing experience can clarify this for me. I am working on a simple database which will contain a table to track … Databases database-design web-design | |
Hi . I installed oracle 10g in D Drive(Because C drive is full). But when i try to uninstall , i cant see that in "add or remove programs". How to uninstall it?.. Any solutions.. Databases oracle | |
Good day, I am having trouble with the computation in SQL. i want to subtract the intStock and the intTotal_OutBound_items to just to get the items available. here is my SP.. INSERT INTO CO09_Report ( intMaterial ,txtDescription ,txtMaterial_Type ,txtATP_check ,intDelivering_Plant ,intOrder_Quantity ,isHeld_by_Finance ,isRejected_OOS ,isRejected_Others ,intOpen_Order_Quantity ,intOrder_Quantity_NKA ,intOrder_Quantity_RKA ,intOrder_Quantity_Others ,intStock ,intDSD_Delivery … Databases sql | |
Hi How can Iremove all object that Im created in oracle database. I have 8 tables and I would like to remove all which commans should I use? Databases oracle | |
How can I insert two row to supplier table? CREATE TABLE supplier ( supplier_nr NUMBER(10), supplier_id VARCHAR2(20) NOT NULL, price NUMBER(10) NOT NULL, CONSTRAINT supplier_supplier_nr_pk PRIMARY KEY(supplier_nr), CONSTRAINT supplier_supplier_id_fk FOREIGEN KEY(supplier_id) REFERENCES varugrupp(supplier_id) ); Databases oracle | |
Good day, I want to get the latest value of the newly inserted record in my label.. The value that i want to get is not the primary key. Here is my code . //for saving _patientInformation.firstName = txtFname.Text; PatientInformationBL _patientBL = new PatientInformationBL(); if (_patientBL.addPatientInfo(_patientInformation) == true) { lblMsg.Visible … Databases | |
Don't really understand Basketball and I have to do an ERD . Can someone tell me how to link the 'manager', 'coaches' and 'club' tables. e.g. would it be one manager has MANY coaches to manage. e.g. One club has MANY Coaches. Don't get it. Also I have these following … Databases database-design | |
**How to show the scoring of each match & show players individual performance for each match on an ER Diagram for a basketball system? ** Hello, I have to create a database for a basketball system. I’m confused about the 'scoring'. I have kept the scores in the ‘GameStats’ table … Databases ![]() | |
I created a stored Proc: Create PRocedure InsertTBL_Supplier ( @SupplierNumber nvarchar(50), @SupplierName nvarchar(50), @Address nvarchar(50), @ContactNumber nvarchar(50), @ContactPerson nvarchar(50) ) AS BEGIN INSERT INTO TBL_Supplier (SupplierNumber, SupplierName , Address, ContactNumber , ContactPerson ) VALUES ('10000','JenRoses Shop','Pasig City','09159675567','Dara Lim'), ('20000','Lawren FlowerFave','Makati City','5564818','Aiden Lee'), ('30000','FLowers&Scents','Marikina City','7280823','Dennis Park'), ('40000','Pretty Flower Spot','Pasay City','09276543789','Joshua Tan'), … Databases mysql | |
Hi All, I have the following statement which is intended to have a Year over Year Percentage change: select CurrYear.Variable_Date,CurrYear.Variable_Value,cast(100*(CurrYear.Variable_Value-PrevYear.Variable_Value)/PrevYear.Variable_Value) AS Percentage_Change from dbo.tblCPISC as CurrYear left outer join dbo.tblCPISC as PrevYear on year(PrevYear.Variable_Date) = (select MAX(Variable_Value) from tblCPISC where year(Variable_Date) < year(CurrYear.Variable_Date)) order by year(CurrYear.Variable_Date) For some reason, I … Databases mssql | |
Hello there, today I noticed there are two operation in PhpMyAdmin, Replication and Synchronization. and now I want to use these operation as the following scenario. I have local db, I want to copy its content to remotly db so when I connect to any db I see the same … | |
Hi, Im trying to get the depreciation value of an equipment every month. My system gets the number of months from date of purchased up to current date for the computation of depreciation. I can run the report anytime but the computation must be like this: Sample: Date purchased January … | |
Hi All, I am wanting to round up my values at query time to 0 decimal places from 2 decimal places. I have SELECT DISTINCT b.vSeries_Table_Number, b.vSeries_Number, b.vSeries_Geography, b.vSeries_Type, b.vSeries_Unit_Type, a.Variable_Date, ROUND(a.Variable_Value, 0) AS 'Value' but the output still has the 2 decimal places which are 0s and pointless in … Databases mssql | |
Hi All, I'm having a go at SQL queries and have the following: SELECT b.vSeries_Table_Number, b.vSeries_Number, b.vSeries_Geography, b.vSeries_Type,b.vSeries_Unit_Type, a.Variable_Date, a.Variable_Value FROM tblPopulationSC AS a INNER JOIN tblVSeriesList AS b ON a.vSeries_ID = b.vSeries_ID and b.vSeries_Geography='Manitoba' --and b.vSeries_Unit_Type=' 15 to 64 years' and b.vSeries_Type=' Both sexes' and b.vSeries_Unit_Type=' 65 years and … Databases client-server mssql sql | |
How to delete duplicate record in sql serer plz suggest me............ thanks Databases mssql | |
Good Morning. I am writing a little function to record the visits to a landing page, and want to do it in such a way as to not count multiple visits from the same IP address within a 24 hour period. What I was wondering is if there is a … Databases mysql | |
Hi all. I'm developing a quiz application consisting of multiple choice questions. Here are the tables that I've come up with. CREATE TABLE IF NOT EXISTS `student` ( `s_id` int(10) NOT NULL, `s_name` varchar(30) NOT NULL, `s_email` varchar(30) NOT NULL, PRIMARY KEY (`s_id`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1; CREATE TABLE IF … Databases mysql | |
I want to have the following on SQL Azure: IF EXISTS(SELECT * FROM [sys].[databases] WHERE [name] = db_name() AND [compatibility_level] = 110) BEGIN ALTER PROCEDURE [dbo].[Test] AS BEGIN -- Omitted body containing lots of strings END END or a work-around that does something similar. What follows is what I'm trying … Databases microsoft-azure mssql sql | |
Hello all: I would like to query my mysql table for a total number of records inserted during a specified day of the week within a specified time period. More clearly: count number records inserted on Tuesdays during the time period of 2013-01-31 - 2013-02-03. The first day of the … Databases mysql | |
HI Friends, SQL> edit; SP2-0110: Cannot create save file "afiedt.buf" how to fix this problem. Databases oracle ![]() | |
Hello, we are saving in the database time as our local time which is UTC+2 How to convert to other times? I found in that this should work: select sell_date, sell_date at time zone 'UTC+2' as UTC2 FROM cards order by id desc limit 1 This sql should return same … Databases | |
Hi, I have to draw an ER diagram for assigning classrooms for scheduled courses for university. A classrom is simply a room within a particular building and all bulidings on campus have atleast one classroom. A classroom is scheduled for a particular time and day or days of a week. … Databases | |
I'm trying to get an xml file from an ftp and then insert select data into mysql db. I'm shooting in the dark but from googling this is what i've tried so far: $curl = curl_init(); $file = fopen("import.xml", 'w'); curl_setopt($curl, CURLOPT_URL, "ftp://company@company.company.se/company/import.xml"); #input curl_setopt($curl, CURLOPT_FILE, $file); #output curl_setopt($curl, CURLOPT_USERPWD, … | |
Hi, I, getting a new xml file everyday to one of our external ftp servers. I want to get that file and then insert select data into my mysql. What I'm thinking is that I would use curl to get the file, then simplexml and then insert into database. But … | |
Hi everyone, I need suggestions. A little corporate needs to track its data with 2-3 employees making a daily data entry/updating of few records (20-30). Data must be available to other employees. They want to store data in a SQL Server db that has been already implemented. The whole db … Databases | |
I have a table of withdrawal requests that has a datetime field called 'create_date' I need to query that table to see if a member has submitted a withdrawal request within the past 24 hours If they have, I need just the most recent record within 24 hours that matches … Databases mysql | |
hi there.. I just need some help for my loan management system. thus anyone know how can i stored schedule of amortization to the sql serve? is it 1 insert statement is enough to store in database? do this problem need looping. I don't know what code should I need … Databases mssql ![]() | |
Hi guys, I'm working on a holiday scheduling app and I was wondering that if a person wants his holiday for example 10 days. id uid data1 data2 ore tip_concediu ts 7 244 2013-01-25 2013-02-05 3 2 2013-01-25 16:08:35 How would it be possible that I could track the holiday … Databases mysql | |
Hi all, I'm trying to use recordset to create the following query: $query_GetCurMonthPlayerGoals = "SELECT PlayerName, Goals FROM ( SELECT PlayerID, COUNT(*) AS Goals FROM Master WHERE TeamID=$row_GetTeamDetails['TeamID'] AND MONTH(GoalDate)=MONTH(CURDATE()) GROUP BY PlayerID ORDER BY Goals DESC ) T INNER JOIN Master_Players ON T.PlayerID=Master_Players.PlayerNameCode"; The problem I am having is … Databases mysql | |
Hi, is there another way of hiding or formating column value in asterisk in select statement? im using the command replace SELECT REPLACE([Item].[Price],[Item].[Price], '**********') AS Price From Tablename it works fine, but is there anyway to do this? Instead of replacing/forcing the value to display asterisk, i just need if … Databases client-server mssql sql vb.net | |
Hi guys I have a little mess up in my head going on i dont really know why. My question is how come a right join AND a left join were made to handle database queries, why both of them, isn t one enough? for instance let s take the … Databases | |
I published my project in vs2010 and im trying to deploy it to other computers. I used this connection string that runs smoothly on my pc. This code tries to retrieve the servername and try to connect to database mysysDatabase. This forcely change the app.config. Private Sub btnOk_Click(ByVal sender As … Databases client-server mssql sql vb.net | |
I've been having trouble with an UPDATE statement in the code below. The problem is that each time I submit the form to update an existing record in the products table, the records won't update. When I submit the form there is no error message and it redirects to the … | |
Hi everyone, i would like some help with a couple of mysql queries. I have a table of data which looks like this :  And represents a transaction log for players of a game. The ID is the primary key (auto incremented). DATETIME is the date and time … | |
i have 3 tables. leave_cri:typs of leave allowd 4 an emp leave_eli:all typ of leaves leave_detail:details of leave taken by an emp i need 2 write a query 2 select data based on these 3 tables. ie) i have 2 display these in a grid. leave details from_leave_details ; leave … Databases mysql | |
Hi, I let say I use this code to retrieve date from database SELECT Table.Date FROM Table The format is 01/09/2013 (dd/mm/yyyy) How will i format this to get 09-Jan-2013 output then print this format to crystal report? I'm using dataset to connect data to crytal report I just noticed … | |
![]() | I'm attempting to make a web-based scheduling system, but I'm having trouble figuring out how to make it work in the best manner. First, the current table structure: **shifts** Shift_ID (pk) Event_ID (fk) Dept_ID (fk) Start End **shifts_assigned** Entry_ID (pk) Shift_ID (fk) User_ID (fk) DateAssigned Position Notes Where pk is … Databases javascript-jquery mysql php ![]() |
Hello, I was wondering if there anyway to Select rows where the date column falls into a certain range? For example, heres a table [code] The date field is generated automatically by MySQL with the DATE function Heres the table: [user] . [wins]. [date] bobby.......4..... 2006-08-21 boby1.......3..... 2006-08-22 boby2.......6..... 2006-08-24 … Databases mysql | |
Hi all, This is a follow on from my last post. Here is my current query: SELECT * FROM ( SELECT * FROM ( SELECT TeamID, PlayerID, COUNT(*) AS Total FROM Scored WHERE MONTH(GoalDate)=12 AND YEAR(GoalDate)=2012 GROUP BY PlayerID ) T GROUP BY TeamID, Total DESC ) T GROUP BY … Databases mysql | |
Hi, I'm having trouble to filter a Customer Set by the date of his first buy(First Activity). I've tried this two ways: 1. Returns all customers, even with FirstActivity Null SELECT { [Measures].[Valor Item], [Measures].[First Activity] } ON 0, { Filter( { [CLIENTE].[Cliente].[Cliente].Members }, ( [Measures].[First Activity], [Time].[Year].&[2012-01-01T00:00:00] ).Count > … | |
Hi all, Regarding a football (soccer) league: I am trying to find the top goalscorer for each team in the league in December 2012. Each time a player scores a new row is created in the table "Scored" with their name in it and their corresponding team and the date … Databases mysql | |
Hi everyone, I would like to ask a question about MySQL. Say, I have a database like this: database 1: articles |- id |- title |- description database 2: tags |- id |- articleID |- tag I needed to search from articles.description and tags.tag and while doing so, the searched … | |
Sir, having a problem. I have two tables i.e directives and para_comments_sect. there is no direct connection with each other . what i want is to get the data field from directives and para_comments_sect of para_id=15 ( its a foreign key from para table). any suggestions and guidance for it … Databases | |
Good Morning, This may seem like a very basic and simple question from someone that has been doing programming as long as I have, but it is something that has always eluded me, and I've never taken the time to ask, so here it is... When I am doing queries, … Databases mysql |
The End.