7,494 Archived Topics

Remove Filter
Member Avatar for
Member Avatar for aPPmaSTer

Hi everyone, I am pretty new to SQL and I would like to know how can I add a prefix or postfix to all records in one field. Example: I want to add "PK-" before all barcodes in my database.

Databases mysql
Member Avatar for aPPmaSTer
0
79
Member Avatar for raghujosh

Are dynamic insert statements possible in MySQL. I am creating an application that generates a database driven web application with minimal human intervention. Briefly, a user is allowed to build an HTML form(by adding HTML form elements) on a web portal and then he/she submits the form. Once the form …

Databases mysql
Member Avatar for smantscheff
0
1K
Member Avatar for axman1000

I have an XLS file. Let's assume that it has 1000 rows in all, with 10 columns. I would like to import rows 5 through 995 (say), and columns 1 though 7 and 10. How can I do this using an SQL query, either though OPENROWSET or BULK INSERT? I …

Member Avatar for Momerath
0
136
Member Avatar for jfunchio

Im just learning how to do triggers in mysql with php I have two versions of the trigger i would like to use but i keep getting errors saying the syntax is wrong. the first one is: [CODE=mysql] CREATE TRIGGER credits_earned AFTER UPDATE ON takes on (grade) REFERENCING NEW ROW …

Databases mysql
Member Avatar for urtrivedi
0
253
Member Avatar for pradvin

Hello All, Can some one help me how to write query for finding the profi per unit using SQL server 2005/2008. I have got a unit table which contains UnitId and Quantity and the other table which contains cost price, selling price and the Unit Id. Thank you

Databases mssql
Member Avatar for debasisdas
0
76
Member Avatar for DishevldPeasant

Hello, I am fairly new to SQL and PLSQL and am having a problem debugging some code for triggers, the compiler keeps saying that the trigger is not initialized properly. Here is a posting of the code. This is for a homework assignment, but I am lost so I would …

Databases oracle
Member Avatar for debasisdas
0
127
Member Avatar for kay21

Hi everyone, I need some help with identifying real world entities and their attributes for a hospital scenario. I have listed below the entities and attributes that I could think of. Please comment or give suggestions on how I can improve it. [CODE]EMPLOYEE ([U][B]Employee_SSN[/B][/U], Address_ID, Contact_ID, Employee_Name, Designation, Salary) PATIENT …

Databases database-design
Member Avatar for Momerath
0
123
Member Avatar for MDanz

for example.. in one column it has "test1, test2, test3, test4" .... when i search for test1... i only want rows the word 'test1' in them specifically. $search = test1 i've tried LIKE %$search% but it get's all rows with the word 'test' in it... i want only rows with …

Databases mysql
Member Avatar for davidchilders
0
116
Member Avatar for shinsengumi

Hi all. I'd like to ask for a way to store a MySQL table content of type VARCHAR to a CHAR variable in C. The MySQL table has three columns: ID (int), Name (varchar(22)), Salary (int). My C program should ask the user to input an ID number, and depending …

Databases c mysql windows-xp
Member Avatar for davidchilders
0
266
Member Avatar for stevenfagan

I'm using a linux shared hosting account with godaddy and I can't seem to get stored procedures working correctly with my MySQL database. I can create them from within phpMyAdmin fine. I can also create them in MySQL workbench fine. However, whenever I try to call the stored procedures either …

Databases mysql php
Member Avatar for davidchilders
0
1K
Member Avatar for judithSampathwa

hi , can some one provide me with a tutorial in creating user group in ms sql and assigning users to that group appreciate a lot thanks

Databases mssql sql
Member Avatar for judithSampathwa
0
299
Member Avatar for manish250

hello all i am using a query [ICODE]select 'hour','filename','tot_sent_count','tot_success','tot_prm_fail','tot_switchedoff','tot_other_error' UNION select hour,filename,sum(tot_sent_count),sum(tot_success),sum(tot_prm_fail),sum(tot_switchedoff),sum(tot_other_error) INTO OUTFILE '/tmp/hourlyFileMis(2011-03-09)' FIELDS TERMINATED BY ',' LINES TERMINATED BY '\r\n' from tbl_mis where date_format(date_time,'%Y-%m-%d')='2011-03-09' group by hour,filename order by hour;[/ICODE] output is ok but one thing is not coming properly that header fields are coming at the …

Databases mysql perl
Member Avatar for smantscheff
0
185
Member Avatar for comSysStudent

Hi guys, I'm a bit stumped at the moment trying to figure out a way to keep track of the following scenario - I want to track a list of events and members of our club who attend them. Each member currently has a member ID as a primary key …

Databases
Member Avatar for Momerath
0
165
Member Avatar for deolalkar_pooja

Hi to all, I created the following table --------------------------------- create table publisher(name varchar(20), city varchar(20)) --------------------------------- I want to put following constraint, 'name is having unique with city taken only from 'mumbai', 'pune', 'nasik', 'panji''. I know about unique constraints with name. I searched many about constraint with city, but …

Databases mssql
Member Avatar for debasisdas
0
99
Member Avatar for mmlmitchell

Hello, Building on the thread: [url]http://www.daniweb.com/forums/post1491690.html#post1491690[/url] I need to tease out the sums of three values from Rows that meet multiple parameters. Here is a sample of the dataset: id | blkidfp00 | fips | transtech | pop | hu | busfirms 1 | 55001950100100 | 550039 | 10 | …

Databases dataset mysql
Member Avatar for urtrivedi
0
152
Member Avatar for thejman82

I would like some help on this database design I need to have completed by next week. Here's the specs: I'm creating a custom PC builder application. I've been getting stuck on trying to create the database for it. I would like to be able to enter customer details then …

Databases database-design sql
Member Avatar for debasisdas
0
222
Member Avatar for ZPBSFG

Hello Everyone! I'm working on a project that should help me to automate some processes that are extremely time dependent, with a mySQL database. I'm presently working with 2 developers on this project on a contract basis to complete the job. I'm finding my developer hesitant to come up with …

Databases mysql
Member Avatar for smantscheff
0
283
Member Avatar for mmlmitchell

Similar to the issue in [url]http://www.daniweb.com/forums/thread227151.html[/url] I have multiple rows with identical values; in this case they are Census Blocks (CB --> blkidfp00) that have 15 digit values. I have multiple rows because each is differentiated by the type of services available in each CB, and there are many different …

Databases mysql
Member Avatar for smantscheff
0
641
Member Avatar for Coyx

Hi everyone, I'm in a spot of bother. Attached is an image which should help better show what I'm about to ask for assistance with. :) [url]http://img96.imageshack.us/img96/7624/sqlm.jpg[/url] What I have, is 2 tables that associate each other with 'packholder' In the table shown, you can see Packholder - 1, 2, …

Databases mysql sql
Member Avatar for Coyx
0
211
Member Avatar for kolibrizas

Lets say I have a table user|product|amount My goal: to update the amounts of the products the user has in his shopping cart, removing the records which have amount 0. What is more efficient: A) Deleting records from database; inserting new ones [to sum up: [B]1x delete query, 1x big …

Databases mysql
Member Avatar for smantscheff
0
142
Member Avatar for anirban1087

Hi, I have two problems regarding my database design 1. I have a table contains the details of items, available in a store. Now there are different size available for each item. How to design my table so that it will hold each item and all available size in a …

Member Avatar for anirban1087
0
135
Member Avatar for andrewliu

Hello, I'm building an ecommerce site and I was wondering if developers usually use mysql to store credit card information? Or do they use some other service to store credit card information? I want my website to be secure for my users. Thank you

Databases ecommerce mysql
Member Avatar for andrewliu
0
551
Member Avatar for stephen_UK

I have a database that has a simple search form where you enter the 'Search Text' and then mouse click the 'Search' button and the results are displayed. Alternatively if the Enter key is pressed twice, first time to enter the text and tab to the 'Search' button, and the …

Databases microsoft-access seo
Member Avatar for stephen_UK
0
104
Member Avatar for lttleastig

He guys when i execute this stored procedure by right clicking on it and press execute then entering a value for PW i get a NULL value returned any idea why? [CODE]USE [DR2_Member] GO /****** Object: StoredProcedure [dbo].[up_php] Script Date: 02/26/2011 18:26:34 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON …

Databases mssql xml
Member Avatar for BitBlt
0
178
Member Avatar for deolalkar_pooja

Hi to all, I created the following two table -------------------------------------- create table mail(mid integer primary key, name varchar(20) ) create table phone( pid integer foreign key references mail(email), phone integer) ----------------------------------------- After inserting records on both table, now i want delete perticular record from table say 'delete record of pid=12'. …

Databases mssql sql
Member Avatar for Momerath
0
146
Member Avatar for Ignatius88

[CODE]SELECT movie_id, movie_title, movie_release_year, movie_genre, movie_plot, (SELECT AVG(sum_movie_rate) FROM (SELECT SUM(movie_rate) AS sum_movie_rate FROM user_movie_rate WHERE movie_id = ?) AS t1) AS average_rating FROM movie WHERE movie_id = ?[/CODE] when I retrieve a specific information of a movie, I want to calculate the average ratings of the movie. user_movie_rate looks …

Databases mysql
Member Avatar for smantscheff
0
138
Member Avatar for juve_

Hi there, thanks for all the help you're providing overhere to everybody. I would like to know if It is possible to have an auto increment column that is somehow attached to the value of another column. so it keeps increasing as long as that value of the other column …

Databases oracle
Member Avatar for debasisdas
0
122
Member Avatar for moone009

I am receiving an error 'Incorrect syntax near the keyword in Any ideas? [CODE] declare @item varchar(100) declare @stopid varchar(100) set @item in (select itemtypeid from laitemtype where itemtypeid like '88BBA7AD-BD25-E011-94E0-001B214A75A5') set @stopid in (select stopid from lastop where stoptypeid like '7D14FC8C-B184-DD11-9BCC-0014221E87F0') insert into lalocationitemtyperequest (itemtypeid,requestprocesseddate,createddate, stopid) values (@item,getDate(),getDate(),@stopid) [/CODE]

Databases mssql
Member Avatar for BitBlt
0
136
Member Avatar for Joseph Schrag

I have an existing database design which I would like to normalize. Essentially, the table causing me problems is one with about 150 columns. The table holds live data for a natural gas well. So, there are columns for the various temperatures, pressures, etc. The data types of these columns …

Member Avatar for Joseph Schrag
0
166
Member Avatar for anirban1087

Hi, I am working on a Inventory management system. No I would like to have a [B]custom bill no, which will be changed on each month[/B], i.e. the first bill of March, 2011 will have a no like "[B]Mar/2011/01[/B]", the next will be "[B]Mar/2011/02[/B]" and so on, until it is …

Databases mysql
Member Avatar for anirban1087
0
95
Member Avatar for pritesh2010

HI all Experites can you help me on this Query How to get perfect result set I have three table. [CODE] 1)vitalsigns ID DisplayName DisplayShort ToMetrics ToEnglish 1 Temp Temp (0.556*({1}-32)) ({1}/0.556)+32 2 BP(Systolic) BPH (NULL) (NULL) 3 Wt WtH {3}/2.2 {3}*2.2 4 Height Height 2.54*{4} {4}/2.54 5 Pulse Pulse …

Databases mysql
Member Avatar for smantscheff
0
656
Member Avatar for AngelicOne

Could I select a datetime record using date only? I need to show rows containing a particular date. I'm thinking to separate it into two column instead if I couldn't select only date from a datetime.

Databases mssql
Member Avatar for Momerath
0
152
Member Avatar for Trilby1992

Hi I'm trying to display wordpress posts in October 2010. My best attempt was SELECT * FROM 'wp_posts' WHERE 'post_date' < 31/10/2010; but it shows an empty result and I think the dates need to be in a range. Any suggestions? Thanks, Kevin

Databases mysql wordpress
Member Avatar for smantscheff
0
298
Member Avatar for Dracata

I'm making a fairly easy to edit and change public dictionary and am working on the viewer hooked to an SQL server. The problem I'm having is, isn't really a problem but I'm looking for a better solution, due to it possibly devolving into a huge mess of sorting a …

Databases mssql
Member Avatar for Dracata
0
123
Member Avatar for deolalkar_pooja

Hi to all, I created following table ------------------------------------------------------------------- create table interiors(id integer, name varchar(20), type varchar(20) default 'baby cot', price integer) -------------------------------------------------------------------- but, when i doesn't inserted any value of 'type', by the definition of table, it should take default value. when i fetch all rows by 'select' query, it …

Databases mssql
Member Avatar for BitBlt
0
107
Member Avatar for AngelicOne

How to select records with today's event? I have a column that is set to smalldatetime. I need to select those that have a row of today's event.

Databases mssql
Member Avatar for Momerath
0
247
Member Avatar for deolalkar_pooja

Hi to all, I created the following table --------------------------------- create table publisher(name varchar(20), city varchar(20)) --------------------------------- I want to put following constraint, 'name is having unique with city taken only from 'mumbai', 'pune', 'nasik', 'panji''. I know about unique constraints with name. I searched many about constraint with city, but …

Databases mysql
Member Avatar for smantscheff
0
98
Member Avatar for m1m2m3m4m5

Can someone pls pls help me??really need help creating an ERD (Database Management System)? ok so i can create an ERD for the first two statement, im just stuck on the third and fourth statement, i dont how to draw them, someone pls help me.. Given the following business rules, …

Databases
Member Avatar for debasisdas
0
322
Member Avatar for get2tk

Hi, I was told to build a application that will encrypt data and migrate data from one database platform to another platform. Please i do not hae a clue where to start from as i am a newbie to database. Any info will be well appreciated

Databases microsoft oracle sql
Member Avatar for debasisdas
0
99
Member Avatar for divyakrishnan

Hi.. I want to take the max value of the substring of a varchar field having values as SN1,SN2....SN10.I used the query as following [CODE]select max(substring(st_no,3,4)) from tbl_st;[/CODE] I am getting the max value as 9.I want to get 10. If somebody knows please help me

Databases mssql
Member Avatar for Momerath
0
113
Member Avatar for deolalkar_pooja

Hi to all, i created following table ------------------------------------- create table employee(name varchar(20), dob datetime) ------------------------------------- I want to extract names of all months from 'dob'. for that i wrote following query ------------------------------------- select datepart(month, dob) from employee -------------------------------------- it works and shows all months but in number format, i want …

Databases mssql
Member Avatar for Momerath
0
82
Member Avatar for b89smith

I have a database that is filled with time series data points on different items. I would like to calculate the difference between values by item for the time series and then store it in a difference column. My table is as follows: id | Ticker | Date | SO …

Databases mysql
Member Avatar for smantscheff
0
245
Member Avatar for moone009

How do you replace characters as in an update? Example I have an address field that contains '.' and '-' and I need to remove these characters. Anyone know of an update script to do so?

Databases mssql sql
Member Avatar for moone009
0
80
Member Avatar for deolalkar_pooja

Hi to all, I created following table --------------------------------------- crate table publisher(name varchar(20), city varchar(20)) --------------------------------------- I want to run following query. [U]'list all the positions of charcter 'a' from name.'[/U] for this, i ran following query, ---------------------------------------- select patindex('%a%', name) from publisher; --------------------------------------- But, it doesn't show proper output. When …

Databases mysql
Member Avatar for deolalkar_pooja
0
325
Member Avatar for haithomy

hi all i have search engine like that: sql = "SELECT * FROM ads WHERE ad_country='7' and approve='1' and ad_name LIKE '%iphone%' or ad_country='7' and approve='1' and ad_content LIKE '%iphone%' ORDER BY ad_date DESC LIMIT 0,30"; and it's work great but it is too long. are there any sample way …

Databases iphone mysql
Member Avatar for dipakatcvrca
0
86
Member Avatar for Geeko

hi, i am new here and i hope you could help me with my ERD ... it goes like this • A patient can make many appointments with one or more doctors in the clinic, and a doctor can accept appointments with many patients. However, each appointment is made with …

Databases
Member Avatar for griswolf
0
1K
Member Avatar for Garee

Hello. I've been attempting a few exercises to brush up on my ER Diagrams using UML notation. I would greatly appreciate some help regarding this particular problem: • A patient can make many appointments with one or more doctors in the clinic, and a doctor can accept appointments with many …

Databases
Member Avatar for Geeko
0
354
Member Avatar for legend_89757

i try to make the running sum of quantity using query with a expected output [CODE]ID | Date_in | Date_out | Quantity_in | Quantity_out | Quantity_Run_Sum in01 |17/2/2011| | 300 | 0 | 300 in02 |17/2/2011| | 400 | 0 | 700 Out01 | |20/2/2011 | 0 | 100 | …

Databases microsoft-access
Member Avatar for legend_89757
0
118
Member Avatar for shakeit13aby

I facing a problem where i cant update my mysql data with calculation and if statement i want to update my column answer column and make calculation between column one and two depending on column sign.whether to sum minus multiply or divide:S UPDATE calculation SET answer IF (sign = +) …

Databases mysql
Member Avatar for smantscheff
0
88
Member Avatar for Fortinbra

I need help troubleshooting a performance issue. I have a stored procedure that is selecting from 3 joined tables, and is hanging on the first time this procedure is running. Sometimes hanging so long that I get a timeout error. After the first run, it's faster, but still takes longer …

Databases mssql sql
Member Avatar for Fortinbra
0
110

The End.