**I need someone 2 help me drawing the ER diagram for this scenario :( ** Draw an ER Model and the corresponding relational model (logical model) for the following problem. StrongTEETH4U is a private dental clinic that is well known and has an excellent reputation in the area. All patients in the clinic have their details stored in a ClinicBook database. This database is used by the dentists and secretaries in the clinic to contact the patients for their routine checking and remind them of their appointment dates. A patient has a patient number (a unique value), first name, surname, …

Member Avatar
Member Avatar
+0 forum 5

I am using OS Ticket and I have another site for Members Area,I am trying to join the 3 tables that have the information that corresponds to the customer by EMAIL. the first table is:qbcd_ticket: ticket_id | number | user_id | user_email_id | status_id | dept_id | and more... 5 | 762086|   2     | 0   | 1| 1 | the next is qbcd_user_email rows: id | user_id | flags | address 2 | 2   | 0   | example@demo.com the last is: qbcd_user id | org_id | default_email_id | status | name       …

Member Avatar
Member Avatar
+0 forum 2

I have three tables that I query. Problem is my ORACLE MIF table has 500,000 rows. And it takes more than 1 hour. How can I reduce the time? SELECT WB_FIELD_REQ.MODEL, WB_FIELD_REQ.MFG_SERIAL_NUMBER, CONFIG_SERIAL_NUMBER, SH_CONTRACTS.EQUIPMENT_ID, "", SH_CONTRACTS.SERVICE, "", SH_CONTRACTS.CONTRACT, "X", "", "X" FROM WB_FIELD_REQ INNER JOIN SH_CONTRACTS ON WB_FIELD_REQ.MFG_SERIAL_NUMBER=SH_CONTRACTS.MFG_SERIAL_NUMBER NOT IN (SELECT DISTINCT MFG_SERIAL_NUMBER FROM ORACLE_MIF WHERE PROJECT_NUMBER = "701") AND WB_FIELD_REQ.DEVICE="701"

Member Avatar
+0 forum 0

Good Day:) I'm trying to figure out how to remove the % sign that is returned from scraping Yahoo Finance **without** removing the decimal point (or a possible negative sign in front of number returned as netProfit). My goal is to convert the string without the % sign a float that I can use later. netProfit1 is close to what I'm after but removed the -ve sign on other examples and also the decimal point All help appreciated using python 3.4 BTW - Still learning :) This is what it currently returns C:\Python34\python.exe C:/_Python/test.py Net Profit Margin (The higher the …

Member Avatar
Member Avatar
+0 forum 3

I am new for MySQL my tables structures are as follows Table: registration ---------------------------------- | cardNo | mainAgentId |subAgentId| ---------------------------------- | 100 | 1 | 4 | ----------------------------------- | 101 | 1 | 5 | ----------------------------------- | 103 | 2 | 6 | ----------------------------------- | 102 | 1 | 4 | ----------------------------------- | 104 | 2 | 7 | ----------------------------------- Table: mainsubagent ---------------------------------------------------- | mainAgentId | designation | firstName | lastName | ---------------------------------------------------- | 1 | Main Agent | Akshay | Kapoor | ---------------------------------------------------- | 4 | Sub Agent | Sunil | Jha | ----------------------------------------------------- | 5 | Sub Agent …

Member Avatar
Member Avatar
+0 forum 6

Hi need some insight on how to show record from different database on the same server. i also tried using join but didnt get the correct output. im finding a way to make it work using just one query. my last resort will be using different query to select the data i need(hope i wouldn't go that way) what i have so far is this. it show the record of both database but somehow it repeating the same record `SELECT DB2.processed_trans.Ra_num , DB1.processed_trans.Ra_num FROM DB2.processed_trans JOIN DB1.processed_trans ;` thanks, neil

Member Avatar
Member Avatar
+0 forum 8

I'm using MS SQL 2012 - trying to LEFT JOIN 3 Pivots - but am running into issues within a query variable that I'm not sure how to debug. Each Pivot works on it's own - but the actual Joining is causing the issue. Any help is appreciated. First time using Pivot - so it may be a minor fix. Have been Googling/Trial&Error for a good day and a half without luck. [SQL Fiddle](http://sqlfiddle.com/#!6/1ff77/13) loaded with my code. Thanks in advance! :) ## The Result Columns ## ID | BaseImpact1_Actual | ... | BaseImpactN_Actual | BaseImpact1_Update | ... | BaseImpactN_Update …

Member Avatar
Member Avatar
+0 forum 1

I have five tables as listed below. Question: is it possible to join all five tables and output the result as show below? <table> <tr> <th>Subject</th> <th>Last update (date from table. nr.3)</th> <th>Last update (date from table. nr.4)</th> <th>Last update (date from table. nr.5)</th> </tr> <tr> <td>Mathematics</td> <td>2014-06-01</td> <td>2014-07-05</td> <td>2014-03-15</td> </tr> <tr> <td>English</td> <td>2014-01-01</td> <td>2014-02-11</td> <td>2014-04-21</td> </tr> <tr> <td>German</td> <td>2014-01-02</td> <td>2014-05-30</td> <td>2014-07-03</td> <tr> </table> **Table (containing subject id and subject name)** CREATE TABLE IF NOT EXISTS `subject` ( `subject_id` int(3) NOT NULL AUTO_INCREMENT, `subject_name` varchar(50) COLLATE utf8_swedish_ci NOT NULL, PRIMARY KEY (`amne_id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_swedish_ci AUTO_INCREMENT=100 ; **Table …

Member Avatar
Member Avatar
+0 forum 2

Hi Friends, I am developing a Music download system. I thought to have two database tables. One for songs and other one is for artists because some songs have two or more artists. Then I created two tables call `songs` and `songartists`. Following are the structures of that tables. `songs` Field Type Null Default id int(11) No name varchar(50) No size int(10) No lyrics varchar(35) No music varchar(35) No mastered int(35) No link varchar(355)No added timestamp No CURRENT_TIMESTAMP `songartists` Field Type Null Default id int(11) No sid int(10) No artist varchar(355) No Now I want to display last 5 songs …

Member Avatar
Member Avatar
+0 forum 2

hello, i'm joining a network which provieds me with internet connection through Lan Cable , the thing is i've to enter user name and password he gave me for only on computer online at a time, can't log in with more devices cuz he only gives me one IP i've a server with active directory and domain and computer connected to it through my router , is there anyway i could recieve the internet connection from the other network into the server then it manages its network and other computer has access to internet " i want to make my …

Member Avatar
Member Avatar
+0 forum 5

Hi, I have 3 tables Description, Item, Transaction 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 how many are under repair eg. there are 2 printers in item, and 1 under repair output should be: Description count under repair Printer 2 1 Monitor 1 1 Im using vb.net 2010 and sql server 2008 r2 as much as possible not using stored proc Thanks …

Member Avatar
Member Avatar
+0 forum 2

Sir, i have a little problem regarding my queries.. I try to display data from two different table using left outer join. but I found some error.. here's my code please check and tell me what is wrong.. f(isset($_GET['id'])){ $id = preg_replace('#[^0-9]#i','',$_GET['id']); $result = mysql_query("SELECT A.cus_id, A.complaint, A.admin, A.datetime, B.firstname, B.email FROM tbl_complaint A LEFT OUTER JOIN tbl_customer B WHERE cus_id = '$id' ORDER BY datetime DESC "); echo "<center><h4>Response</h4></center>"; echo "<div class='row' style='width:700px; height:200px; border:1px solid #CCC; overflow-y:scroll;'>"; while($row = mysql_fetch_array($result)) { $complaint = $row['complaint']; $cus_id = $row['cus_id']; $datetime = $row['datetime']; $admin = $row['admin']; $firstname_email = $row['firstname'].'&nbsp;'.$row['email']; echo "<div>"; …

Member Avatar
Member Avatar
+0 forum 3

Hi all. I have this code: <html> <title> </title> <head> <script> function add(){ var first=document.getElementById("form").value; var second=[first]; for (i=0;i<second.length;i++){ var third=second.join("+"); } document.one.answer.value=third; } </script> </head> <body> <input type="text" id="form" onChange="add()"/> <form name="one"> <input type="text" name="answer"/> </form> </body> </html> What I want to do is allow the user to enter an array of numbers (say 4,5,6) and eventually create a code that will take those numbers and do something with them (add them together, pass them to something else or just display them). I can't figure out why it won't work with join() but when I use split(), it seems …

Member Avatar
Member Avatar
+0 forum 2

This is a bit complex. I have two tables *bus_status* and *routes* routes has a foriegn key look up from bus_status called UnitAssigned in routes table and it is pulled from the BusNumber field in the bus_status table. Right now when I send an email and include the field in the message data it only provide the Bus number like this: Bus Number: 0114 This is actually the record ID number of this bus number and not the real bus number which is AAOH_221 I need it to show the actual. When I am creating reports I do this with …

Member Avatar
Member Avatar
+0 forum 3

Hi, I am new to VB programming. I am using Aceess 2010 database with VB 2010. I have one main table which stores information of company details. The details are broken down in seven different tables with codes to avoid data duplication and keep the main table less bulky. e.g. Company table stores, company code, city code, state code, branch code etc., which can be multiple entries, with other details. The details are stored in respective code tables. e.g. com_code table will store Company Code as Primary Key and the Company Name, city_code table will store city_code as primary key …

Member Avatar
Member Avatar
+0 forum 2

Hi all, I've made a query that gathers info from several tables, after it was working, there was the need to integrate yet another table, however I can't seem to put it to work. I've seen some of this "witchcraft" before, but can't seem to find a tutorial, basically because I don't know what to call it and google doesn't guess for me xD This block is working as intended: SELECT car.carID, car.carBAR, car.carTYPE, car.carNAME, car.paxMIN, car.paxMAX, car.babySEAT, car.boosterSEAT, car.maxLUGGAGE, car.carMARKUP, car.carSEASON, car.carOVERTIME, price.PRICE, price.DISCOUNT, toll.tollsPRICE FROM `AcarCONFIG` AS car INNER JOIN `ptFAOatt` AS price ON car.carID = price.carID LEFT …

Member Avatar
Member Avatar
+0 forum 3

hi my name is vishal for past 5 days i have been nuts of how to combine data from multiple tables into single table using sql select query (join query) Given below i have tried solution but i get error message data not found. But in table i have datas SELECT [Inward].[agn], [item_master].[item_name], [Inward].[no_of_bundle], [store_master].[rack_name], [store_master].[store_no] FROM (Inward INNER JOIN store_master ON [Inward].[store_no]=[store_master].[store_no]) INNER JOIN item_master ON [store_master].[user_id]=[item_master].[user_id] WHERE [item_master].[status]=True And [Inward].[deleted_status]=False And [Inward].[closed_status]=False And [Inward].[agn]<>0 And [store_master].[status]=True; however the problem lies in my sql select query above. I have to show agn field from table named Inward,item_name field from …

Member Avatar
+0 forum 0

I got a product table like this id | name | category 1 | name1 | 2,1,5,8,9 2 | name2 | 2,1 3 | name3 | 5,8 And I got a category table like this id | catname 1 | cat_name1 2 | cat_name2 5 | cat_name3 8 | cat_name3 9 | cat_name3 Each product can have multiple categories. Categories associated with that product are saved in a row named "category" in product table as "1,5,8,7", Where each represent category table's id. Now I want to display all the products came under a specific category. I am little bit confused …

Member Avatar
Member Avatar
+0 forum 5

I was wondering where there were other forums like this one. I really enjoy DaniWeb. There is one other forum that I really enjoy too, and its dofollow, called [SNIP - promoting my own forum] Forums like these are the reason I have helped get my site to where its at. I know there are a lot of great forums out there, but when do you stop at spam?

Member Avatar
Member Avatar
+0 forum 13

Hey guys, So, as the title says, trying to join four tables. The purpose of the script is to: 1. Get the username of members being "followed" from table called following 2. Find the status updates of members in step one from table called status 3. Retrieve all comments on status from step two from table named status_comments 4. Get the members avatar location from table named users I am posting from my phone at the moment, so cannot include the existing code.... I have no problems joining three of the four tables, just adding the fourth is killing me... …

Member Avatar
Member Avatar
+0 forum 1

So I have the following MySQL query, which works fine: select year(created_at) as year, month(created_at) as month, day(created_at) as day, item_sdb_id, price_per_unit from (select l.item_sdb_id, l.list_price / l.quantity as price_per_unit, l.created_at from listings as l inner join purchases as p on l.purchase_id = p.id where l.item_sdb_id in (12345) and p.created_at > '2013-07-09') as t1 group by year, month, day The problem is that instead of generating a price per unit of one item (12345 in this example) for each year, month, and day, I now want to sum the "list price/quantity" for a number of items (12345, 45278, 00154...), rendering …

Member Avatar
Member Avatar
+0 forum 3

i have four tables (1) tbl_module: modNo | modName _ _ _ _ _ _ _ _ 1 | module 1 2 | module 2 (2) tbl_subject subNo | subName | modNo _ _ _ _ _ _ _ _ _ _ _ _ 1 | a1 | 1 2 | b1 | 1 3 | c1 | 1 4 | a2 | 2 5 | b2 | 2 (3) tbl_student studNo | studName _ _ _ _ _ _ _ _ _ 1 | name1 2 | name2 (4) tbl_grade gradeNo | studNo | subNo | grade _ _ …

Member Avatar
Member Avatar
+0 forum 3

Hi All, Firstly I will say that this exercise is for my learning experiences through an online course. However I have spent a combined total of about 6 hours working on this question and I am completely stumped on how to get the correct answers. The question: > List the Title, Name and date of appointment for Governors General of Australia who were appointed between 01 January 1930 and 01 January 1960, together with the Prime Ministers who appointed them and all Leaders of the Opposition who served during their appointment. The date is to be formatted in dd/mm/yyyy format. …

Member Avatar
Member Avatar
+0 forum 2

Hi there, I have 3 tables to extract data from. My query thus far is: SELECT `ministry`.`pm_name` AS 'Name', DATE_FORMAT(`ministry`.`min_begin`, '%Y') AS 'Election Year', `ministry`.`party` AS 'Party Led', `deputy_name` AS 'Deputy PM', COUNT(DISTINCT `ministry`.`min_begin`) AS 'Times Elected PM', `GG_name` as 'GG Name', `gg_title` as 'GG Title' FROM `ministry` JOIN `deputy_pm` ON `ministry`.`min_nr` = `deputy_pm`.`min_nr` LEFT JOIN `governor_general` ON `ministry`.`pm_name` = `governor_general`.`pm_name` WHERE `min_begin` <= '1930-01-01' AND `ministry`.`party` <> 'ALP' GROUP BY `ministry`.`pm_name` Which returns the correct results of 7 rows. However the 7th row, in the GG_name and GG_title fields are null. This is because in the governor_general table there …

Member Avatar
Member Avatar
+0 forum 1

I have in table columns name and rc. I retrieve values by select in php by js code info array. I want to display this values in html table with other values by javascript. My question: Whats way to join values name and rc in js? I need to join values and split them by CRLF and display them in one tag <td>.But in js. $sql = "select rc, meno from jqcalendar where sala_typ='$sala_typ' and left(StartTime,10) ='$datumvykonu'"; $handle = mysql_query($sql); $retArray = array(); while ($row = mysql_fetch_row($handle)) { $retArray[] = $row; } $data = json_encode($retArray); $ret = "{data:" . $data …

Member Avatar
Member Avatar
+0 forum 1

Hi, I'm confused right now about mysql statement I have four tables : form1 | form2 | form3 | form4 | ----------------------------------------------------- k8regNo | form2_ID| k9regNo | form4_ID | consignee | goods | out_date| k9regNo | moveDt | k8regNo | | form2_ID | can i join this four tables..?

Member Avatar
Member Avatar
+0 forum 17

Hello there, I have problem as: have two tables **Candidate** and **candidate_interview** for perticular vacancy_ID , Candidate's status becomes "In Proces" and when his interview is schedule , entry is added in candidate_interview table againt that vacancy with status In Process. now what i want is , such candidates whose staus is in process but they are not in candidate_interview table yet. (Means in short thire interview is not scheduled yet) Pleas help mw with query.

Member Avatar
Member Avatar
+0 forum 5

Hello, I have two tables one for the company staff and one for their projects(table name objecte). The table objekte has 4 colums that are connected with the id of the staff. The problem is that I want a query that shows all staff's names. I have also included the sql of the tables in this post and a preview of what I am going to do. Can someone help me?

Member Avatar
Member Avatar
+0 forum 4

Hello, I am trying to create an outer join in Linq using DefaultIfEmpty. It does not seem to be working. Basically I want c.TotalAmount to be 0 if it does not exist in the second/right table. Any ideas as to what I might be doing wrong? The query does execute, but it seems to still work as an innner join. I do not get any results where the join fails. Thanks very much. var rtaloBySystem = (from r in RTLO from c in contractCoverageBySystem.DefaultIfEmpty() where r.System_ID == c.System_ID && r.Month == c.Month && r.Year == c.Year select new Allocator() {Month …

Member Avatar
Member Avatar
+0 forum 1

I have 3 tables as mentioned below: Users Code Name NW London 1 Bill ---- ---- Contacts Code Country 1 USA Location Country City USA NW I need to update Users.NW = 1 in the Users Table. There are other cities like NW, London, Paris etc. In respective cities i need to update 1 and rest should be 0. So, expected output 1 Bill 1 0 2 Steve 0 1 I hope i am clear to you. Thanks in advanced. This query is not working: UPDATE Users SET NW='1' WHERE (SELECT Users.Code, Contacts.code FROM Contacts LEFT JOIN ON Users.code = …

Member Avatar
Member Avatar
+0 forum 3

The End.