7,494 Archived Topics

Remove Filter
Member Avatar for
Member Avatar for bhallarahul

Hello Today i install mysql on my system and after that when i try to run the server it didn't start from the startup and when i try to run theserver through cmd i found the given error. C:\Program Files\MySQL\MySQL Server 5.6\bin>mysql ERROR 2003 (HY000): Can't connect to MySQL server …

Databases mysql storage
Member Avatar for paulkd
0
431
Member Avatar for brandon66

There are two products Harmony Field Unit, and Tuner. The Harmony Field Unit has a Test Date, Test Station, and Test Results that need to be tracked. The Tuner has a Serial Number, Firmware version, and Hardware Version that needs to be tracked. The Harmony Field Unit is made up …

Databases mysql
Member Avatar for brandon66
0
158
Member Avatar for krunal1986

hi, how to convert db table column datatype from varchar to binary(16) in sql server 2005? thanks

Databases mssql sql
Member Avatar for pritaeas
0
322
Member Avatar for krunal1986

Hi All, i have requirement like to Convert rows to columns in SQL server. i have retrieved data like below: MatchId SelectionName Odds 322 Home Win 1.33 322 Draw 5.00 322 Away Win 9.00 322 Under 2.5 2.40 322 Over 2.5 1.53 and want to convert like below: MatchId Home …

Databases client-server mssql sql
Member Avatar for urtrivedi
0
352
Member Avatar for fashxfreak

Hi ! I have a column of 'City', now I want to compare the value of each cell of 'City' against the column 'City_Check'; the cell where the value matches, pick the value of 'City_ID' column & replace the city name with that ID in the 'City column'. * The …

Member Avatar for urtrivedi
0
261
Member Avatar for nao.chungs

I made this code: INSERT into author(authorfirstname1, authorlastname1,authorfirstname2, authorlastname2) select '".addslashes($_POST['authorfirstname1'])."','".addslashes($_POST['authorlastname1'])."','".addslashes($_POST['authorfirstname2'])."','".addslashes($_POST['authorlastname2'])."' from author where not exists(select authorfirstname1, authorlastname1, authorfirstname2, authorlastname2 from author where author.authorfirstname1='".addslashes($_POST['authorfirstname1'])."' and author.authorlastname1='".addslashes($_POST['authorlastname1'])."' and author.authorfirstname2='".addslashes($_POST['authorfirstname2'])."' and author.authorlastname2='".addslashes($_POST['authorlastname2'])."' ); The point of this code should be that it checks, if a value allready exists in database and if …

Databases
Member Avatar for nao.chungs
0
219
Member Avatar for draven07

Need help! As you can see, I'm working with a crosstab report that will display the product's "Total Sales" or "Quantity Sold" on a particular year in a monthly basis. Now my problem is, I can't figure it out how I can display the monthly total sales or quantity sold …

Databases mssql
Member Avatar for LastMitch
0
223
Member Avatar for Stuugie

Hi All, I'm a little stuck with one table's design. I have a table called tblConference_Board that will be updated approximately 3 to 4 times per year. The following is my table design: `CB_ID int (PK)` `CB_Mnemonic_ID int (FK)` `CB_Value decimal (18,10)` `CB_Year int` `CB_Quarter int` This table is loaded …

Databases mssql
Member Avatar for Reverend Jim
0
241
Member Avatar for Stuugie

Hi All, I have a table that holds monthly data in it. I need to average that data into Quarterly and Annual data but I'm not sure how to go about that. For annual I tried something like: SELECT TOP (100) PERCENT b.vSeries_Type as [Description],b.vSeries_Number as [CANSIM], Year(a.IPI_Ref_Date)as [Year], avg(a.IPI_Value) …

Databases mssql
Member Avatar for Stuugie
0
150
Member Avatar for de Source

hi i am new to sql i want to get some values from different tables and i have made my own logic like that "SELECT course_name, course_id FROM tbl_course WHERE course_id = (SELECT course_id FROM tbl_enrollment WHERE student_id = '" + lbl_StudentID.Text + "')" what could the correct sytax for …

Databases mssql sql
Member Avatar for de Source
0
252
Member Avatar for Tinnin

Hi all, I'm trying to run a stored procedure: BEGIN SELECT YFR_Master_Fundraisers.FRName, YFR_Master_Fundraisers.FRActive FROM YFR_Master INNER JOIN YFR_Master_Fundraisers ON YFR_Master.FundRaiser = YFR_Master_Fundraisers.FRNameCode GROUP BY YFR_Master.FundRaiser HAVING MAX(YFR_Master.CollectionDate) < DATE_SUB(CURDATE(),INTERVAL 2 MONTH) AND YFR_Master_Fundraisers.FRActive = 1; END But I'm getting the following error: Procedure execution failed 1312 - PROCEDURE db355379982.Deactivate can't …

Databases mysql
Member Avatar for Tinnin
0
183
Member Avatar for OsaMasw

Hi buddies how are you, now am using replication for mysql database from one server to other Master-slave replication, using this article https://www.digitalocean.com/community/articles/how-to-set-up-master-slave-replication-in-mysql but this not satisfied my needs, I have multiple server and all their databased replication to single slave server to be more accurate, I have servers **A**, …

Databases mysql
Member Avatar for cereal
0
194
Member Avatar for sparksguy

i am trying to make this code work with no success. Can anyone help me? ` $to = $_POST["credits"]; $messaging = $_POST["message"]; $sub = $_POST["subject"]; @mysql_query("INSERT INTO `mp_creditmail` (`Id`, `message`, `subject`, `read`) ('select Id from oto_members ORDER BY RAND() Limit $to;', '$messaging', '$sub', no");` i am trying to insert several …

Databases mssql
Member Avatar for sparksguy
0
216
Member Avatar for dina85

what's wrong with my code at line 6, it's give blank page, the output can't display. $kp = $_POST['kp']; $kp2 = $_POST['kp2']; $kp3 = $_POST['kp3']; require("conn.php"); $sql = "select * from pemohon where kp_baru='$kp' AND kp_baru2='$kp2' AND kp_baru3='$kp3'";

Databases sql
Member Avatar for pritaeas
0
141
Member Avatar for calibi.yau

Hi all I'm really hoping someone here can help me out with this one... I'm trying to search through a table via php but having difficulty with case - The problem is the data I'm searching through is encrypted (aes_encrypt) and it doesn't seem to matter what I do the …

Databases mysql
Member Avatar for udaypatelmca
0
1K
Member Avatar for andika.kurniawan.121

There are two tables "LESSON" TABLE Attributes : - id_lesson -lesson_name - semester "LECTURES" TABLE Attributes : - id_lectures - id_lesson - id_lecturer - hour - day How to display all atributes in lectures table where lessons in 2nd semester ? Note : there's id_lesson in lectures table

Databases mysql
Member Avatar for TonyG_cyprus
0
141
Member Avatar for fashxfreak

I have data in which column 'C' have cells which contain multiple values separated by (,).Now I want to get atomic values in all cells of column 'C'. i.e. that for a cell when there is more than one value; separated by (,) it should be copied in the next …

Databases microsoft-office
Member Avatar for fashxfreak
0
970
Member Avatar for chrispitt
Member Avatar for Tinnin

Hi all, I have the following query: SELECT A.Name, MAX(B.VisitDate) AS 'Last Visit Date', A.Active FROM B INNER JOIN A ON B.NameCodeB = A.NameCodeA GROUP BY B.NameCodeB HAVING MAX(B.VisitDate) < DATE_SUB(CURDATE(),INTERVAL 2 MONTH) AND A.Active = 1 This selects a list of all people in the database who last visited …

Databases mysql
Member Avatar for Tinnin
0
200
Member Avatar for Stuugie

Hi All, I sort of want to get a "best practices" perspective regarding numeric values. First, I'll give my scenario: In my SSIS package, a CSV file is used for data extraction. Once extracted, a staging table is loaded with all the values from the CSV. One column, called "IPI_Value" …

Databases dataset mssql
Member Avatar for Stuugie
0
164
Member Avatar for moomal.razak

I have to make a database system that is purely on SQL Server. It's about a diagnostic lab. It should contain at least 40,000 distinct patient records. I have a table named "Patient" which contains an auto-generated ID, Name, DOB, Age and Phone number. Our teacher provided us with a …

Databases sql
Member Avatar for pritaeas
0
366
Member Avatar for Stuugie

Hi All, I'm working on filling a user variable called "EmailString" via a db connection with SSIS. I've created a script task to do this (the only way I can see how) and in it I have the following code: Public Sub Main() ' ' Add your code here ' …

Databases mssql
Member Avatar for Stuugie
0
297
Member Avatar for Black_Lion

Hi all. I have run into a problem with inserting values into table. I have 2 tables: PUBLISHER with fields: PUBLISHER_CODE (Primary Key) and PUBLISHER_NAME. BOOK table fields: PUBLISHER_CODE (Primary Key and Foreign key to PUBLISHER table) and TITLE. The user enters bookCode and publisherName into 2 textboxes Here is …

Databases sql
Member Avatar for JorgeM
0
252
Member Avatar for batuzai04123

Hi, I am currently working on joining 2 tables, however those tables have different number of columns thats why I have difficulty on joining them. I tried to use FULL OUTER JOIN, close result but still not my expected output. You can kindly see my attachment to see the scenario. …

Databases oracle sql
Member Avatar for batuzai04123
0
314
Member Avatar for Papa_Don

Hi Group! I've created a stored SQL procedure that will need to be modified to lock the table, run the commands and then unlock the table. I need to do this because I want any other users/programs that will need access to "wait in line" until the procedure is finished. …

Databases mssql sql
Member Avatar for Papa_Don
0
1K
Member Avatar for grant.baker

I'm trying to sum all numeric fields individually. I won't always know the field names, otherwise I could manually construct the query `SELECT SUM(Field1) as Field1, SUM(Field2) as Field2...etc FROM myTable` Is there a way to construct this on the fly in mysql? I'm thinking there's probably a way to …

Databases mathematics mysql
Member Avatar for grant.baker
0
245
Member Avatar for nisbusiness
Member Avatar for IIM
0
131
Member Avatar for brandon66

How would i create the tables for this information; the dmr and tuner are products but there is going to be like 200 dmrs 50 tuners they each have different serial numbers how would i track each tuner and dmr with different serial numbers? Products DMR dmr id ISN dmr …

Databases
Member Avatar for brandon66
0
187
Member Avatar for WDrago

All, I want to insert data into 6 tables. One of those tables has a primary key field that auto-increments (let's call it ID). The other tables use that ID number as a foriegn key. My question is, how do I know what the newly generated value of ID is …

Databases
Member Avatar for Admin ESSL UK
0
167
Member Avatar for eltonpiko

hi im working on a project please have a look at the form i need to design the database but i think i will need to instered those info in mutiple tables. ![63d1ebd9a2c0d208980442ded72fb618](/attachments/small/3/63d1ebd9a2c0d208980442ded72fb618.jpg "align-right") hope some one can help me out with this one.the sss1 radio option corespond to the …

Member Avatar for eltonpiko
0
183
Member Avatar for sathishnadu

Hi I am not understanding , why the subquery of given query is converting into dependent subquery. Although the subquery is not dependent(not using primary query table) on main query. I know that this query can be optimized using joins,but here i just want to know the reason of this …

Databases mysql
Member Avatar for sathishnadu
0
276
Member Avatar for 404notfound

Using Access, in one table, I have Social Security numbers and earnings/tax records, and in the other table I have Social's and emp id's. I'm trying to get an output to a tablegridview, and using the following query line. SELECT AcctNum,SUI,SDI,FICA,Medicare,State,Fed,TotWages FROM tblEarnings INNER JOIN tblPersonel On tblEarnings.SS=tblPersonel.SS I've been …

Databases vb.net
Member Avatar for JorgeM
0
5K
Member Avatar for dartiss

Hi, I have a very specific issue that I'm unable to work out a solution to. It's related to WordPress, but that's for context and isn't otherwise relevant. I have a table named wp_options. It's used to store various option information using 2 fields - option_name and option_value. These are, …

Databases mysql wordpress
Member Avatar for dartiss
0
236
Member Avatar for shujat132

Hi I am fresh Graduate, but actually I am little bit week in databases, so I am trying to improve my skills, that is why I am reading a book of database, where a case (details of case study and tasks are attached in “case study.doc” document) is giving to …

Databases
Member Avatar for shujat132
0
6K
Member Avatar for kamil.metkowski

I want to update a colume using results from an select query but its not working :( my code: UPDATE goods SET goods.wagons_needed = (SELECT (goods.QUANTITY * WEIGHT) / max_payload as wneed FROM GOODS INNER JOIN wagon_type ON goods.wagon_type_id = wagon_type.wagon_type_id order by goods.goods_id) where goods.goods_id = goods.goods_id; Thanks for …

Databases sql
Member Avatar for IIM
0
215
Member Avatar for cmps

Hello, I want to create tables in database (using SQL) and add foreign keys to each table refering to the other one. For example: CREATE TABLE ONE( ID INT NOT NULL, NAME VARCHAR(20) NOT NULL, TWOID INT NOT NULL, PRIMARY KEY (ID), FOREIGN KEY (TWOID) REFERENCES TWO (ID) ON DELETE …

Databases oracle
Member Avatar for pritaeas
0
365
Member Avatar for taekiewzz

I have a table called `DUTY` (columns: `dutyid, dutyname, staffid`) and a table called `STAFF` (columns: `staffid, staffname`) In order to be fair, each of the staff will be auto assigned to each duty entry (record). So what should I do whenever I would like to insert a duty entry, …

Databases mssql
Member Avatar for pritaeas
0
252
Member Avatar for xxmp

I have these databases h1 h2 h3 Where each database has the quantity of items that are available to be sold from shop1, shop2 and shop3. I want my data to be concurent. For example 2 users may want to buy the same item the same time and the manager …

Databases mysql
Member Avatar for LastMitch
0
133
Member Avatar for Lethugs

Hi Im working with a project, simple IM for our office... I have a Table in sql with column Status, if a user opens this application, the status column changes from 0 to 1, if it closes this app, the status turn back to 0. On my form load event, …

Databases mssql sql vb.net
Member Avatar for Lethugs
0
281
Member Avatar for jrosh

CAn i use 'waitfor' in t sql in sql server 2012 to wait in terms of days? eg. Wait three says after an event to do something else? Thankx in advance

Databases mssql
Member Avatar for pritaeas
0
93
Member Avatar for gumbi17

I am moving from database from Microsoft Access to MS SQL and I have not worked with MSSQL before, can you recommend a good place to get some initial and then follow on training in SQL and MS SQL?

Member Avatar for Reverend Jim
0
519
Member Avatar for coolrosy

hey hai eveybody help me in sql..i have three fields namely passengerGender1,passengerGender2,passengerGender3 in single table..now i want to take count for female and male separately from the three fields..it is posssible friends?can anyone help me???thanks in advance...!!

Databases mysql sql
Member Avatar for EvolutionFallen
0
237
Member Avatar for sathishnadu

Can any one guide me as I what a query in SQL that change all 'a' in string to 'b' in first_name column in name table. Here is my columns name: first_name | list_name

Databases mysql sql
Member Avatar for sathishnadu
0
153
Member Avatar for Xcrypted12

Hello everyone, I am having a hard time finding the information I need and am hoping you all can help. I am using sql developer and I have a database named us that holds 5 tables and a database named uk that holds the same 5 tables. It is a …

Databases oracle
Member Avatar for Xcrypted12
0
150
Member Avatar for Dazzler123

Hello! I need some help with a stored procedure for insert. I know this might sound stupid but I'm a beginner and I know the answer is there but I just can't find it. I've searched the site but I couldn't find an answer to clear me out ...or maybe …

Databases mssql
Member Avatar for pritaeas
0
204
Member Avatar for dhani09

I have the following tables **tbl_cat** -- id(pk), category (PRODUCT CATEGORIES) **tbl_subcat** - id, catid, subcat (catid is a foregin key referencing id in **tbl_cat** ) - SUB CATEGORIES I want to prepopulate my tables with categories and sub-categories of products. it's quite straightforward to insert categories in **tbl_cat** but …

Databases
Member Avatar for dhani09
0
126
Member Avatar for jrosh

I am using sqlserver 2012. i want to convert nvarchar value from a table in to an integer. How can i do it? i am using it in a stored procedure. and nvarchar value only contains numbers. What i want to do is to multiple that nvarchar value and assign …

Databases
Member Avatar for edmond.lohman
0
174
Member Avatar for spowel4

I have a table with several columns, the two relevant columns for what I need to do are invoiceNumber and stockNumber. The scenario here is that it's a table of invoice information, so each invoice can have and will most likely have multiple rows in the table which represent each …

Databases mssql
Member Avatar for spowel4
0
152
Member Avatar for IT_Techno

Hi iam using sql server 2008 to deal with my DB, i have a column with 'int' data type when i insert number inside that column like "0025648" it return it to me "25648" without zeros why ? and how to solve this problem ? Best Regard IT_Techno

Databases client-server sql
Member Avatar for IT_Techno
0
202
Member Avatar for bibiki

Hey there, I need help with writing a query so I figured I'd ask here. Let me thank you in advance for your answer. I need to see how often a value inside a certain column appears in a table. Say for example I have a table Person, that has …

Databases
Member Avatar for bibiki
0
164

The End.