1,079 Recommended Topics

Remove Filter
Member Avatar for
Member Avatar for Transcendent

I have created a function in mysql but when I call it using: SELECT myFunction(3); it says it does not exist. I checked my server and it is in there. I have also tried this also: INSERT INTO myTable(num, num2) VALUES (15, (SELECT myFunction(15))); Is this right and how do …

Databases mysql
Member Avatar for jstfsklh211
0
211
Member Avatar for Santanu Das

I use SQL Server2008 R2. From yesterday, I get a problem to open it. When I try to open it by Microsoft SQL Server Management Studio an error is occurring. And I also get the same error when I call it from vb.Net2010. I am attaching here the error picture. …

Databases mssql
Member Avatar for Santanu Das
0
172
Member Avatar for nufftalon

Hi if not too much hassle would like some general guidance on how to go about moving an existing clients drupal website. I never dealt with drupal as of yet. I was gonna host him and do changes for him. His old company gave me a folder with files in …

Databases
Member Avatar for nufftalon
0
230
Member Avatar for shammi.khan.73

//In Node/JS myDate = moment(data.myTime.format('YYYY/MM/DD HH:MM:SS')).toISOString(); //myDate shows '2014-09-24T04:09:00.000Z' Insert INTO (dateColumn..) Values(myDate)... This is the error I get after inserting, note column in Mysql is a "datetime" type. MySQL Error:: { [Error: ER_TRUNCATED_WRONG_VALUE: Incorrect datetime value: '2014-09- 24T04:09:00.000Z' for column '_dateColumn' at row 1] code: 'ER_TRUNCATED_WRONG_VALUE',

Databases mysql
Member Avatar for cereal
1
1K
Member Avatar for JOSheaIV

Alright, so the following has stumpted me and a few others in the office, and we just can't figure it out. I have develope a program that allows us to go out to a specific database and search one of the fields based on specified values. Now that seems all …

Databases seo sql
Member Avatar for diafol
0
5K
Member Avatar for davy_yg

Column 'group_id' in where clause is ambiguous. I wonder why? invoice.php <?php //LOAD GROUP $result2 = mysql_query("SELECT group_name FROM `group` INNER JOIN invoice ON `group`.group_id = `invoice`.group_id WHERE group_id = '".$_GET['group_id']."' ORDER BY group_date") or die(mysql_error()); $result = mysql_query("SELECT * FROM `invoice` WHERE group_id = '".$_GET['group_id']."' ORDER BY group_date ASC") …

Databases mysql
Member Avatar for Adrian_5
0
566
Member Avatar for ankit1122

hello i have seen that tables are locked in mysql while reading the same table..so should i continue using mysql in my website...

Databases mysql
Member Avatar for steelbrain
0
283
Member Avatar for jdm

I'm trying to create a store procedure in mysql and it is giving me errors and I don't know why since the sql code works just find. Here is the sql code: CREATE TEMPORARY TABLE IF NOT EXISTS table2 AS ( select AVG(Score) as AVG, MovieCode from UserMovies group by …

Databases mysql sql
Member Avatar for jdm
0
275
Member Avatar for James_30

Can someone recommend a book or some reference to properly code DAO`s and apache derby client driver. The derby manual did mot cover this I will display my code in my next post

Databases apache
0
96
Member Avatar for SimonIoa

When i copy a text and upload it the output looks like that PROLOGUE\n\n\nIF you leave the city by the Porta Maggiore and take the Via\nPrænestina, which leads east into the Sabine hills, at some thirty-six\nkilometers i want to replace \n with a line break i use this `UPDATE messages …

Databases
Member Avatar for steelbrain
0
408
Member Avatar for tech291083

Hi, I am using Oracle 10g on Fedora Linux and trying to learn a bit of pl/sql. Here is the piece of code that I today tried to run in the SQL Plus window but it back with an error message saying [B]SP2-0640 Not connected [/B]What could be the problem? …

Databases oracle
Member Avatar for vitaliy.natarov
0
9K
Member Avatar for Chem_1

I am interested to do practice on oracle database.Actually i had completed course on MYSQL,now i want to try on oracle.Today i have opened the oracle website to download oracle 11g(windows7 64bit),But in downloads only Oracle Database 11g Express Edition R2 is there.What to do now?For Mysql workbench is there …

Member Avatar for jwenting
0
314
Member Avatar for gbhs

Hi if myTable has a column like Col 10 7 3 5 9 4 How can I select three smallest numbers? my resultset should be 3 4 5 I don't prefer the following; with myT as (select col from myTable order by col) select top(3) from myT Any better idea? …

Databases mssql
Member Avatar for gbhs
0
251
Member Avatar for James_30

I intend to build the web app using a database on a server. I have tomcat running. I am. Working on creating the server on eclipse (mars). I was planning on working with MySQL. What additional set up do I have to do to work with this db in my …

Databases mysql
Member Avatar for James_30
0
244
Member Avatar for come_again

Hello everyone, I am putting together a project where people are able to upload multiple choice questions to a larger database and then create tests from them. I have several questions (and I apologize for the length of this post) about what is the best way to go about doing …

Databases sql
Member Avatar for diafol
0
221
Member Avatar for M.I.Sahil

I am developing a inventory software in VB6 using MS Access 2010 as Database, We have a main Store where we receive Products from different Vendors and then distribute the products to our sub-stores located at different locations. I want to create a Periodic activity report of (Inventory) Products at …

Databases
Member Avatar for adam_k
0
220
Member Avatar for AmrMohammed

Greetings I want to optimize a SQL Query. The problem I have a database full of such Queries and I need help for optimizing those Queries the problem with the Query is that it contains dozens of CASE blocks and within those CASE blocks there are calculations the Query results …

Databases mssql
Member Avatar for pritaeas
0
217
Member Avatar for Vb.Netter

I have a simple sql table with four columns The data types are Athlete nvarchar(30) Mydate date Mytime varchar(8) Session nvarchar(40) Sample Data **Athlete Mydate Mytime Session** Jerry 14/07/2014 00:00:32 200M Jerry 14/07/2014 00:00:31 200M Jerry 16/07/2014 00:00:59 400M Jerry 16/07/2014 00:00:57 400M Jerry 16/07/2014 00:00:58 400M Now what i …

Databases mssql
Member Avatar for adam_k
0
192
Member Avatar for amishraa

How do I get average of the duration for multiple weeks. Currently I get something like Student Avg completion time Week Year STUDENT 1 0 1 2013 STUDENT 1 5 1 2013 What I want is Student Avg completion time Week Year STUDENT 1 2.5 1 2013 <code> select a.student,avg(a.duration) …

Databases mssql
Member Avatar for adam_k
0
167
Member Avatar for bolfescu

Hy i have this table, unfort i dont know how to retrieve the data from sql and to put it one under each one i have all the 18 tablesi whant to do something like this: (id1) 2 3 4 5 6 7 8 ..... (id2) 2 3 4 5 …

Databases mysql
Member Avatar for bolfescu
0
149
Member Avatar for James_30

I have a JDesktop app using apache derby embedded db. Without totally rewriting the app can it have the same db but on a server?

Databases
Member Avatar for James_30
0
143
Member Avatar for bolfescu

Hy ihave this phpcode, how can i paginate this?to make more pages from the sql results... because i have a lots of rows... <?php $qry=mysql_query("SELECT *,replace(category, ',', ' ') as category FROM articles ORDER by articles.id DESC ", $con); if(!$qry) { die("Query Failed: ". mysql_error()); } /* Fetching data from …

Databases mysql
Member Avatar for pritaeas
0
109
Member Avatar for bolfescu

I have this sqlqry, icarrelli have the value 0 and the q2 value 64(sum) why the result is 64 and not -64? <?php $result = mysql_query("SELECT *,iCarrelli-SUM(q2) as total9 FROM articles,inc"); $row= mysql_fetch_assoc($result); echo "" . $row['total9'] . ""; ?>

Databases mysql
Member Avatar for pritaeas
0
93
Member Avatar for bolfescu

hy, unfor its not showing nothing...what it is wrong...? <?php include('config.php'); error_reporting(0); ?> <table border=1> <tr> <td rowspan="3">Ditta</td> <td colspan="6">mandatori riceve</td> <td colspan="6">mandatori consegna</td> <td colspan="6">saldo</td> </tr> <tr> <td colspan="3">carelli</td> <td colspan="3"></td> <td colspan="3">carelli</td> <td colspan="3"></td> <td colspan="3">carelli</td> <td colspan="3"></td> </tr> <tr> <td>carrelli con piastra luc.rosso</td> <td>carrelli con piastra luc.nero</td> …

Databases mysql
0
77
Member Avatar for lk123456

Hi, WebSQL has been deprecated but it is still useful for some applications at this time. How would I update a row of data saved into WebSQL, when using a foreach KnockoutJS binding? <table class='producttable'> 2. <tr> 3. <th>Name</th> 4. <th>Description</th> 5. <th>Price</th> 6. </tr> 7. <tbody data-bind="foreach: products"> 8. …

Databases
Member Avatar for lk123456
1
829
Member Avatar for lk123456

Hi, How would I save the data inputted into a list into WebSQL, when using a foreach knockoutjs binding? <table class='producttable'> <tr> <th>Name</th> <th>Description</th> <th>Price</th> </tr> <tbody data-bind="foreach: products"> <tr> <td> <input data-bind='value: name' /> </td> <td><input data-bind='value: description' /></td> <td><input data-bind='value: price' /> </td> </tr> </tbody> </table>

Databases
Member Avatar for lk123456
1
385
Member Avatar for minitauros

For some reason my triggers are recursing, while I think they shouldn't. I'll simplify the examples for the sake of you not having to read through all the code. Trigger 1: CREATE TRIGGER table_1_after_delete AFTER DELETE ON table_1 FOR EACH ROW BEGIN DELETE FROM table2 WHERE table2.table_1_key = OLD.table_1_key; END …

Databases mysql
Member Avatar for minitauros
0
1K
Member Avatar for Mike_H

I am trying to update the field id_key which is an unique value using uniqid() function. When I print to the screen the value for uniqid() [$id] is different for each record. Which is correct and is what I want. However when I go inspect the table all the values …

Databases mysql
Member Avatar for Mike_H
0
196
Member Avatar for HunainHafeez

I am receiving a Code in sms like "yyyy/mm-digit" (digit increments with every message). so i want to ensure that the code sent by user is exactly in that format otherwise another action. So how ? Here is my code to check but it always execute else block, why ? …

Databases mssql
Member Avatar for adam_k
0
194
Member Avatar for minhaajmuntasir.edoo

I have to design a computerized based system for a pre-primary school on Access. What are the advantages of having a computer based system rather than a manual one? Could you please help me identify the tables necessary that needs to be created.

Databases
Member Avatar for diafol
0
168
Member Avatar for radiancebox

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 …

Databases mssql sql
Member Avatar for kgariando
0
3K
Member Avatar for Lethugs

Hi, I need to compare record using sql ce I have this data, can be thousand rows ID Type Date Time 02-0009 I 01/02/2014 8:00 02-0009 O 01/02/2014 18:00 02-0009 O 01/03/2014 18:00 02-0009 I 01/04/2014 8:00 02-0009 O 01/04/2014 18:00 For every date there should be a 'I' and …

Databases mssql sql vb.net
Member Avatar for kgariando
0
318
Member Avatar for Maideen

Hi I have database in structure like below Newspaper State1 state2 state3 state4 ABC 1000 5684 5687 246 DEF 879 2547 2578 2357 But I need to the structure like below How can i change this Newspaper State copies ABC State1 1000 ABC State2 5684 ABC State3 5687 ABC State4 …

Databases mssql
Member Avatar for kgariando
0
312
Member Avatar for AmrMohammed

I need to setup SQL Server Express using the command line and also make the installation unattended I tried many command lines however each one of them did not work here is the last one: Setup.exe /ADDCURRENTUSERASSQLADMIN="True" /AGTSVCACCOUNT="NT AUTHORITY\NETWORK SERVIC" /AGTSVCSTARTUPTYPE="Disabled" /ASBACKUPDIR="Backup" /ASCOLLATION="Latin1_General_CI_AS" /ASCONFIGDIR="Config" /ASDATADIR="Data" /ASLOGDIR="Log" /ASPROVIDERMSOLAP="1" /ASSVCSTARTUPTYPE="Automatic" /ASTEMPDIR="Temp" /BROWSERSVCSTARTUPTYPE="Disabled" …

Databases mssql
Member Avatar for kgariando
0
310
Member Avatar for Mike Bishop

I am trying to calculate days between two dates so that I can find out if they fall in the 30 / 60 / 90 day bracket The calculation I am using is working fine ` DATEDIFF(day, dbo.TblReturnDetails.RcvdDate, { fn NOW() })` what I am trying to do now is …

Databases mssql
Member Avatar for Mike Bishop
0
241
Member Avatar for someoneelse

i am trying to figure out the syntax to do a SQL inner join from 2 different databases... The sameple code looks like this: select * from database1.dbo.table1 t1 join database2.dbo.table2 t2 on t1.field1 = t2.field2 but I dont know how to refernce the " database1.dbo" and "database2.dbo" parts.. can …

Databases mssql
Member Avatar for kgariando
0
234
Member Avatar for Thurston_1

I have written some SQL code which does not appear to work. Any pointers will be provided 1. Update Table 1 Column 1 with the value of Table 2 Column 1 2. Update Table 1 Column 2 with the value of Table 3 Column 1 3. Update must be based …

Databases mysql
Member Avatar for AndrisP
0
208
Member Avatar for bolfescu

Hy i have a db with 1 collum(with 20rows) i whant to create a custom table view of this database with the sum at the end of the table but with custom search function, i cand find an script to do this for me? Thanks

Databases mysql
Member Avatar for AndrisP
0
201
Member Avatar for bolfescu

Hy i have two tables articles and iniziale, articles have a collum c2,and iniziale have c1 i whant to do like this c1(whic its have one value only)- sum(c2)(entire collum) ive tryied like this but nothing...:( <?php $result = mysql_query("SELECT *,SUM(iCarl)-SUM(CarrelliCC22) as total2 from articles,iniziale"); $row= mysql_fetch_assoc($result); echo "<h4>" . …

Databases mysql
Member Avatar for bolfescu
0
196
Member Avatar for javed.iqbal.3979

Hi all, I have to clarify a few ambiguites regarding mysql client to use for i running database scripts 1).Firstly i want to flush the root password set by me earlier using :mysqladmin -u root password 'root password goes here'. 2).Second i am faced with a problem of "Acces denied …

Databases mysql
Member Avatar for Borzoi
0
159
Member Avatar for bolfescu

hy im using to show this qry $qry = mysql_query("SELECT * ,replace(category, ',', ' ') as category FROM articles ORDER BY ID DESC LIMIT 1"); how can adapt to this qry? $qry=mysql_query("INSERT INTO category(category) VALUES('$cat,$cat3,$cat2')", $con);

Databases mysql
Member Avatar for pritaeas
0
153
Member Avatar for ravi_14

the relation betwwen student and course entity is many to many.but it is not recommended .how can we convert it to two one to many relationships?

Databases oracle sql
Member Avatar for hericles
0
144
Member Avatar for hxinen

Hi, I need some help with my college work, with the database I am designing. # Assuming I want this to happen: # **Main Category:** Level1 Level1 >Level1.1 >Level1.2 >>Level1.2.a >>Level1.2.b >>>Level1.2.b.a >>Level1.2.b.a.a >>>Level1.2.b.b How do I design this? Thank you!

Databases mysql
Member Avatar for scarcella
0
3K
Member Avatar for Chem_1

While pressing start button in control panel it's showing some problem detected.

Databases apache mysql
Member Avatar for Chem_1
0
804
Member Avatar for terryds

Look at my table design below. It is a table that shows the roles of users. CREATE TABLE `userrole` ( `userid` bigint(20) unsigned NOT NULL, `roleid` int(10) unsigned NOT NULL, PRIMARY KEY (`userid`,`roleid`), KEY `fk_userrole_roleid` (`roleid`), CONSTRAINT `fk_userrole_userid` FOREIGN KEY (`userid`) REFERENCES `user` (`user_id`) ON DELETE CASCADE ON UPDATE CASCADE, …

Databases mysql
Member Avatar for Taywin
0
234
Member Avatar for bolfescu

Hy io have this php script(if you can call php script) anyway i whant that every result to show it one down the another(mysql grid table) but with that kind of search....i've tryied but unf nothing.... this is the "code" <?php $i = 0; if ($_REQUEST["string"]<>'') { $search_string = " …

Databases mysql
Member Avatar for pritaeas
0
200
Member Avatar for davy_yg

studentmgt.php $search = $_GET['search']; echo $search; ?> <div align="center"> <div style="width:700px;text-align:left;padding-top:5px;"> <?php if (isset($confirmation)) { echo $confirmation; } ?> <form method="get" action="<?php $_SERVER['PHP_SELF'] ?>"> <br/> <?php //LOAD STUDENTS INFO $result = mysql_query("SELECT * FROM `student` INNER JOIN `group` ON group.group_id = student.group_id INNER JOIN `access` ON access.access_level_id = student.access_level_id ORDER …

Databases mysql
Member Avatar for pritaeas
0
173
Member Avatar for otengkwaku

Hi guys i have an sql query string that in my view there is something wrong with it but i an handicaped since i am very new to sql so my question is, is there any way of optimizing this query string select t1.cat,t1.site from (select cat,site from news where …

Databases mysql sql sqlite
Member Avatar for cereal
0
388
Member Avatar for otengkwaku

Hi guys i have a table with this data ______________ | site | cat | ______________ | my | sp | | my | sp | | my | cc | | my | cc | | yo | sp | | yo | sp | | yo | cc …

Databases mysql sql sqlite
Member Avatar for otengkwaku
0
221
Member Avatar for divyakrishnan

Hi.. I want to call mysql Stored procedure with OUT parameter. Its worked in phpamyadmin But in php it returning empty result. I have used the following php script. Can anyone help me? <?php include("dbcon.php"); $countryname="india"; $rs1 = mysql_query( 'CALL countCountry($countryname,@totalcount)' ); $rs = mysql_query( 'SELECT @totalcount as totalcount' ); …

Databases mysql
Member Avatar for divyakrishnan
0
4K

The End.