440 Posted Topics

Member Avatar for daniyalnawaz

Hi This is a very simple standard task you always have to solve, if one-to-many related tables need to get together. Is that not related to your other nice thread, E-commerce data design issue of May 12th, 2008, what is still dangling about? krs, tesu

Member Avatar for tesuji
0
111
Member Avatar for Jennifer84

howdy Is this problem not roaring for herd of lex, yacc, flex, gnus, bison? Also Aho and Sethi might be involved krs, tesu

Member Avatar for Jennifer84
0
162
Member Avatar for jose123

Hello ... "There are 20 types of rating with numerical value ( in look up table)" How is rating related to numerical value(s) ? Something like this: AAA 20.5 AA 5.5 or even like this: AAA 20.5 AAA 30 AAA -1 etc ? krs, tesu p.s. I have got the …

Member Avatar for tesuji
0
125
Member Avatar for Ms Linda

hi, this could be a solution: [code=sql] select SUM (Column A) AS TotalColumnA, SUM (Column B) AS TotalColumnB, TotalColumnA / TotalColumnB as TotalColumnC from yourTable; [/code] If you want to select further columns, for example ColumnX together with results from aggregate functions, you need group by clause: [code=sql] select ColumnX, …

Member Avatar for tesuji
0
97
Member Avatar for AdamGr

Hello, unfortunately and opposite to other database vendors, mysql does not publish a meaningful list of all error numbers or even warnings, they only explain some errors here and there. So one cannot found an explanation of "error" -1 what seems to be a negative SQLCODE (unfortunately there isn't an …

Member Avatar for tesuji
0
60
Member Avatar for markh8ytr

Hi, obviously both is possible as you can read on [url]http://www.microsoft.com/technet/prodtechnol/sql/2005/technologies/dbm_best_pract.mspx[/url] [code] Database mirroring maintains a hot standby database (known as the mirror database) that can quickly assume client connections in the event of a principal database outage. Database mirroring involves two copies of a single database that reside on …

Member Avatar for tesuji
0
173
Member Avatar for dispy

Hi What exactly do you mean by: "This query doesn't work .... mysql server has gone away is the return or nothing... just loading" ? Do you get any error message? Does the query never ends? Is the result set empty? (because of improper data you want to join together. …

Member Avatar for dispy
0
77
Member Avatar for stoneferry

[QUOTE=stoneferry;633566]... and I want to search on the beginning only ...[/QUOTE] Can you give an examle? Do you know wildcards % and _ ? krs, tesu

Member Avatar for varmadba
0
139
Member Avatar for Mohfeza

Well, looking at your short code fragments it seems to be hard to me understanding your problem. I would suggest that you post the really complete (from create procedure... till go) krs, tesu

Member Avatar for varmadba
0
195
Member Avatar for veledrom

Hi veledrom, I think your SQL is syntactically not corret: If insert is done from result set given by select you must not use values part. Also, if you want to insert two values you must also select two values in each row. So try this: [code=sql] INSERT INTO table1 …

Member Avatar for tesuji
0
87
Member Avatar for soroovan

[QUOTE=soroovan;632722]Hi all, I'm trying to design a database model for some ancient poetry books. Here are more information: - Each verse of book will be a recorded into database. This is critically important since I need to have different feature for each verse. For example, being able to put comment …

Member Avatar for soroovan
0
152
Member Avatar for chicago1985
Member Avatar for ladyscoleman
Member Avatar for Shaun32887

Hello Shaun32887 following is a small class what has been posted by a programming virtuoso here in forum on daniweb.com. Unfortunately, I have not recorded his name. [code=c++] // // String passing #include <string> #include <sstream> #include <iostream> using namespace std; class Pars { public: double bar ( string line …

Member Avatar for Shaun32887
0
212
Member Avatar for gibookrishnan

Hi You may also consider SQL Anywhere and SQL UltraLight from Sybase, exceptional worldwide market leader in mobile computing. krs, tesu

Member Avatar for gibookrishnan
0
115
Member Avatar for cam875

What's your specific problem, any error messages? did you create all needed handles (SQL_HANDLE_ENV, SQL_HANDLE_DBC, SQL_HANDLE_STMD) properly. did you figure out correct connection string for SQL Server? Every function from ODBC interface returns a value what you may check against SQL_SUCCESS. Did you set up your data source properly? You …

Member Avatar for cam875
0
196
Member Avatar for Miyuki

[QUOTE=Miyuki;635270]Is it possible to have Netbeans set up for Cygwin and for Borland 5 free compiler then let me choose a compiler for each project?[/QUOTE] This is also what I am looking for. Unfortunately, NetBeans 6.1 seems to have some errors because tutorials from version 6.0 don't run, also not …

Member Avatar for tesuji
0
88
Member Avatar for guest7

[QUOTE=guest7;635252] . . . int main() { for(int i=0; i<2000; i++) { cout<< bitset<3> (unsigned char ( (rand() ) ) <<"\n"; } return 0; } . . . [/QUOTE] Hello, your idea of using <bitset> is completely correct. You only need to make some improvements like in: [code=c++] int main(){ …

Member Avatar for tesuji
0
205
Member Avatar for arupa

Hi arupa Let's look at an example: With create table t(c char(10), v varchar(10)) there will be 10 places, e.g. 10 bytes statically allocated for column c. At first, there will be nothing allocated for column v, internally indicated by setting current length of v to 0. If you do …

Member Avatar for tesuji
0
81
Member Avatar for guruOfCool

Apparently this means a problem with the db design. But you may freely post your table's schema together with some sample data. krs, tesu

Member Avatar for stephen84s
0
85
Member Avatar for devin.lusby

Hi Devin This is quite a poor idea of designing data models. You will never be able to create good SQL select statements. As you already mentioned, creating and handling stored procedures obviously dwindles into complex task. How do you want to compare data of different customers which are stored …

Member Avatar for tesuji
0
108
Member Avatar for tkotey

Hi tkotey Similar problem we have discussed on [url]http://www.daniweb.com/forums/thread127644.html[/url]. you may investigate SQL code from posts #5 and #7 where I gave solutions on how to compute balance values from consecutive rows. You can adapt that code so it fits your specific requirements. If you have further problems we can …

Member Avatar for tesuji
0
109
Member Avatar for safealloys

[QUOTE=safealloys;625623]As a beginner, after creating tables, what is the next step?[/QUOTE] [b]After having done that hard job shutdown server is badly necessary ![/b]

Member Avatar for arupa
0
144
Member Avatar for NervousWreck

Hi Your code: char ch; int i = ch; You didn't assign a value to ch. So i is undefined. Also this would not work if you do cin >> ch. You may try this instead: char xxx = 'x'; cout << "char: " << xxx << " as int: …

Member Avatar for mitrmkar
0
104
Member Avatar for silverside
Member Avatar for callmeravi81

[QUOTE=callmeravi81;633478]Hi, Any one can help me .. i want the C++ code for hashing operations to implement dictionary ADT....Plz help me ... Thank you[/QUOTE] ??????????? What do you want to do? krs, tesu

Member Avatar for Jishnu
0
77
Member Avatar for tmarket

hi You may try this syntax, what is quite usual in other databases: SELECT title FROM ranges JOIN ips ON ( ip BETWEEN start AND stop ) Question about this create table statement: [code] CREATE TABLE `ips` ( `ip_id` int(20) unsigned NOT NULL auto_increment, `ip` int(10) unsigned NOT NULL, PRIMARY …

Member Avatar for tesuji
0
597
Member Avatar for Acidburn
Member Avatar for tesuji
0
41
Member Avatar for cam9856

Apparently, he is thinking of hacking SQL Server by some C++ code ! Planning this, at least he needs some detailed knowledge about xxxx_getinfo(), . . . krs, tesu p.s. he is kindly invited to post again on database forum.

Member Avatar for cam875
0
91
Member Avatar for margierose

hey, you may try recursive function baseb: [code=c++] void baseb(int b, string fi, unsigned int nb, string &f){ int p = nb % b; nb = nb / b; if ( nb > 0) baseb(b, fi, nb, f); f=f+fi[p]; } int main(){ int b = 16, nb = 2008; string …

Member Avatar for William Hemsworth
0
160
Member Avatar for Superfat

[QUOTE=Superfat;632447]Elaborate please =], i was trying to say that a-r are random numbers between 1 and 9, this is just a snipet of some code i already have, i an just having some problems with figuring out random numbers... i figured that if the largest variable is an unsigned, max …

Member Avatar for tesuji
0
171
Member Avatar for Hairymarble

Hello Hairymarble, 1. To all appearance almost every table seems to be already in 3NF, but 2. One cannot state anything about 2NF if no primary keys are given. So to proving 3NF is also impossible. 3. If you have to determine primary keys, you need complete set of functional …

Member Avatar for tesuji
0
75
Member Avatar for mrboolf

Hi mrboolf, [QUOTE=mrboolf;629970] . . . [code=c++] M_Board::M_Board() { int i = 0, j = 0; m_board = new int*[N]; for(i=0;i<N;i++) { m_board[i] = new int[N]; } i = 0; for(i=0;i<N;i++) { for(j=0;j<N;j++) { m_board[i][j] = 0; } } QCount = 0; } M_Board::~M_Board() { int i = 0; for(i=0;i<N;i++) …

Member Avatar for mrboolf
0
209
Member Avatar for Noe'

Usually Borland c++ Version 5 does not need special configuration after proper installation from original (or even copied) CD, except one tries to install a plain disk copy of an already installed system. Also samples usually have project files (*.bpr) which must be started instead of a source file belonging …

Member Avatar for tesuji
0
233
Member Avatar for thehype2049

hi you may try this [code=c++] int main(int argc, char *argv[]){ cout << "Program name: " << argv[0] << endl; cout << "Numbers of Parameters: " << argc << endl << "Parameters:\n"; for(int i=1; i<argc;i++) cout << i << " " << argv[i] << endl; return 0; } /* result …

Member Avatar for iamthwee
0
109
Member Avatar for paulcat

Hi all, I would never suggest beginners to program considerable GUIs by using MSDN because it may last until the cow comes home as Ancient Dragon already pointed out. Maybe a better and clearer way for creating GUIs is QT 4 (has nice bar graph) or wxWidgets (both free), also …

Member Avatar for Maulth
0
266
Member Avatar for conwayce

Hi conwayce Cannot figure out the logic how result is created from the given tables. How are these two tables related to each other? Are there any (hidden) relationships? Best you post complete schema of both tables. krs, tesu

Member Avatar for tesuji
0
133
Member Avatar for remk

malloc ?? this is not c++, maybe plain c --> new 34 GB ?? 2 bytes just allow 2,1 GB to be addressed by

Member Avatar for tesuji
0
114
Member Avatar for joelbaby
Member Avatar for chsarp_vijay

Hi chsarp_vijay, Derby is pure Java. if you want to use it, you must program Java. Why not using SQL Anywhere/Ultralight from worldwide leader in mobile computing, Sybase? There mobile computing database run on almost all mobile systems, even on mobile phones (also Derby does so). You can download developer …

Member Avatar for tesuji
0
91
Member Avatar for tusharvichare

hi tusharvichare The new net framework has a nice xml class containing almost all methods you need to work with xml. krs, tesu

Member Avatar for tesuji
0
98
Member Avatar for motofoto

Hi maybe you would be able to create such table from below list by writing small Python program? [code] Country Code ---------------------- Afghanistan 93 Albania 355 Algeria 213 American Samoa +1-684* Andorra 376 Angola 244 Anguilla +1-264* Antigua +1-268* Argentina 54 Armenia 374 Aruba 297 Ascension 247 Australia 61 Australian …

Member Avatar for pritaeas
0
907
Member Avatar for 330m
Member Avatar for QuantNeeds

Hi QuantNeeds [QUOTE=QuantNeeds;628200] . . . warning C4552: '>' : operator has no effect; expected operator with side-effect . . . [code] int numStudents = 10; // assignment necessary for(numStudents > 0; numStudents -= 1;) [/code][/QUOTE] Your for loop is correct. It corresponds completely with the Standard ISO/IEC 14882:1998(E) of …

Member Avatar for QuantNeeds
0
795
Member Avatar for amarjot

Hi amarjot [QUOTE=amarjot;627438]I am on my training and want to assess microsoft xcel database using a c++ program for my project..[/QUOTE] Did you mean MS Excel spreadsheet, which is not a database? If so, you may read this: [url]http://support.microsoft.com/kb/308407/en-us/[/url] krs, tesu

Member Avatar for Ancient Dragon
0
94
Member Avatar for tuse

[QUOTE=tuse;627452]Design as follows- <date1> <date2> <date3> <date4>--- <attended> <rollno1> 1 0 1 1 3 <rollno2> 0 0 1 1 2 <rollno3> 0 1 0 0 1 [/QUOTE] How to design the appropriate select statement? Also, what if you want to add a further date <date5>? From a theoretical point of …

Member Avatar for tesuji
0
116
Member Avatar for lydia21

[QUOTE=lydia21;625087]hi I want to fetch data from four tables using a single query.please tell me how to do that. thanks in advance[/QUOTE] try select * from a, b, c, d then sort out at your leisure :D

Member Avatar for varmadba
0
100
Member Avatar for Fost

It depends on the data type of the attribute you demand to be excluded from result set, for examples if numeric: ... where Attribute != number if char: ...where Attribute != 'excludeme' if char surrounded with other stuff: ... where Attribute NOT LIKE '%excludeme%' if NULL ... where Attribute IS …

Member Avatar for tesuji
0
95
Member Avatar for FTProtocol

[QUOTE=FTProtocol;626513]The reason im using if/else if is because if i use case IDC_Server: etc it does all case statements then quits instead of just doing the case statement for that button.[/QUOTE] [b]break[/b] it off !!!

Member Avatar for FTProtocol
0
713
Member Avatar for ice661666

[QUOTE=Alex Edwards;625733]255! is 3.3 * 10^503, long double wont be enough =/ [/QUOTE] Wrong! long double is stored in 80 bits. So their numbers have approximately 19 digits of precision in a range from 3.37 x 10-4932 to 1.18 x 10+4932 ! The poor problem is that neither printf nor …

Member Avatar for tesuji
0
139

The End.