Quantcast
Channel: dBforums – Everything on Databases, Design, Developers and Administrators
Viewing all 13329 articles
Browse latest View live

SQLCode iOS application

$
0
0
Hi everyone,

Just a quick note to inform you that i'm the author of SQLcode under iOS.
An SQLcode app finder.
Feel free to try it !

SQLcode - A mobile SQLcode search tool

I offer 10 licences for the paid version, just send me an email !

Custom Shortcut Menu

$
0
0
This is the code I have put together so far. I'm trying to create a custom right click menu. I want to add the "Text Filters" dropdown to this menu and am looking for a little help. If you were viewing a datasheet and using the default shortcut menus you would see the "Text Filters" option in you right clicked. I'm looking to add that to my menu. Any help at all would be GREATLY appreciated!! I'm using access 2010. Thanks!

Sub CreateWIPShortcutMenu()
Dim cmbRightClick As Office.CommandBar

' Create the shortcut menu.
Set cmbRightClick = CommandBars.Add("cmdWIP", msoBarPopup, False, True)

With cmbRightClick
.Controls.Add msoControlButton, 19, , , True 'Copy

.Controls.Add msoControlButton, 141, , , True 'Find

.Controls.Add(msoControlButton, 210, , , True).BeginGroup = True 'New group and Ascending

.Controls.Add msoControlButton, 211, , , True 'Decending

.Controls.Add(msoControlButton, 10068, , , True).BeginGroup = True 'New group and Equals selection

.Controls.Add msoControlButton, 10071, , , True 'Filter Excluding selection

.Controls.Add msoControlButton, 10076, , , True 'Contains Selection

.Controls.Add msoControlButton, 10089, , , True 'Does not contain selection

.Controls.Add msoControlButton, 10090, , , True 'Begins With selection

.Controls.Add msoControlButton, 12265, , , True 'Does not begin with selection

.Controls.Add msoControlButton, 10091, , , True 'Ends with selection

.Controls.Add msoControlButton, 12266, , , True 'Does not end with selection

.Controls.Add msoControlButton, 605, , , True 'Remove Filter/Sort

End With

Set cmbRightClick = Nothing

End Sub

Over booking

$
0
0
Hi,

I have created an activity booking database, i have used 5 tables 'Activity, Booking, Centre, Member, Membership'

Each activity has a maximum amount of members that can book so i created a summery query which also creates a new field called 'Spaces' this changes from a total to 'Full' when the total bookings for and activity on a specific date equals the maximum value for the activity. all works fine but it allows over booking to happen, i have tried all sorts but i am very new to access and so a few pointers in the right direction would be great-fully received.

I have attached my db if it will help.

Many thanks in advance.

Mark

Attached Files
File Type: zip ActityBooking.zip (1.66 MB)

Need help for ERD

$
0
0
can anyone help to to draw ERD for current scenario

All student details such as student id, name, and start-date and phone number need to be store.

There are many courses offered by university. For example MBA, MSc, BSc, BABS, DF, English etc. Each course id identified by course id, description, duration. Each course has many semesters. Each semester takes place during a particular term. Semester details and term details are required to be stored in the database.

Each course has many subjects and same subject may be offered in many courses. For each subject many details such as Subject code, name, result and attendance are required to be stored. Every subject has mainly two assessments; one assignment and one exam. Assignment is worth of 30% and exam 70% respectively.

Using .Oldvalue property

$
0
0
Consider the use of .oldvalue in a textbox in an "Undo" button for instance:
Textbox.Value = Textbox.OldValue

But the problem I see is with using oldvalue in the case of a listbox that allows multiple values. Check it out:
Listbox.value = listbox.oldvalue 'Will not work.

I've mingled with variations for a while, but I'm beginning to wonder if .oldvalue is not compatible with multi-value fields. Hm.

Matthewgrace

how to change spell checking dictionary?

$
0
0
Guys, i would like to change the spell check dictionary to spanish... but... where can i do so???

i have checked almos all the .app files and i cant find any dictionary to change

any help is wellcomed.

best regards

fer from mexico

Mainform with a command button to subform

$
0
0
Hi,

I have spent hours researching and googling and I've hit a wall.

I'm trying to collect a significant amount of data that is separated into 3 tables/forms. A main form and 2 subforms. All 3 forms are data entry forms and the subforms are to be linked to the main form by a primary key (cellID). I would enter some data into the Main form then chose either subform 1 or 2 depending on a decision to enter the rest of the data.

I am trying to link a subform to my mainform through a click of a command button. My subforms are too huge to be part of the main form or in tab control.

My problem is, I can't seem to be able to link the forms if the subform isn't embedded in the main form. I think my relationships are set right but now I'm starting to question everything.

I'm attaching my database.
Mainform: Autopsy Station
Subform1:CellAutopsy
Subform2:PitAutopsy

PrimaryKey: CellID

Any help would be muchappreciated.. Thank you

Attached Files
File Type: zip FEI Autopsy.zip (532.9 KB)

How to Repair corrupted database SQL server 2008?

$
0
0
My database of sql server 2008 has been damaged. Now I m seeking for the right tool to repair database, Please recommend me?

New to Access Looking for Ideas

$
0
0
Hello All,

I have three fields that have dates in them, I would like to query these fields looking for Null values and dates that are older than a year. So far everything I have tried has failed. Any Suggestions!

Sincerely,
Joseph Limata
US Army

single DB migration

$
0
0
Hi,

I have 4 DB under one instance in V9.1. I want to migrate one(not all 4) of those DB's from DB2 V9.1 to V9.5. So is it possible to perform this migration.

OS: LUW

Thnaks in Advance.
:beer:

the mystery DDL trigger vs. the sysadmin

$
0
0
SQL Server 2012....

A database from another server and team was backed up and placed on my dev server. I am a sysadmin on the dev box. There are no DDL triggers on this machine. However whenever I try to change any DDL in this database it is complaining about a missing DDL audit table. This thing is drving me a little nuts this morning.

is there an equivalent in Postgresql for MS SQL BEGIN TRANSACTION?

$
0
0
is there an equivalent in Postgresql for sql server's BEGIN TRANSACTION?

In sql server you could use Begin Transaction before a update statement, run it and then do a select on the table and see the update changes on the table. then perform a commit or rollback if the results are what you intended.

I tried using the BEGIN command in postgresql, but then when I go to run my select statement on the updated table, I don't see where the update took place.

Code:

BEGIN;
-------------------------------------------------
-- End Date all HYU Power Proctect Records -
-------------------------------------------------

Update sg_dlr_da
Set sg_dlra_ebdate = '2014-07-23'
  ,sg_dlra_mtby = 'IT'

Where sg_dlra_dealer like '%HYU%'
and sg_dlra_plc like 'PP%';

--Select sg_dlra_dealer
--      ,sg_dlra_plc
--      ,sg_dlra_conpmt as Contracts
--      ,sg_dlra_clmpmt  as Claims
--      ,sg_dlra_canpmt as Cancellations
--      ,sg_dlra_sbdate  as "Start Bus Date"
--      ,sg_dlra_ebdate  as "End Bus Date"

--      ,sg_dlra_crby    as "Entered By"
--      ,sg_dlra_crdt    as "Date Created"
--      ,sg_dlra_mtby    as "Modified By"

     
--From sg_dlr_da

--Where sg_dlra_dealer like '%HYU%'
-- and sg_dlra_plc like 'PP%';

Ssrs help

$
0
0
HELP SSRS..
Fellow SQL Server users, I am trying to generate a report with that looks like this
host name cpu memory others ticket_numbers
12345
z 0 12 0 45655
775764
etc...
i am generating the results from a simple query that gives me data for every row, but in the report i do not want to repeat the same entry for every row i.e. for host name i just want to display the name (z)once, merge and center it, instead of having 3 entries of the same name. hope i am making sense. how do i achieve this?

Open form with two where conditions

$
0
0
Im trying to open a form with two where conditions with the following VBA code


Code:

DoCmd.OpenForm "frmPickLogsForProduction", , , ("[EmployeeID]= " & Me![EmployeeID]) And ("[PickingDate]= " & Me![PickingDate])
I keep getting error Type Mismatch. Any ideas?

pg_dump and partitioned tables

$
0
0
Hi all,

I'm being asked to extract data from a single partitioned table, and pg_dump is acting a little weird. If I enter:

pg_dump -Fc -t "capacity_metering*" > cap_mtr.sql

pg_dump will extract all 34 million records from all of the partition tables, but if I specify:

pg_dump -Fc -t capacity_metering_1400198400 > single_part.sql

with or without quotations and this is one of the partition tables, pg_dump complains that there are no matching tables found. Weirdly enough, if I enter something like "select count(*) on capacity_metering_1400198400" in psql, it works fine. Is it possible to easily dump a single partition table in any manner?

Thanks,
Jay

Help creating a search using drop downs

$
0
0
Need help making a form that uses drop downs as options for criteria and i would llike it to return a report of records that match all of the criteria can anyone help with this?

Optimal design in managing Contacts and Availability.

$
0
0
Hello Everyone!

I am designing a relational model that supports the implementation of a Notification System.

The main scenarios where I have some doubts are:

Be able to cover a time availability from an "Entity" in order to be notified, ("Entity" is probably not the best name, but I modeled it this way for a reason which I’ll explain later).

Be able to contain different "Contact"s belonging to an "Entity" (Entity has many Contact, and a Contact belongs to one Entity) , visualizing a priori the following "ContactType": Telephone, Cellphone, Beeper, and Address.

Under this point of view, I have a doubt about how optimum this vision is of containing, in only one table "Contact", the data such as: telephone, cellphone, Beeper, Address and so on (which could come in the future).

I created this design, because I modeled a "Generalization" about the "Entity" concept since it is the highest level entity concerning the lower level entities group; in this case are "Teacher", "Director", "Student", "Representative".

All these entities mentioned before will manage "Contact" that could be: Telephone, cellphone, address and so on) and some "Contact" (depending on the ContactType + The EntityType) will manage "Time Availability", for example ContactTytpe = Cellphone and EntityType = Student, it could have a
scheduled for being notified, It is not the case for a ContactType = Address which will have just the address of the entity. Basically ContactType equal to telephoneNumber, CellphoneNumber and Beeper are able to be notified.

Finally, how optimum is it having a table that manages the Contact information the way I proposed? At least considering the generalization, it seems very clear graphically, avoiding circular dependency.

Basically depending on the "ContactType" is how the data will be inserted in the "Contact" table. For example; if I’d like to add a new telephone contact for the entity 'Director', all the fields unrelated to this concept will be equal to NULL (address, State, Provincy, ZipCode, cellPhoneNumber, celphoneCode, BeeperNumber,...)

What are the advantages and disadvantages of making a design in this way? (I know some of them, so I just want to re-confirm them. ¿ Is there a better optimized proposal?

And my other doubt is about which the best optimized way could be in order to be able to manage the "Time Availability", considering that some contacts (depending on the type of contact + the type of the entity) will manage "Time Availability".

I thought of an entity named "Availability" which will contain a range of time that contemplates the entire day (for example tuples of 15 minutes x the seven days of the week), however the number of final records of the entity which will cover the Contact v/s the Availability (middle table between N:N relation) will be equal to the number of each time block x the number of the days of the week x number of the contacts with a Availability time active, so I can envision that this table will have a very large size.

Hopefully I wrote clear, Thank you in advance for any comment!

I attached a evidence, thanks!

Attached Images
File Type: png evidence.png (9.7 KB)

A little help on conceptual design?

$
0
0
Hey Guys, i'm trying to conceptually model a db for the following situation:
To manage/record sightings of many differing machinery types, be it Cars, Buses, Trucks, Boats, Trains, etc. which will also record all the characteristics of such a sighting [which would obviously vary greatly: colour, hull type, vehicle model, etc., etc.] and where the sighting occurred, and by which User.

The data they enter/select will be mostly sourced from lookup tables, with perhaps only a Notes field for very specific observations and Photos taken of the observation being the exceptions. Note: I don't want users to record sightings of machinery that aren't in the DB, nor add new ones - though they should be able to access the data to know what the machinery, is, in the first place.

Please see my rough concept excert as per attachment-

What i'm struggling with, is - I feel like I'll be creating almost two separate DB's with mostly the same tables, therefore - surely my understanding of the situation is flawed, or currently modelled imperfectly due to redundancy [Green Tables]. The most obvious solution, I suppose, would be to use the tables currently implemented as the turquoise look-up tables to hold the observed data and add a column to the tables differentiating them as Observed records -- but that will spell trouble in a situation where the club often "up" votes better photos of Machinery to become the Look-up tables defaults, therefore, the original photographer would not then be allowed to delete his own photo that has become a default; I feel this could lead to many other 'erroneous' issues and become messy fairly quickly.

The other concept i'm struggling with is how to keep the initial observation unique, but allow additional updates over time. i.e. I don't want multiple observations of the same machine recorded at the same time, yet, I do want updates [has it sustained damage / changed colour / record the different locations it has been seen in etc.] -- for instance, most machinery can "move" but some are most definitely "stationary" [e.g. Tower Cranes], so recording observations from different users of the same Tower crane is superfluous [the same *anything for that matter], but if the crane's tower has been increased/decreased a story or more, we would want the ability to record that. Perhaps some Date Table, or adding a date attribute to the ObsCharacteristic Table?

So I suppose in summation: Should you ever combine "Look-up" table data with externally collected data in the same table - seems like a bad idea?
And what schema could you suggest to handle such a situation as appending further sightings to an already sighted Machine - another one-to-many table?

Sorry for the long-winded post, but I'm getting frustrated with learning concepts and understanding them in theory, but when it comes to implementation - I find myself getting awfully muddled. Thanks for any thoughts, suggestions in anticipation - cheers Dyr.

Attached Images
File Type: jpg DB_033.jpg (95.8 KB)

EXPDP hangs

$
0
0
Hi all,

I have an export issue using EXPDP command. I spent enough time on Google. It was working till 4 days back. When I use EXPDP command, I could see following output after a very long time.

Code:


[oracle@adarna trace]$ expdp SEPHORA_CORP_NE_UAT/sephora_corp_ne_uat tables=fr_employees directory=dmpdir dumpfile=V5_DEMO_SEPHORA_IDC_12Jun2014.dmp logfile=V5_DEMO_SEPHORA_IDC_12Jun2014.log

Export: Release 11.2.0.1.0 - Production on Thu Jun 12 20:52:46 2014

Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.

Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
ORA-31626: job does not exist
ORA-31637: cannot create job SYS_EXPORT_TABLE_01 for user SEPHORA_CORP_NE_UAT
ORA-06512: at "SYS.DBMS_SYS_ERROR", line 95
ORA-06512: at "SYS.KUPV$FT_INT", line 798
ORA-31635: unable to establish job resource synchronization

I ran the following command and got this result. I am sure I am only person using this database. I am not sure why one record STATE showing as EXECUTING

SELECT owner_name, job_name, operation, state FROM DBA_DATAPUMP_JOBS;

Code:


V6_DEMO_QA                    SYS_EXPORT_SCHEMA_01                  EXPORT                                EXECUTING 
SYSTEM                        SYS_IMPORT_SCHEMA_02                  IMPORT                                NOT RUNNING
SYSTEM                        SYS_IMPORT_SCHEMA_01                  IMPORT                                NOT RUNNING
SEPHORA_STORES_EX_UAT        SYS_EXPORT_SCHEMA_01                  EXPORT                                NOT RUNNING
V6_DEMO_QA                    BIN$+7R4xF57EgTgQAB/AQBr6w==$0        EXPORT                                NOT RUNNING
SYSTEM                        SYS_IMPORT_SCHEMA_03                  IMPORT                                NOT RUNNING
SYSTEM                        SYS_EXPORT_SCHEMA_01                  EXPORT                                NOT RUNNING
NETSUITE_V5_DEV              SYS_EXPORT_SCHEMA_01                  EXPORT                                NOT RUNNING
SEPHORA_STORES_EX_PROD        SYS_EXPORT_SCHEMA_01                  EXPORT                                NOT RUNNING

How to remove the EXECUTING state record?

Displaying data from a query

$
0
0
I am producing a database for an charity who give free legal advice. I have various table to record this - matters, legal, outcomes.

The relevant fields are:
matters - mattered, legalid, outcomeid, counter
legal - legalid, legal (legal is the legal area e.g. employment)
outcomes - outcomeid, outcome

I want to get a table that shows the legal area, the outcome and the number of matters for each outcome.

I have a query:
mysql_select_db($database_blac, $blac);
$query_Recordset1 = "SELECT matteroutcomes.outcomeid, outcomes.outcome, legal.legal, SUM(matters.`counter`) FROM matters INNER JOIN matteroutcomes ON matteroutcomes.matterid=matters.matterid INNER JOIN outcomes ON matteroutcomes.outcomeid=outcomes.outcomeid INNER JOIN legal ON legal.legalid=matters.legalid GROUP BY matters.legalid, matteroutcomes.outcomeid";
$Recordset1 = mysql_query($query_Recordset1, $blac) or die(mysql_error());
$row_Recordset1 = mysql_fetch_assoc($Recordset1);
$totalRows_Recordset1 = mysql_num_rows($Recordset1);

which works but the table I produce has headings Legal | Total | Outcome - the code is:
<p>&nbsp;</p>
<table border="1">
<tr>
<td width="276">Legal Area</td>
<td width="78">Totals</td>
<td width="262">Outcome</td>
</tr>
<?php do { ?>
<tr>
<td><?php echo $row_Recordset1['legal']; ?></td>
<td><?php echo $row_Recordset1['SUM(matters.`counter`)']; ?></td>
<td><?php echo $row_Recordset1['outcome']; ?></td>
</tr>
<?php } while ($row_Recordset1 = mysql_fetch_assoc($Recordset1)); ?>
</table>

I would like the legal area to only appear once rather than as it is below - so there would be Consumer on the 1st line then 3 blank lines in the legal area column then Employment etc


Legal Area Totals Outcome
Consumer 1 Avoid Repossession
Consumer 1 Housed or re-housed
Consumer 1 Prevent Homelessness
Consumer 1 Repairs carried out
Employment 2 Avoid Repossession
Employment 2 Debt challenged
Employment 1 Repairs carried out

I want it to look like:

Legal Area Totals Outcome
Consumer 1 Avoid Repossession
1 Housed or re-housed
1 Prevent Homelessness
1 Repairs carried out
Employment 2 Avoid Repossession
2 Debt challenged
1 Repairs carried out

Is this possible and, if so, how is it done?

Thanks
Viewing all 13329 articles
Browse latest View live