7,494 Archived Topics

Remove Filter
Member Avatar for
Member Avatar for decay

Hi I have made lots of Access databases over the years but it seems I have fogotton lots of basic principles since I have not used it for ages. One thing I want to do is: For instance when you send an email using Yahoo or similar webmail if you …

Databases microsoft-access
Member Avatar for yeloraby
0
391
Member Avatar for Frankey

i am looking for some advice on what is the best approach to get this done :) my datababase holds a table categories with the columns [CODE]|category_id|category_name|category_parent_id|[/CODE] i am showing my users a html sortable table with the following columns |category_id|category_name|category_parent_name| so what i want, is to do a ORDERBY …

Databases mysql
Member Avatar for Frankey
0
256
Member Avatar for json101

Need help to [B]update 2 rows in the same table[/B], been searching & testing with no real luck. I need to update 2 rows based on the URL below... [ICODE]id=145&contactuname=json101&contactid=7&memberid=1&confirm=2[/ICODE] Updating these fields: [ICODE]ustatus, memberid, contactid, contactuname[/ICODE] Table structure: [CODE]CREATE TABLE `contacts` ( `id` INT(40) NOT NULL AUTO_INCREMENT, `ustatus` TINYINT(1) …

Databases mysql
Member Avatar for json101
0
225
Member Avatar for gowans07

Main Form = Frm_Engineer_Search Sub Form = Frm_Engineers Frm_Engineers populated by Tbl_Engineers I've been trying to link together a textbox with a subform so when a surname is entered into TxtSearch and CmdSearch is click it will run a query/refresh the subform displaying the correct record which correspond to the …

Databases microsoft-access
Member Avatar for gowans07
0
139
Member Avatar for a.muqeet khan

guy i was given a qeustion for my exam that What is the most commonly booked room type for each hotel in London? to this i replied [CODE]SELECT MAX(R.roomno)AS most room selected FROM ROOM.R,HOTEL.H,BOOKING.B GROUP BY roomtype WHERE H.hotelno=B.hotelno AND city='london' [/CODE] my problem is that i dont know if …

Databases mssql
Member Avatar for adam_k
0
129
Member Avatar for kyrool

Hi, I just want to know from everyone if they have problem on auditing?

Databases oracle
Member Avatar for hfx642
0
84
Member Avatar for violette

hi all. here's my problem;. I would like to have a macro to export data from an excel file into the database(SQL) for insert and update data purposes. but i'm not sure how to do this.Can someone please show me a code syntax on how to do it?the excel file …

Databases mssql sql
Member Avatar for adam_k
0
177
Member Avatar for Lindsie

[B]I am a newbie so please be kind.[/B] I have put together a form using multiple queries which pulls information from MySQL tables that are joined by ID number. It displays the info in a form so updates can be made. I cannot get it to update more than one …

Databases mysql php sql
0
104
Member Avatar for spowel4

Is it possible to create a stored procedure to delete all records from a table (i.e. DELETE FROM <tablename>), but pass the table name to the procedure as a parameter? My desire is to have only one procedure for deleting multiple tables' records; I would simply pass in the table …

Databases mssql
Member Avatar for adam_k
0
188
Member Avatar for newbie14

Dear All, I have data coming into my db at quite a high frequency. Once I recieve the data I have many different db operation (select, update)checking and one final insert. Before inserting I will check it exist before or not? The problem at times the similar data comes apart …

Databases mysql
Member Avatar for newbie14
0
264
Member Avatar for CSharpUser

I'm new to MS SQL and trying to solve a problem where I need to extract specific data from a remote SQL Server 2005 DB into a local SQL Server 2008 R2 DB. In a Stored Procedure, I'm trying to use Linked Server via Ad Hoc links in the following …

Databases mssql sql
Member Avatar for BitBlt
0
504
Member Avatar for saideepak89

hi.. i know little bit about the casting in java ie (from "float"to "int" or/etc) like wise my question is how the oracle converts the data in condition this is my sample query branch -t branch_bnk_code number3 branch_brn_code number3 branch_city_code number3 mybranch -t mybranch_bnk_code varchar2 mybranch_brn_code varchar2 mybranch_loc_code varchar2 by …

Databases oracle
Member Avatar for hfx642
0
191
Member Avatar for Concatch

Hi, I have two tables. Cla_case cc and Cla_event ce. The join between the two tables is on cc.cla_event_no = ce.cla_event_no. In cla_case i have the following columns : Discover_date and Notification_date. In cla_event I have the column Incident_date. I need to perform a SUBQUERY that will find the latest …

Databases oracle
Member Avatar for hfx642
0
185
Member Avatar for riahc3

Hey Lets say I have 2 columns in table1 Id Value Id is obviously primary but I want Value to be unique.... I tried "NOT EXISTS" with a subquery but I cant really seem to get it to work. It would be something like [CODE]INSERT INTO table1(value) WHERE VALUES('3'); [/CODE] …

Databases mysql
Member Avatar for rch1231
0
107
Member Avatar for apatuka

Grettings everyone, im trying to create a stored procedure but it gives me the following error: 1339 Case not found for CASE statement Here is the code: [CODE]BEGIN #Routine body goes here... CASE @olds WHEN 'emp' THEN CASE @news WHEN 'loc' THEN UPDATE equipos SET pe=pe-1,pg=pg+1 WHERE id=@eqloc; UPDATE equipos …

Databases mysql
Member Avatar for smantscheff
0
2K
Member Avatar for shanker31

Hello every1, I want to ENTER Sr.No. and Name in the table using procedures. My table has attributes 1. Sr.No. (which is my primary key(int datatype)) 2. Name (which is not null(string datatype)) I want to write a procedure in mysql to automate the process of entering data in the …

Databases mysql
Member Avatar for smantscheff
0
172
Member Avatar for vishwanath.m
Member Avatar for adam_k
0
137
Member Avatar for bangla

Hi, Someone pls correct the error. [CODE]SELECT orderid, merchant, buyprice, commission, refund, (buyprice - refund) as expenseOrder , (commission - expenseOrder ) as profitt FROM business WHERE merchant LIKE "GO%"[/CODE] error: MySQL said: Documentation #1054 - Unknown column 'expenseOrder' in 'field list' Thanks.

Databases mysql sql
Member Avatar for pritaeas
0
75
Member Avatar for great_learner

Hi guys, I am trying to create a table in SQL Server 2005 through simple query which is as follows: [CODE]create table Appointment { Doc_ID numeric(4,0) references Patient(Pat_ID), Pat_ID numeric(4,0) references Doctor(Doc_ID), _Day day, Date datetime, Consultant_Name varchar(40), primary key(Doc_ID,Pat_ID) };[/CODE] but i am getting the error: Msg 102, Level …

Databases sql
Member Avatar for BitBlt
0
694
Member Avatar for Tunnleram

I'm pull gaming stats from a database, but I'm having issues with one of the cases and I can't seem to figure out why. The first two cases work fine, but the last one just returns null. What's strange is when I replace the third case with one of the …

Databases gaming mysql
Member Avatar for k1robert
0
281
Member Avatar for manhthaodn

I have 3 tables: A, B, C. How to insert 100000 rows into table B, while inserting have data is the random data are taken from Table A and C Thanks for help!!!!

Databases mssql sql
Member Avatar for BitBlt
0
554
Member Avatar for odysseous

Hi, I have a problem with reading a csv file with SQL server UNH+ATOPHOEXEDI+AVLABL' PLD+AII+RE11S' TRV+1+40+DU03+MAN+LCA+20110706:0000:1' ACC+1+SUNNY HILL HTL APTS ?+ POOL 3*:11113+:: PAPHOS+20110706+3:3 STAR++E:1:999' PRC+A:825:3*C:0:1:15+9+5:2475:9:1BDR APT 2/4 INLAND VIEW+2:4++SC: SELF CATERING' TRV+2+40+DU03+MAN+LCA+20110706:0000:7:N:20110713:0000' ACC+2+SUNNY HILL HTL APTS ?+ POOL 3*:11113+:: PAPHOS+20110706+3:3 STAR++E:1:999' PRC+A:4900:3*C:0:1:15+9+5:14700:9:1BDR APT 2/4 INLAND VIEW+2:4++SC: SELF CATERING' . …

Databases mssql sql
Member Avatar for BitBlt
0
227
Member Avatar for sasom88

Hi! I need some help. Let's say I have 3 tables (t1(id,ds), t2(id,ds) and t3(id,ds)) where the tables don't necessarily have the same id fields. For example: t1 id ds 1 1 2 0 5 7 t2 id ds 8 5 1 2 t3 id ds 9 3 8 5 …

Databases mssql sql
Member Avatar for BitBlt
0
203
Member Avatar for fahien

hi everyone...first let me tell you i am a newbie in the world of software development. so my question may seem very annoying to you as you are all expert in this field. though i appreciate your help. now lets go to the point. i was planning to make a …

Databases database-design
Member Avatar for fahien
0
177
Member Avatar for gowans07

I've created an append query to move records from one table to another. Am i right in thinking it should move the records then delete them from the previous table? If so then for some reason its not working for me. Using MS Access 2003. [ICODE]INSERT INTO Tbl_Job_Temp SELECT Tbl_Job_List.* …

Databases microsoft-access
Member Avatar for adam_k
0
251
Member Avatar for Arjun_Sarankulu

Procedure is created on SQL server inserting the data from sql server to oracle databse When individually run the query it executed in 10 sec When run through procedure it takes sometime 1.5min and 5min [CODE] CREATE procedure sp_Trade_Book as Begin SET NOCOUNT ON BEGIN TRY --Begin of TRY BLOCK …

Databases mssql oracle
Member Avatar for moone009
0
120
Member Avatar for Dmennite

The application is supposed to install the following without connecting to internet. .Net Framework 3.5 MySQL Server (noinstall zip) - custom install dir, basedir, datadir - run as service with custom name My SQL Connector Restore Mysql db Update Config file with the MySQL uname/pwd. I have all the msi …

Databases mysql visual-studio
Member Avatar for Dmennite
0
239
Member Avatar for mamtha

The below query is updating all the rows in the table1 eventhough the inner query only selects few of the rows. Any help. Appreciate it. Thanks, UPDATE table1 out SET (col1, col2, col3) = (SELECT col1, col2, col3 FROM (SELECT col1, col2, col3 FROM table1 in, table2 a, table3 b …

Databases oracle
Member Avatar for hfx642
0
110
Member Avatar for rotten69

Hey everyone, Is this the right way how to make a trigger in Oracle? [CODE] CREATE OR REPLACE TRIGGER "TRI_AMOUNT_REDUCTION" BEFORE INSERT ON "PURCHASE" FOR EACH ROW BEGIN IF (:NEW.CLIENTNO =SELECT C.CNAME, T.CLIENTNO, T.TOTAL FROM CLIENT C, ( SELECT A.* FROM (SELECT CLIENTNO, SUM(AMOUNT) AS TOTAL FROM PURCHASE GROUP BY …

Databases client-server oracle
Member Avatar for hfx642
0
150
Member Avatar for rotten69

Hey everyone, I'm trying to count all Purchases and find ReceiptNo the ones that start with '434'.. [CODE] Select count(p.purchaseNo) from purchase p (select INSTR(TO_CHAR(p.recceiptNo), "434") >= 10; [/CODE] But this line doesn't only select all receipt number starting with 434.. it selects all receipt no that has 434 in …

Databases oracle sql
Member Avatar for hfx642
0
85
Member Avatar for gedas

hey, i ma creating a join of the same table the output i want is something like this: |Ticket Ref Number|Ticked Opened On|Ticket Closed On|Time Spent In Minutes|TotalAverage| |0000712 |2011-09-14 |2011-10-18 |20023 | 12hours| |0000200 |2011-06-14 |2011-10-08 |40023 | (null)| |0000001 |2010-06-14 |2011-10-02 |20023 | (null)| |0000099 |2010-07-13 |2011-10-01 |10022 …

Databases mysql
Member Avatar for Smeagel13
0
180
Member Avatar for divyakprabh

Hi, I want the week of the year, given a date. I used YEARWEEK('1987-01-01') which return me 198653, but i want it 198701 as the output which means the year and the week number of that year. How to do this... Thanks in advance!!

Databases mysql
Member Avatar for divyakprabh
0
102
Member Avatar for WebNewbie

[B]Hi, I am new to mySQL database design. I am having trouble getting my head around the best way to design my database for a simple online game. Here are the details followed by my attempt and questions:[/B] [COLOR="Red"]A game where multiple decisions are made by teams competing against each …

Member Avatar for WebNewbie
0
270
Member Avatar for ssreevidya.m

Hai, I Have an sp like this: [CODE]ALTER procedure [dbo].[SP_ClassInsertion] @ClassType varchar(50), @ClassTypeId varchar(50), @ClassName varchar(50), @SchoolId varchar(50), @ClassID varchar(50), @BatchId varchar(50), @Userid uniqueidentifier, @ClassCategoryId varchar(50), @SchoolClassCategoryId varchar(50) as declare @STATUS int begin if exists(select Class_Id from SCH_Class where Class_Name=@ClassName and School_Id=@SchoolId and Is_Valid=1) begin set @STATUS=0 end else begin …

Databases mssql
Member Avatar for ssreevidya.m
0
303
Member Avatar for dfn77

NOTE: If this is too long, scroll to the last paragraph where hopefully I've summarized my problem. I have a simple problem. I have two tables, one is for the "header" and one is for the "details" of the header. I need a view to return all details and the …

Databases mssql
Member Avatar for adam_k
0
200
Member Avatar for rajandass65

hi i am working on db design of multilingual site. For creating multilingual site we usually use xml or different col in table represting language. I am thinking of using diferernt db for each languge,it will simplifies many things. so my question is that, is this thing of using muliple …

Member Avatar for smantscheff
0
81
Member Avatar for morrisproject

I current have a column in my database called ConveyorNumber, which could be something like CMD1234, CMD1256, CMD1136 etc. I also have a column called Asset_type which relates to the conveyor number. So depending on the conveyor number the asset type will change, its a description of the conveyor type. …

Databases mysql
Member Avatar for smantscheff
0
121
Member Avatar for jacksantho

Hi, 1. Just am created a user for the login 'test'. 2. As with this login 'test', i logined to the server. 3. I don't have the permission to create the database. 4. So i tried this query: [CODE] use master grant create any database to user go[/CODE] 5. Am …

Databases mssql
Member Avatar for pritaeas
0
3K
Member Avatar for rotten69

Can anyone see anything wrong with this statement? [CODE] CREATE OR REPLACE VIEW V_DEPT_AMOUNT AS SELECT DEPTNO AS DNO, DNAME AS DNAME, MAX(AMOUNT) AS MAX_AMOUNT, AVG(AMOUNT) AS AVG_AMOUNT, MIN(AMOUNT) AS MIN_AMOUNT, SUM(AMOUNT) AS TOTAL_AMOUNT FROM DEPT D, EMP E, PURCHASE P WHERE D.DEPTNO = E.DEPTNO GROUP BY DNAME, DEPTNO; [/CODE] …

Databases oracle sql
Member Avatar for hfx642
0
104
Member Avatar for jovillanuev

Guys, I have those records. how to i removed the first 10 records and the last 2 records(-U)in string. P300-1110-C731-U P300-1110-INCREDIBLE-U P300-1710-DEVOUR-U P300-1710-DROID2-U P300-4410-THUNDRBLT4G-U P333-4110-8530-U Here is the correct Result: C731 INCREDIBLE DEVOUR DROID2 THUNDRBLT4G 8530 Thanks in Advance. Jonel

Databases mssql
Member Avatar for adam_k
0
69
Member Avatar for Ichcha

hi , I have database 'center' with huge data and wanted to create a dummy 'test' database for 'center' db with 1000 random data for testing purpose. I generated script to copy the db but the resulting 'test' db was tables without data. i need 1000 samples for all the …

Databases mssql
Member Avatar for adam_k
0
87
Member Avatar for saideepak89

hi i have the table in which date valve is like this [COLOR="Red"]11/11/2009 6:08:29 AM[/COLOR] how can i compare the value or select them , the to_date is working in SELECT but,i want to select the records using this colmn and by giving value ie:[CODE]SELECT * FROM SENTMAIL WHERE SENTMAIL_SENT_DATE='01-OCT-2011'[/CODE] …

Databases oracle
Member Avatar for debasisdas
0
96
Member Avatar for Eagletalon

Hey guys, Alright I have a tricky assignment to do in a view that will enable my next program to run MUCH faster and more reliable... Now I need to list all Items (1 table) and their locations where they are stored (2nd table) in a way that enables 1 …

Databases mssql sql
Member Avatar for adam_k
0
189
Member Avatar for LAMDB

Hi all, I need to run a query that performs a count(*) on a table. This gives me the subtotals for each group. Now I need to sumarize the subtotals with sum the results given by the previous count. What would be the best way to do this? Thanks.

Databases mssql sql
Member Avatar for nahjipeel
0
1K
Member Avatar for morrisproject

I have changed a column in my database from the primary Key to Index, as i need to allow the same reference in the column for multiple entries with different dates against them, but now i need to adjust my queries. how do i do this?

Databases mysql
Member Avatar for smantscheff
0
172
Member Avatar for Dumb Fish

HI, I don't know how to get the lastest data form the database. do anyone can give me some exmaples to see how to retrieve the latest 50 data.

Databases mssql
Member Avatar for jovillanuev
0
103
Member Avatar for jovillanuev

Guys, what particular drive/folder to stored the text/csv/excel file that the bulk insert will be reading? what if in my local drive is this applicable? or it should be in the shared folder in the server. Thanks, JOV

Databases mssql
0
99
Member Avatar for Joemeister

I want the post_delete column to generate unique id's so that when I want to delete a comment for e.g. I can refer to the post_delete's value. [B]Here is my users TABLE[/B] [CODE]CREATE TABLE users ( user_id INT(8) NOT NULL AUTO_INCREMENT, user_name VARCHAR(30) NOT NULL, user_pass VARCHAR(255) NOT NULL, user_email …

Databases mysql sql
Member Avatar for smantscheff
0
785
Member Avatar for sethiasaril
Member Avatar for debasisdas
0
57
Member Avatar for thetwig

Hey guys.. this isn't a coding qs... my php cant read any of my mysql functions... eg. mysql_connect, etc.. everything else in my php works... but even if i echo after mysql_connect it wn't print, but if i echo before it will... its not a coding problem because it works …

Member Avatar for smantscheff
0
254

The End.