440 Posted Topics

Member Avatar for harcaype

hello, You want to select some data from three tables. This will be done by two inner joins. If you don't tell which columns of the involved tables should be joined together the result will be cartesian product (cross join), that is all columns of 1st table will be joined …

Member Avatar for edgarlip
0
159
Member Avatar for DBGuy007

Hi, I am back again. Because of "A French vocable got one or more English vocable equivalents and vice versa." there exists a many-to-many relationship between both entities. Therefore this is the correct solution: [QUOTE=DBGuy007;775922] Possibility 1. Table 1: French vocabulary Table 2: English vocabulary Table 3: Translation table containing …

Member Avatar for tesuji
0
115
Member Avatar for 2eXtreme

Hi 2eXtreme, in another thread [url]http://www.daniweb.com/forums/thread127644.html[/url] there was a similar problem like yours. I gave the advice to solve it with the new with clause. You should carefully compare the table structure and given solution in post #7 with your table structure. I think it is possible to adopt the …

Member Avatar for petrhorak
0
183
Member Avatar for rich_m

Hi rich_m >>> My team( all freshers) are developing a project that will involve many Modules. You must be "sophos ke moros" to carry out such database design successfully, which is every project's most crucial design phase. So wait a year or two until you will have past database design …

Member Avatar for rich_m
0
101
Member Avatar for veledrom
Member Avatar for chaosprime
0
124
Member Avatar for scholzr

hello, I am glad that you have got inspired by my solutions. Questions: 1. How is your uniqueID computed? 2. Does uniqueID correspond to the date? 3. Isn't there a contradiction in WHERE b.uniqueID < a.uniqueID and your example [code] DB10006 | 05-3-08 | 233.00 | 233.00 DB10007 | 05-3-08 …

Member Avatar for chaosprime
0
316
Member Avatar for rich_m

Hello rich_m, how are you? I am afraid you will have to wait at the Greek calends. Once MySql company had a wonderful oracle clone. It was MaxDB, formerly SAPDB. And lots of people thought they would drop ugly MySql database and replace it by MaxDB. But they returned it …

Member Avatar for buddylee17
0
189
Member Avatar for c++ prog

Hello if you want to get an oracle developer you probably become fond of this site: [url]http://st-curriculum.oracle.com/tutorial/SQLDeveloper/index.htm[/url] Also full oracle documentation is available at oracle.com krs, tesu

Member Avatar for debasisdas
0
106
Member Avatar for aamint

Hello that depends on your specific database system. There are Database systems where you can type in: select myBirthday - now() as "My age is:" ; You need to know the current-date function of your database, for example: today(), now(), currentdate() etc. krs, tesu [QUOTE=aamint;655817]Hi, I'm developing issues database. How …

Member Avatar for aamint
0
109
Member Avatar for emiola

Hello, >>> I installed and configured MySQL on my server and also installed the MySQL ODBC driver (version 5.1). What the problem is now that I couldn't establish a connection, despite that I supplied all the parameters corectly. All I kept getting is "unable to establish a connection: access denied …

Member Avatar for tesuji
0
148
Member Avatar for veledrom

[QUOTE=veledrom;656042]Hi, How can i pick next or prevoius day in mysql? Any function like curdate() ? Thanks[/QUOTE] next: today + 1 previous: today - 1

Member Avatar for veledrom
0
115
Member Avatar for veledrom
Member Avatar for veledrom
0
70
Member Avatar for schone

Hello What is the primary key of responses, (response_id, range_id)? To ensure referential integrity all foreign keys (fk) must be set up correctly. Diaries ---< questions: diary_id is fk in questions. Questions ---< responses: question_id is fk in responses. Response ---- response_values: because there is one-to-one relationship, response_id (and range_id, …

Member Avatar for tesuji
0
161
Member Avatar for Lokesh.snghl

hello [code]SELECT DATEDIFF(DAY, yourBirthday, getdate()) AS silly_days[/code] may work on mssqlserver. krs, tesu

Member Avatar for tesuji
0
134
Member Avatar for kavithabhaskar

hello, >>> "select * from table1 where RAM between ... " Never use *, the sign of slackers! You must always enumerate only those columns you really need for your datagrid! There are lots of reasons for data type mismatch, so it s better you bring in the complete and …

Member Avatar for kavithabhaskar
0
155
Member Avatar for ncognito66

Hello, you may have a look at DATE_FORMAT(date, format), especially specifier %p to convert date and time values. krs, tesu

Member Avatar for tesuji
0
151
Member Avatar for tanta

Hi, you may try: [code=sql]select * from yourtable where TO_CHAR(your_date, 'MM') in ('01', '03',... ,'12')[/code] krs, tesu

Member Avatar for tesuji
0
88
Member Avatar for stockton

hi, how do you access the database? If by ODBC, you should set autocommit OFF. Unfortunately, ODBC's default is ON! krs, tesu

Member Avatar for tesuji
0
148
Member Avatar for c_shaft05

Hello Because both products differ in an important property they must have different part numbers. So you are able to manage different quantities, deliverers, prices, taxes etc. You may put them into same category, for example "hard disks" to get a list of all hard disks if necessary. krs, tesu

Member Avatar for tesuji
0
88
Member Avatar for monksorlo

Hi monksorlo what do you mean by subtype/supertype. Does this deal with the concept of Generalization/Specialization of extended entity relationship model? you may state an example. If your professor suggest doing something else just for performance reasons at that very early design stage, you may change professors. krs, tesu

Member Avatar for bilalhaider
0
456
Member Avatar for chris-uk-lad

hi, there are some discrepancies: 1. What are PD.REFNO, PH1.BGROUP, PS1.REFNO ? 2. Is there a self-join: LEFT JOIN TableC LEFT JOIN TableC C ??? 3. TableC of first left join doesn't have alias. 4. Select has 6 columns but only 3 results are showing. Btw, threefold results may likely …

Member Avatar for tesuji
0
104
Member Avatar for stewpyd

hello, in union clause the column which should be ordered cannot be denoted by column name. Column to be ordered must be specified by its position number like in: [code] select a, b, c from t1 union select x, y, z from t2 order by 2[/code] That orders second column …

Member Avatar for tesuji
0
141
Member Avatar for dmmckelv

Hello dmmckelv, When Edgar Frank Codd invited relational databases his primary idea was to found it on logic algebra and set theory. The rows of relational tables (aka relations) are sets. Therefore, there aren't duplicate rows nor any particular order of rows. From this point of view, "I am looking …

Member Avatar for tesuji
0
191
Member Avatar for php-lover

Hi Finau, If both following statements are true 1. Each table has a column named region_id of compatible data type 2. At least one of those tables has primary key region_id AND all other tables containing region_id that column is attributed to be foreign key. then you may carry out …

Member Avatar for tesuji
0
106
Member Avatar for elivate

Hello, in tbl_poems exists a transitive dependency poem-ID -> Author-ID -> Book-ID. Therefore, this table does not satisfy 3NF. fk Author-ID should be removed and inserted into tbl_Book. The result is: tbl_Poems: - poem-ID - pk - Poem-Title - Poem - Book-ID - fk tbl_Book: - Book-ID - pk - …

Member Avatar for elivate
0
180
Member Avatar for rupaknath

Hi rupak Stay your ground! Knowing as less as possible from that database protects one from becoming infested with badly base database concepts. Try to learn db2, firebird, oracle, postgresql, ms sql server etc, they all are true relational data base systems. krs, tesu

Member Avatar for Shanti C
0
88
Member Avatar for veledrom

So you want to decipher a 160 bit binary HSA1 string? Impossible! (except for hiring some Roadrunner doing brute-force decryption.)

Member Avatar for tesuji
0
74
Member Avatar for kvdd

[QUOTE=kvdd;642708][code=mysql] SELECT IF TIME(hour_end) > '21:00:00' THEN timediff(time(hour_end),'21:00') AS diff ENDIF FROM `hours` [/code][/QUOTE] What do you think of correct syntax? [code=mysql] SELECT IF ... THEN ... ELSE ... ENDIF AS diff [/code] krs, tesu

Member Avatar for tesuji
0
115
Member Avatar for eva_blue

Hello, 1. how come that in >>> select temp.start, temp.end, temp.gene_name, min(temp.distance) as >>> minimum_distance from (select start_bindsite, end_bindsite, gene_name, >>> abs(gene_start-start_bindsite) as distance from genome, binding_sites group by >>> gene_name, start_bindsite group-by clause contains 2 columns only whereas you select 3 columns? this should produce a true error, if …

Member Avatar for tesuji
0
78
Member Avatar for varun077

Hi varun077, Most of your questions including your several performance and maintenance issues will simply get solved if you (re-)design a true relational datamodel based on correct relationships (cardinalities) and effective normalization, as for example: 1. Foreign keys: will appear automatically if relationships are correctly taken into account and implemented …

Member Avatar for tesuji
0
97
Member Avatar for guptaalok12

Hello guptaalok12, When Edgar Frank Codd invited relational databases his primary idea was to found it on logic algebra and set theory. The Rows of relational tables (aka relations) are sets. Therefore, there aren't duplicate rows nor any particular order of rows. From this point of view, asking "How To …

Member Avatar for tesuji
0
165
Member Avatar for saisankar_p

Hello If your tables are properly designed simple inner joins will solve your problem: select * tbl_site join tbl_state join tbl_trial_site join tbl_user_site. Ok, this result set will contain duplicate columns. To discard them you must replace the asterisk by the list of column names you want to get. Unfortunately, …

Member Avatar for saisankar_p
0
128
Member Avatar for motofoto

Ah, you again Did you proceed in understanding EERM? I call people who put a magical, universal "id" column with an auto-increment on all their tables "id-iots" ! (Joe Celko)

Member Avatar for peter_budo
0
146
Member Avatar for bajanstar

Hello bajanstar you may try this statement: [code] select receptor as 'ultimate donors, really? Shouldn''t it be ultimate receptors?' from inthebelowtable where receptor NOT IN (select donor from inthebelowtable) [/code] krs, tesu

Member Avatar for tesuji
0
98
Member Avatar for USUAggie

yeah, aaaaaand the ardently demanding question is what does that only mean: >> merge function is not working at all ? Any error message, divide by zero, memory fault, endless loops, computer on strike, or something else, you see?

Member Avatar for tesuji
0
173
Member Avatar for Q8iEnG

You may study programming languages like FORTH or Postscript how they do computing using stacks. tesu

Member Avatar for Q8iEnG
0
149
Member Avatar for motofoto

Hi motofoto There is kind of inheritance - in EERM - where we have Generalization / Specialization, such called isa-relationships. Maybe you should first design an EERM. Your implementation idea of isa-relationships is correct, generic data might be collected in a person entity (table), specialized data in additional entities (tables, …

Member Avatar for motofoto
0
122
Member Avatar for qdaddyo

Hi qdaddyo you may try this statement: [code=sql] with modi (tn, moda) as (select ticket_number, min(modified_date) from tictac where assignee <> 'NONE' group by ticket_number) , retu (tn, reda) as (select ticket_number, max(return_date) from tictac group by ticket_number) select m.tn, m.moda, r.reda, datediff(day, m.moda, r.reda) as "days" from modi m …

Member Avatar for tesuji
0
74
Member Avatar for harcaype

[QUOTE=harcaype;639245] [ICODE][B][COLOR="Green"]SELECT[/COLOR][/B] Vio.ViolationList.ViolationCode,Records.[Violation Commited],Vio.ViolationList.FineAmnt,DriverInfo.[Plate Number] ,DriverInfo.[License Number],DriverInfo.[Reg'd Last Name],DriverInfo.[Reg'd First Name],DriverInfo.[Reg'd Middle Name],DriverInfo.[Reg'd Address], DriverInfo.[Address' City Code],DriverInfo.[Reg'd B-Date],DriverInfo.[Conduction Number], DriverInfo.[Vehicle Category],DriverInfo.[Vehicle Type],DriverInfo.[Vehicle Brand] ,Records.[Street Name],Records.[Date] [COLOR="Green"][B]FROM[/B][/COLOR] Vio.ViolationList,DriverInfo,Records [COLOR="Green"][B]WHERE[/B][/COLOR] Records.PlateNo [COLOR="Red"]like[/COLOR] DriverInfo.[Plate Number] [COLOR="Red"]and[/COLOR] Records.[Violation Commited] [COLOR="Red"]like[/COLOR] Vio.ViolationList.ViolationD[/ICODE] In above from clause you are joining the tables ViolationList, DriverInfo and Records …

Member Avatar for harcaype
0
108
Member Avatar for Mad Pat

Hello mad pat You need a further table, name it salesitems, where its primary key must be formed from salesID and productID because of many-to-many relationship. Both are also foreign keys. Here can you also place quantity, item price, total price etc. Ok, write the create-table statements for all four …

Member Avatar for Mad Pat
0
1K
Member Avatar for adamj2

Hi possibly you want that second array of chars behaves like first on, as in: [code] int main() { unsigned char apayload[] = {'H','i',' ','T','h','e','r','e', '\0'}; unsigned char received_payload[]={'H','i',' ','T','h','e','r','e','a', 'b','\0'}; cout << apayload << " "<< received_payload << endl; received_payload[8]='\0'; cout << apayload << " " << received_payload << …

Member Avatar for Ancient Dragon
0
164
Member Avatar for dakoris73

Hi dakoris73 A constraint is kind of restriction usually to the range of values of a variable. Given the following create-table statement we can detect several constraints: create table raint(id integer UNIQUE, NOT NULL, day char(10) CHECK(day IN ('Monday', 'Tuesday', 'wednesday', . . .) ); UNIQUE This constraint assures that …

Member Avatar for tesuji
0
69
Member Avatar for kvdd
Member Avatar for LAMDB

hi If you were able to redesign table Markets like that: (PrjID, MarkedID, Market), where at least all three attributes be part of markets' primary key, the query you are looking for and generating where clause at runtime would really be simple: select distinct p.PrjID, PrjName from projects p inner …

Member Avatar for tesuji
0
285
Member Avatar for michael123

Hello michael123 I am afraid, there is no direct way to get rid of duplicate rows. But you can populate a new table with distinct rows from your given table only, for example: [code=sql] -- create your table create table dudel(name varchar(50)not null, sex char(1), age integer); -- inserte some …

Member Avatar for cmhampton
0
585
Member Avatar for Shaun32887

Hello depending on how many "grams" will be processed, that is eliminating duplicates, comparing two sets of "grams", hashing method is best method, it is of O(1). And compared with other searching methods it is really easy to program. Guess how many "grams" of each set need to be compared …

Member Avatar for Shaun32887
0
117
Member Avatar for shadwickman

Hi Do below statements not work on mysql? [code=sql] DELETE FROM accounts WHERE usrn = 'caughtusername'; COMMIT; [/code] As nav33n already suggested. krs, tesu

Member Avatar for nav33n
0
714
Member Avatar for dannyd

Hello In subselect you select b.Airtime and then you compare it with a.Airtime but between them there are still large differences. try these changes: AND a.Airtime -- you want to get airtime with differences greater than 30 sec IN (SELECT a.Airtime FROM stationschedule b WHERE TIME_TO_SEC( TIMEDIFF( RIGHT( a.Airtime, 9 …

Member Avatar for tesuji
0
86
Member Avatar for stockton

Hi, So you have a table consisting of 6 columns: Column Name Data Type Length Turnover where the latter should be of decimal data type??? What do you mean by "that the max value could be limited to 9999,99" ? Should output format be restricted to 9999.99 (decimal(8,2)) or the …

Member Avatar for stockton
0
289
Member Avatar for TheBeast32

[QUOTE=TheBeast32;609145]Hi, is there a data type larger than unsigned long long int except double? I don't want double or float because I need to keep it as precise as possible. I also need it to be able to do modulus. How would I do this?[/QUOTE] GMP is uniquely great. Yet, …

Member Avatar for TheBeast32
0
110

The End.