2,403 Solved Topics

Remove Filter
Member Avatar for
Member Avatar for lkrvk

hi, guys i have a problem here. i have a form which creates a new table for each new user and that user will have a monthly update of his salary now im confused how to go about this. do i need to create a new table or how to …

Databases mysql php
Member Avatar for smantscheff
0
190
Member Avatar for snowweb

I am trying to implement a CSS hierarchical unfolding menu on a site. The thing is, it needs to be dynamically populated from the results of a database query. I previously had the menu working but then it was ‘hard coded’ and not built on the fly. Menu description: 2 …

Databases mysql php
Member Avatar for janajay
0
2K
Member Avatar for dkaptain

I need to record insert statements, who did them, and when. I am adding triggers to tables and putting the freshly inserted data into a sql_log table. Everything is working well except one thing. I want dates, times, and timestamps to be surrounded by quotes. Just like they would be …

Databases mysql
Member Avatar for dkaptain
0
2K
Member Avatar for deolalkar_pooja

Hi to all, table name: mail email name [email]abc@gmail.com[/email] abc [email]def@rediff.com[/email] def [email]pqr@yahoo.com[/email] PQR [email]xyz@daniweb.com[/email] XYZ ======================================= QUERY: List all email and names in lower letters without any blanks. ======================================== I ran ltrim(), rtrim() and lower() function on data successfully. But fail to retrieve this data. Will you please help …

Databases oracle
Member Avatar for debasisdas
0
111
Member Avatar for fuston05

Having trouble storing dollar amounts in the thousands due to the "," that gets inserted once the number becomes 1, 000.00. Any advise?

Databases mysql
Member Avatar for fuston05
0
189
Member Avatar for MargateSteve

I currently have two queries that separately show goals scored and appearances made by players in a football team but need to bring them together in one query so I can aggregate results against each other, as well as output records from both in one html table. The two queries …

Databases career mysql
Member Avatar for smantscheff
1
306
Member Avatar for indr

how do i find the foreign key and primary key constraints of a particular table through a sql query?

Databases mysql
Member Avatar for indr
0
94
Member Avatar for emaduddeen

Hi Everyone, I have a table that has a 2 column primary key. I set up the key where the 2nd column is an identity column. When I ran my VB application I discovered the ID (2nd column) did not increment the correct way. I was hoping it would increment …

Databases mssql sql visual-studio
Member Avatar for emaduddeen
0
183
Member Avatar for McLaren

Hi, today for the first time I get this error Lock wait timeout exceeded; try restarting transaction when using sentence [CODE] UPDATE info_psl SET eil_nr = eil_nr + 1 WHERE eil_nr >= 4 [/CODE] The table is such [CODE] CREATE TABLE IF NOT EXISTS `info_psl` ( `psl_id` int(11) NOT NULL …

Databases mysql
Member Avatar for McLaren
0
485
Member Avatar for mrhankey

hi, i have a site which i want to generate a weekly report of activity from. the monthly report should be fine as i could set the query to format the date into month and where "date" is NOW() however how can i generate a weekly report in mysql? any …

Databases mysql
Member Avatar for mrhankey
0
5K
Member Avatar for zensys

I have a database oriented at clients and services provided. In several tables I would like to store documents, e.g. under clients a copy of passport and under companies a copy of the articles of association, mostly pdf's and doc's. Currently I have the documents stored in the respective tables …

Databases pdf
Member Avatar for zensys
0
149
Member Avatar for codeblock

Hi all, i have a problem in writing a block of SQL code in mysql. The block of code will have too delete a single row/record from about 23 related tables all at once. The code that i have written so far will only delete 1 row/record in 10 related …

Databases mysql
Member Avatar for codeblock
0
138
Member Avatar for codeblock

Hi all, i have a problem in writing a block of SQL code in mysql. The block of code will have too delete a single row/record from about 23 related tables all at once. The code that i have written so far will only delete 1 row/record in 10 related …

Databases mysql
Member Avatar for codeblock
0
138
Member Avatar for agriz

Hi, There are three tables involved here. A kind of quiz localhost site, i did for me. Table 1 contains questions. ========================== question_id (autoincrement) questions (varchar 250) category_id Table 2 contains choices ======================== Choice_id (autoincrement) Choice_value (varchar) question_id Table 3 contains answers ======================== question_id choice_id I am displaying 10 questions …

Databases mysql
Member Avatar for smantscheff
0
314
Member Avatar for Micksnothere

Hello, Question: List the top 25% of employees in terms of sales. Your list should include employee number, last name, first name, total number of orders, total sales. Here is what I have so far (not sure if my inner joins or even the query is totally correct): select e.employee_no, …

Databases oracle sql
Member Avatar for debasisdas
0
129
Member Avatar for mrhankey

hi, i have found a few ways on the internet to import an excel sheet into mysql. one of which is save to a csv and upload to a site which creates the sql statements and this is great and i have used in past. however my problem is i …

Databases mysql
Member Avatar for mrhankey
0
157
Member Avatar for webteam

Hi, I'm putting an autocomplete textbox on my website to help users type in a location. I want users to be able to type a city or just a state (ex. Seattle, WA or Washington) kind of like what you see on Indeed ([url]http://www.indeed.com[/url]). How do I get the states …

Databases mysql
Member Avatar for jlego
0
428
Member Avatar for Zolcos

This is on my Gentoo box. Recently, a MySQL upgrade seems to have broken my UDFs, specifically those in lib_mysqludf_preg. I first noticed errors like: FUNCTION tablename.PREG_RLIKE does not exist I figured, OK, I must have to reinstall them. I try the config command for lib_mysqludf_preg and get this: ERROR …

Databases mysql
Member Avatar for smantscheff
0
749
Member Avatar for Ignatius88

[CODE] pstmt = conn.prepareStatement("INSERT INTO tableA (userid, itemid) VALUES (?, ?) ON DUPLICATE KEY UPDATE value = ?"); pstmt.setString(1, userid); pstmt.setString(2, itemid); pstmt.setString(3, value); pstmt.executeUpdate(); [/CODE] This code works [CODE] pstmt = conn.prepareStatement("INSERT INTO tableA (userid, itemid) VALUES ((SELECT userid FROM user WHERE userid = ?), ?) ON DUPLICATE KEY …

Databases mysql
Member Avatar for smantscheff
0
3K
Member Avatar for bimaljr

Hi I want to convert Sql Server Database to Access Database , I have one database and it has different tables and view also. please help me how to do this ?

Member Avatar for hostingguru
0
1K
Member Avatar for gauravk_bhanot

[ICODE]select eid from(select count(*) cnt,eid from certified group by eid)as foo where cnt=(select max(cnt) from (select count(*) cnt,eid from certified group by eid)as goo);[/ICODE] This query displays the eid with maximum no of entries in the table certified. Which in this case is no. of aircraft licensed to an eid. …

Databases oracle
Member Avatar for gauravk_bhanot
0
103
Member Avatar for Shodow
Member Avatar for UzuNarU

Ok what I am trying to do is submit changes. I have all the information being collected. I'm just having trouble with the proper query to run. I currently have: [CODE] $sql = "UPDATE anime_list SET anime_name = '$animename' rating = '$rating' episodes = '$episodes' WHERE id='$id'"; $result = mysqli_query($dbc, …

Databases mysql
Member Avatar for UzuNarU
0
296
Member Avatar for dvprez

Hi, I need a little help importing an XML file into sqlserver 2008. I followed this example [url]http://www.sql-server-performance.com/articles/dba/Loading_XML_data_into_SQL_Server_2008_p1.aspx[/url] (make sure you goto the rest of the pages in the article!) , generated the schema etc., but I can't get the import to do what I need. I was able to …

Databases mssql sql xml
Member Avatar for l.geetha86
0
609
Member Avatar for kvskchaitanya

Hello I've large data in a table in which one of the columns is description. in this column i'm to store description of materials and their tolerance which is a (+/-)ve value. for sample:18K 1/4W ±1%. while restoring the data on a test system i observed a special character before …

Databases mysql
Member Avatar for kvskchaitanya
0
161
Member Avatar for raghujosh

I want to get the list of items from a database as a Java resultset. When I use the following SQL statement it works perfectly fine [CODE]SELECT First_Name FROM dbo.Names where First_Name LIKE 'A%';[/CODE] However when I pass it as a parameter, it does not work I have tried a …

Databases mssql sql
Member Avatar for raghujosh
0
143
Member Avatar for gspeedtech

I need to write a query that will get the value of a previous records and add it to the current record. In detail: I have a table (Table1) that contains PolicyNum, RecordID, and SequenceID PolicyNum RecordID SequenceID 123456 456 0 123456 456 0 123456 789 1 123456 789 1 …

Databases mssql
Member Avatar for gspeedtech
0
160
Member Avatar for rajeesh_rsn

Hi friends, In one of my table I stored some names of students . I need to select all the names starting letter "A" or "a" .... Please help me Thanks in advance Rajeesh

Databases mysql
Member Avatar for mwasif
0
119
Member Avatar for Shanti C

Hello All, My problem is, i have one database and application in web server, another application in local server which is having another database . But some tables are same in database server and in my local database. I want to update these particular tables from data base server into …

Databases mysql web-server
Member Avatar for Shanti C
0
235
Member Avatar for AngelicOne

I'm making a visitor management application and I made three tables namely tblStudent, tblEmployee and tblVolunteer in SQL. I made a table according to the categories of a visitor. Do I still need to make a tblVisitor that would be the "general" table for the three tables made? I'm really …

Databases mssql
Member Avatar for darkagn
0
85
Member Avatar for printman55

In my hosting account I have set up a database named george. There is one table named "news". There are three fields "id" (primary key), "date", and "text". I am keeping this simple for illustration. What is the best/easiest/fastest way to import the data or records to the table via …

Databases mysql
Member Avatar for smantscheff
0
282
Member Avatar for thesyntax

$sql = "UPDATE USERS SET password='changed password' WHERE login = steve"; header( 'Location: [url]http://steveworld.000space.com/prof.php[/url]' ); this is my code, im trying to allow users to change their passwords at anytime, I put in a set text and it still doesnt work, it is very agitating!

Databases mysql php sql
Member Avatar for spankyxeon
0
134
Member Avatar for Ignatius88

[CODE]UPDATE movie_temp SET movie_release_year = ( substring_index(movie_title,')',1) ) WHERE movie_title IN (SELECT * FROM (SELECT movie_title FROM movie_temp) AS TEMP); [/CODE] When executing the above query (movie_temp table has more than 660,000 rows), after 600 seconds workbench throws me errors Error Code: 2013Lost connection to MySQL server during query followed …

Databases mysql
Member Avatar for drjohn
0
174
Member Avatar for Korenai

good day, im practicing databases and .net, can you help me in relating multiple tables and manipulating a listview? my scenario is about school subjects of a student, i have a database with data that has 2 tables, which is 'fnsh_table' and 'ofrd_subjects' fnsh_table Student_No nchar(4) Subj_No nvarchar(10) Title nvarchar(20) …

Member Avatar for smantscheff
0
125
Member Avatar for MrCapuchino

I have SQL Server 2008 Developer installed in my machine. The thing is that I have this database backup with version 10.50.1600, SQL Server Developer 2008 SP2 has version 10.00.4000. Well, I know there is not an easy workaround or conversion, so I thought well, what If I installed the …

Databases mssql sql
Member Avatar for MrCapuchino
0
190
Member Avatar for wally1234

I have 2 tables and want to add the count column from the bottom table to the top table (join on “OID” and “OPTID”) and if no count is found set the cell to zero. How can I do this? [CODE] SELECT questions.pollid, questions.id, questions.title, questions.ordering, options.oid, options.qoption, options.ordering FROM …

Databases mysql
Member Avatar for jlego
0
117
Member Avatar for printman55

I am trying to define the table and fields in a mysql database I set up in my hosting account. I have the database name, username and password set up. I now need to define the table and fields. They want me to import a text file to do this. …

Databases mysql
Member Avatar for printman55
0
148
Member Avatar for Agent Cosmic

Hello, I'm currently designing a simple movie database. In a table I have a column called status. And for that there will only be a few possibilities like "pending", "watched" etc... What would be a good way to design it such that I have some kind of constant? Should I …

Databases database-design
Member Avatar for griswolf
0
134
Member Avatar for Elehas

I can't find information on this anywhere online. I am building a site using drupal. As you may know drupal installs its own database and runs on Apache. I have a backend mysql database that must be read and written from a vb.net app. I had to purchase a hosting …

Member Avatar for Elehas
0
205
Member Avatar for chaoticabyss99

I recently installed MS SQL Server 2008 Developer Edition (on my home PC with Win7 Ultimate 64-bit). I have been trying to get it set up for use, but am having some issue. I keep getting an error when trying to connect to the server. On the "Connect to Server" …

Databases mssql sql
Member Avatar for chaoticabyss99
0
205
Member Avatar for zlloyd1

I have an html file that is supposed to do a search and return of a database I have created in phpMyadmin but is giving me nothing but one error after another!!:'( This is the html form[CODE]<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Directory List Request</title> …

Databases mysql php
Member Avatar for zlloyd1
0
147
Member Avatar for Agent Cosmic

Hi guys, I'm learning PHP and MySQL now, so I did a simple forum database in MySQL Workbench. I hope you guys can check it out and point out anything I should that note of. Also I would appreciate it if you could share your learning resources (like blogs/tutorials, not …

Databases api database-design
Member Avatar for Agent Cosmic
0
240
Member Avatar for ctkam

hi, I want to import a text file which delimited by tab to mysql. 1) using phpmyadmin => results ( exceed time limit even i've extend) 2) open using excel file save to .csv but still couldn't save all the record 3) using ms access with odbc connection => almost …

Databases mysql
Member Avatar for ctkam
0
1K
Member Avatar for Dani

When is it appropriate to use InnoDB table types? What about for a forum such as this one with huge post and thread and memberlist tables? I was reading on dev.mysql.com that it is more efficient than MyISAM for large table types? Is this always the case? Would it make …

Databases first-post mysql
Member Avatar for devpk
1
1K
Member Avatar for Acute

Hi everyone, I'm building a microblogging system like twitter and I need help in optimizing the database structure. I have tables "user_info", "posts" and "friends". Each time when user logs in, lets say user X, all latest posts of friends of X should be displayed. So it means that when …

Databases
Member Avatar for griswolf
0
186
Member Avatar for MARKAND911

how can I select one or more columns from a table by column-index and NOT by columnname? I got the columnIndices of table by using this query SELECT name, colid FROM sys.syscolumns WHERE (id = (SELECT id FROM sys.sysobjects WHERE (name = 'table_name')))

Databases microsoft mssql sql
Member Avatar for MARKAND911
0
323
Member Avatar for judithSampathwa

Hi there, I am creating reports in SQL server business intelligent studio and when I deploy it to the report server the report is shown in only on a half a page. How can I make the report height and the width for the report thanksssss

Member Avatar for judithSampathwa
0
173
Member Avatar for roachae

My SQL isn't the best. Here's my situation: My table consists of three fields. I'll call them A, B, and C (for simplicity). For each A, there should be only one B-C combination. No matter how many times A is in the table, it should always have the same B …

Databases mysql
Member Avatar for roachae
0
161
Member Avatar for fantasma

Greetings, I'm having some trouble creating a trigger that, before I insert something in a table, it resets an existing record field to 0. Example I have in the table a field named "Name" and another named "Active". Each field has a diferent ID The last entry of a "Name" …

Databases oracle
Member Avatar for fantasma
0
171
Member Avatar for caterpillar

Hi, I have to insert fields in a table. I am using VB.net & SQL Server database. The code is: Dim userid As Int32 = Me.classname.UserID Dim strSQLD As String = "Insert into table1 (userid) values (Me.classname.UserID)" userid is of type int While debugging, i can see that variable userid …

Databases mssql vb.net
Member Avatar for shlimeel
0
253

The End.