2,403 Solved Topics
Remove Filter ![]() | |
I want to create a procedure to update a table. It takes number of input parameters(one of them is the @pID) and updates four columns which have the pID=@pID and only one of these four columns can be updated if the value of another column='F' in addition to pID=@pID. How … Databases mssql | |
Hi Im rubbish MySQL joins, and need an assist please. i have a product table and an images table. Each product has 4 images associated to it by a foreign key product id in the images table. I need to pull out the product info (from prod table) and 1 … Databases mysql | |
I have been reading up quite a bit on the topic of Stored Procedures (SPs) and keep coming across contradicting opinions from various 'SQL experts' on whether or not they should be used. Sometimes it's a downright 'No' ([I]Frans Bouma's[/I] Blog for example -- google the term for the article), … Databases mssql | |
Hi I need to generate a CSV of names and address from a table and I would like only one result (it doesn't matter which) per distinct email address. If possible, they also need to be ordered by DateAdded descending so I can select just the most recent 1000 results. … | |
I need to create a table to store matched pairs that I can query and get a count of how many times a particular matchup was entered. For example "5" might be paired with "6", but "6" might be also paired with "5". (Quotes are for clarity - not to … Databases mssql | |
Hello all, I want to create a custom login form for SQL Server 2005, which will have 2 textboxes(Username,Password). When the users clicks the submit button then i want to check the SQL Server users with that username and password,if exist. I need this to be answered asap! Thanks in … Databases mssql | |
Dear everybody hope someone can help me!! Im trying to SUM data from 2 different tabels without any ID connection between and I what to subtract the results from eachother afterwards.. how do i do that. lets say i have tabel1.costs and tabel2.profit I would like to SUM the data … Databases mssql | |
Hi, I have a table which I want to update thus: If d_date is has a value and b_date is 30 or more then set d_date as the min value already in d_date. I know that the WHERE EXISTS clause is wrong but I don't know how to make this … Databases oracle | |
Hey guys need your help here. I will go ahead and describe my problem and what i intend and what i am getting. Platform for SQL Queries : MS Access There are 2 identical table in terms of table structure, they contain information ( RAW Data) about month, money i … Databases data-structure microsoft-access | |
I am trying to do this with sql code without using a cursor. I have table A with two cols and no PK ID Data I have table B with three cols the first two make up the PK ID PK SEQ PK Data If I have the following data … Databases mssql | |
Hi to all keen folks, can you help me to query the first 4 letters and the last 4 letters in one field. example: AAAABBBBCCCCDDDD how to query AAAA and DDDD. thank you. Databases mysql | |
Good morning/afternoon/evening! I'm trying to run a MySQL query, but it seems to be ignoring the "ORDER BY" clause, most likely, I'm believing, because I'm using the "IN" keyword in my query (several times, as a matter of fact, along with a "LIKE"). Is there a way I can structure … Databases mysql | |
Hi i am wondering if anyone has a solution for sorting by postcode area. I wanted to be able to pick off either the First letter or first two letters and group by this. I have figured out how to group by the first to characters of the postcode using … | |
My manager has just asked me to research whether it would be possible to restore a previously fully backed up database into two or more filegroups, with each filegroup being on a separate drive using SQL Server 2008. I know that if I were backing up the database to begin … Databases mssql | |
Hello everyone. This is quite possibly not the place for this but it is more to do with SQL than the other things included so I apologise if I am wrong. I am looking for some help on a task I have been set. When I say help, what I … | |
Hi people, I have run across this website many times, with the first impression that it was a website to ask a guy named 'Dani' questions about code *snicker*. I haven't introduced myself. Maybe I will. But I have a question. In building a program, I'm running mysql code. In … Databases mysql | |
Hi friends I am new to mysql . After Installing mysql-standard-4.1.22-unknown-linux-gnu-x86_64-icc-glibc23 in linux i am getting the error ./mysql_install_db ./mysql_install_db: line 85: my_print_defaults: command not found Could not find help file 'fill_help_tables.sql' in ./support-files or inside .. pl help me how to overcome it Thanks in advance Databases mysql | |
I have MySQL running such that I can open a client command line and log on and make databases, tables, etc. I wanted to do some AJAX. Doing AJAX with ASP, SQL Server, etc is not advisable since both places where I am hosting my websites do not use the … Databases client-server mysql php web-server | |
I need to derive last 2 numbers after the '-' from the code column. example if the code is 76767-99 then I need a query to return only 99. I am using substr and instr functions but not getting what I want. Please help me correct the below query. code … Databases oracle | |
Hi everyone! I have the following problem I am trying to solve: I have one table with data and need to access the same column twice, everyone with different criteria and then output the results on one table. I tried [code=sql]SELECT e.user, SUM(e.column), SUM(f.column) FROM table AS e INNER JOIN … Databases mssql | |
Hey guys im trying to do a query on our database, the pieces of information i need are in 2 tables within my database. table 1= customers - information i need from this table: customers_id (primary) customers_firstname customers_lastname customers_email_address table 2= orders customers_id orders_id (primary) both tables contain more fields … Databases mysql | |
hiiii how can I use 2 different select statement to insert 2 different values in same insert statement ???? Databases mssql | |
hi I have a coulumn named Status which can have only three values: 1. Available (Default) 2. Unavailable 3. CheckedOut How can I add this functionality while creating the table? i.e. while creating the table itself how can i specify that the column can hold only these 3 values and … Databases oracle | |
hiii all this is vipin from btech 3rd year...now i have to do a mini project as a semester project. It is my first project of my life..I have chosen project name "Online FIR System" basis on database. FIR by any person can be done by online and he/she can … Databases | |
Ok, I guess wasn't as specific as I needed to be. Here is essentially what I need. I have two separate tables application_status and application_status log. Within the application status table there is the application_status_id and the application_status_description. The application_status_log table holds information on applications and the connecting factor between … Databases mssql | |
Can anyone help me out with this? SalesPerson Name Age PercentOfQuota Salary Abel 24 63 120,000 Baker 56 38 42,000 Jones 34 26 36,000 Murphy 64 42 50,000 Zenith 45 59 118,000 Kobad 43 27 36,000 Order Number CustName SalespersonName Amount 100 Abernathy Construction Zenith 560 200 Abernathy Construction … | |
I would like to add a column to an existing table, where the new column would only have running numbers starting from 1. If I've understood correctly, the "create index" command is not the right way to do this, as that's attached to just certain columns to speed up querying. … Databases mssql | |
Hi, I have a table in which there is a field for mobile no. Currently the data in the field has been entered with a dash(-) after the code. eg- MobileNo (this is the field name) ------------------------------------- 1. 6016-2880537 2. 6012-3137200 so there is about 400 records in the table … Databases mssql | |
This is a very important issue to consider when you're using form/url variables in databases. A user can cleverly put in SQL statements and manipulate your db server as he sees fit if you don't take the necessary precautions. I get the feeling that there are several people that aren't … Databases google sql user-interface | |
hello exprts!! i am new 2 database!!! i have oracleXE and jdk 1.6.0_14 installed on windows XP!! i want 2 connect them via my java program.but i am gettting errors after executing the program. my code is: [code=java]import java.sql.*; //import oracle.jdbc.*; //import oracle.jdbc.OracleDriver; public class OracleConnect { public static void … Databases oracle | |
Im not sure if this is the proper place to be posting this but... I have a dedicated server that i would like to automatically run a script every 10 minutes/ half hour / any set period of time. I do not want to have to leave my personal computer … Databases web-server | |
Hi there! I made a backup of my database (MandoTECA) using the following code: [code]CREATE PROCEDURE [dbo].[CreateBackup] @uri nvarchar(MAX) AS BACKUP DATABASE MandoTECA --TO DISK = 'C:\Users\Pedro\Desktop\MandoTECA.Bak' TO DISK = @uri WITH FORMAT, MEDIANAME = 'Z_SQLServerBackups', NAME = 'Backup Completo da MandoTECA'; [/code] And used it a restore procedure to … Databases mssql | |
Hello, While working on setting up user accounts, I wanted to see if the values already existed in a database to alert the user before submitting the data. While doing this, I came to an issue. The issue is when I went the MS SQL SMS and tried writing a … Databases mssql | |
hey frnds, I m creating the database at page load,I m able to do dat.I just want to do check that if the table is already existing,then do not create the table.below code create table- [code] using System; using System.Data; using System.Configuration; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.WebControls; … Databases mssql open-source | |
Hello friends, i am facing a bit of difficulty in designing a SQL query for calculating the total score of all the quizes taken by users in my quiz application to create a sort of leaderboard or ranking system. My table have following tables: UserQuizID (int) - PK QuizID (int) … Databases mssql | |
[code=sql]SELECT DISTINCT COUNT(*) AS occurences, post_name, post_content FROM wp_posts WHERE ((post_name LIKE '%ihop%' OR post_content LIKE '%ihop%') OR(post_name LIKE '%pancak%' OR post_content LIKE '%pancak%')) ORDER BY occurences DESC[/code] I use wordpress and am writing a script. Here is the table: post_name ihop post_content pancake house Thanks, Ian | |
Good Day all I have an SP that is defined like this [CODE]ALTER PROCEDURE [dbo].[sp_Constraints_Update] @xml ntext, @TTBLType varchar(5) AS set nocount on DECLARE @xmldoc int DECLARE @sql varchar(8000) -- In one long sql string do all of the following --Create an internal representation of the XML document. EXEC sp_xml_preparedocument … | |
Hi all, I am a student trying to access a database that is on a different server than where my web pages are stored. My webpages running PHP scripts are here (128.118.142.34 through 128.118.142.46) and my database is here (146.186.83.60) Here is the code that I implemented: [code]$con = mysql_connect(146.186.83.60, … Databases mysql php web-server ![]() | |
I have to create a report based on the customer for particular order. For example find all the customers who ordered an item ‘ABC’ for current month and look back 11 months to find out if the same customers ordered the same item and list all the customers who ordered … Databases oracle | |
Hello, please bear with me if this question is stupid. I'm fairly new to this and i really need to know. is it possible to use [B]"SELECT COUNT"[/B] to get the number of DIFFERENT values one column currently holds grouped by a value from another column.? Databases mysql | |
Good Day all I have a Sp that is written like this set ANSI_NULLS ON set QUOTED_IDENTIFIER ON go ALTER PROCEDURE [dbo].[Import_RegistrationsXM] @xml ntext AS set nocount on DECLARE @doc int EXEC sp_xml_preparedocument @doc OUTPUT, @xml TRUNCATE TABLE _RegistrationXM INSERT INTO _RegistrationXM SELECT * FROM OPENXML ( @doc , 'Import/Item' … | |
hi, i have my php pages done already and it's running good in my localhost but when i have uploaded it, search engine would not work. i have changed the appropriate database names and tables provided by the web host , but it just doesnt work still. I know that … Databases mysql | |
Dear all, Sorry, if this Thread is wrong room :$ . I want to return a field value from a table, so I created a function like this : [CODE]CREATE FUNCTION dbo.CheckStatusTrx(@TransNo Varchar(20)) RETURNS varchar(20) AS BEGIN DECLARE @Flag Numeric(1) SELECT @Flag = Flag, CreatedBy, ApprovedBy FROM TrxTD WHERE TransNo … Databases mssql | |
I'm playing around with SQLite, which is very similar to what i've seen in MySQL, and I want to write some code that returns the column names along with the data for output purposes. Is there an SQL query I could use to do that, or is it done differently … | |
Hi! I would like to do something like this: [url]http://www.adp-gmbh.ch/ora/explainplan.html[/url] with an .mdb file. Thanks! Databases microsoft-access | |
Hi Guys, Kind of stuck on a query here. [CODE] select *--, c.last_name + ', ' + c.first_name as name from dbo.tblLevelOneApprover a inner join dbo.tblLevelTwoApproverToLevelOneApprover b on convert(int, b.level_two_emplid) != convert(int, @emplid) where convert(int, a.emplid) = convert(int, b.level_one_emplid) [/CODE] I'm trying to get all level one managers who are … Databases mssql | |
Hi! I'm looking to update a field in a table via PHP, basically asking it to change a fields contents to 'foo' if it currently contains the word 'bar', or to change its contents to 'key' if it currently contains the word 'board'. I can't seem to get the syntax … Databases mysql | |
I have a table that has become corrupt and I need to merge the records back into one record. I have multiple records that should be recombined and I have hit a brick wall on this. In my table the data looks like this part_id Unique c_date m_date Qty ht_num … Databases mssql | |
Hello, I'm having an issue with a MySQL/PHP site I'm working on. I'm new to both. I've seen several posts that were similar or same but was unable to derive a solution based on my code. I have a form that will submit HTML code to a database. I know … Databases mysql php web-server | |
I have 3 tables. Company, phone, companyPhone. The company table has an auto_increment companyID primaryKey The phone table has an auto_increment phoneID primaryKey The companyPhone table row is made up the companyID, and the phoneID. On my form the user will enter company information and the company phone number. After … Databases mysql |
The End.