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

How do I integrate fingerprint in brilliant database I am designing biometric databa

$
0
0
Good day everyone, please help me on how to integrate fingerprint in my biometric database
in brilliant database

How to update sequence in MySQL

$
0
0
Hi,

I have order_tier database and I am adding tiers by checking what's the max number then add 1 to it. Now I have a problem when deleting because if the order has 4 tiers then it should have from 1 to 4, if the user deleted tier 4 then it will be 1 to 3, if the user deleted tier 2 then tier 3 should be 2 and 4 should be 3.. By this I mean it should have always a sequence without a gap in the middle and it should move from the bottom so if user deleted tier 6 of 7 tier's order then tier 7 will be 6, etc.

How can I implement this in using PL/SQL in MySQL?

DECLARE param_last_tier INT;

IF EXISTS (SELECT tier_number FROM order_tiers WHERE order_id = param_order_id) THEN
BEGIN
SET param_last_tier = (SELECT MAX(tier_number) FROM order_tiers WHERE order_id = param_order_id) + 1;
END;
ELSE
BEGIN
SET param_last_tier = 1;
END;
END IF;

INSERT INTO order_tiers (order_id, tier_type, tier_number, created_user)
VALUES (param_order_id, param_tier_type, param_last_tier, param_created_user);


Thanks,
Jassim

Ledger in Northwind Sample

$
0
0
Hi All,
This is my first message on this forum. I am looking to introduce a customer ledger in the sample Northwind database. The sample from Microsoft provides only monthly, yearly and quarterlyt reports for the customers. I want the form to display all the entries that were made, meaning all the products that the customer bought as per the user defined time period, say 15 June 2014 to 12 Jan 2015, etc etc.
Please help me with this. I am working on a fresh copy of northwind sample database, no changes made.

Thank you

Regards,
Aneela

P.S: If there is a template where I can get the ledgers please help me with that please please please.

Cross Posted At:

accessforums.net/queries/ledger-northwind-sample-56859.html#post303262

access-programmers.co.uk/forums/showthread.php?p=1465004#post1465004

forums.tutorialized.com/sql-basics-113/ledger-in-northwind-sample-397804.html

utteraccess.com/forum/index.php?showtopic=2033453

Create Date Time from Two Different Fields

$
0
0
Hi,

Using Access 2016.

How can I create a Date/Time Field in Query from two other fields in the query?

Field1 : GetTimeIn: Hour([TimeOut])-[Hrs_Regular] (e.g 22)
Field2: GetDateIn: DateValue(Format([TimeOut],"mm/dd/yyyy")) (e.g. 11/21/2015)

I tried to Concatenate these two fields using Format GetDateTimeStamp: Format([GetDateIn] & " " & [GetTimeIn],"Medium Time")
But that is returning a string 11/21/2015 22. Im trying to get to 11/21/2015 10:00:00pm

Thanks.

Match Data From Table B Once

$
0
0
Hi all,

Using Access 2016.

How can I match data in Table B to Table A once.
For example, Table A has 3 occurrences and Table B has 1 occurrence
B should Match A on the first occurrence only and ignore the other 2

No matching control numbers unfortunately, just Date, Store and Vendor.

Thanks

SIGNAL without rollback

$
0
0
Is it possible to SIGNAL, information only, without a rollback? I have always used SIGNAL in a trigger to prevent an action from being completed, but never to simply notify or warn the user. I now have a need to notify the user of the result (not expecting to process any user response, which I know is impossible) but allow the action to be completed (i.e. commit the transaction anyway). Is it just a matter of using a different SQLState, or is it impossible?

SQL if column exists use column else use ' '

$
0
0
Hi all, I'm currently working on creating a Microsoft SSIS solution and I'm looking for some help creating a query against some db2 tables.
I have a whole bunch of tables, 1 table for each product line to be correct.
I want to loop through these tables by inputing the current line as a parameter (this is solved) but I need som help with another issue.

Lets say we have:
ProductLine1 with columns LENGHT varchar(10), and WIDTH varchar (10)
ProductLine2 with columns HEIGHT varchar(10), and WIDTH varchar (10)

In the select statement I would like to do the following:

(Pseudocode)
Select case when LENGTH exists in SYSIBM.SYSCOLUMNS
then use column LENGTH
ELSE '' as LENGHT
case when WIDTH exists in SYSIBM.SYSCOLUMNS
then use column WIDTH
ELSE '' as WIDTH
and so on...

The reason why I don't want to create a new query (dataflow) for each table is that we have roughly 70
different product lines so whenever we for instance want to add a new column we don't want to add it in 70 queries

Do you have any ideas how to do this in an effective way?

Best regards
Mats

In how many days we need to restart a DB2 database?

$
0
0
Hello All,

In how many days we need to restart a DB2 database as a maintenance activity?

Db SIze : 7 TB adaptive compress
Ver : db2 10.1 fp5

Workload Management [WLM]

$
0
0
Environment DB2 UDB V10.1 Multi partitioned Databases [ISAS 7700] - 57 logicalpartitions

We have WLM enabled for a specific workload coming from a user ID -> This workload is enabled to collected the activity data with details [corresponding event monitors are turned on]

My requirement is to get the execution time for a specific stored procedure for the last one month. I found out the package name corresponding to this stored procedure and quried WLM_EVENT and WLM_EVENT_STMT table to find that. Here is the query that I wrote.

db2 "select a.TIME_STARTED, timestampdiff(1,timestamp(a.time_completed)-timestamp(a.time_started)) as exec_time_in_micro_sec, b.package_name, a.AGENT_ID, a.APPL_ID, a.PARENT_UOW_ID,a.PARTITION_NUMBER,b.section_numbe r,a.SESSION_AUTH_ID, a.UOW_ID from db2wlm.WLM_EVENT a, db2wlm.WLM_EVENT_STMT b, syscat.workloads c where a.appl_id=b.appl_id and a.uow_id=b.uow_id and a.workload_id=c.workloadid and b.package_name in ='XXXXXX' with ur"


But for each combination of applicationID.packagename, there are 1000's of records that were returned. How do I filter the number of rows corresponding to a specific stored procedure call from these thousands ? Only after doing so, I will be able to calculate the sum of all those execution times and can conclude that this is the execution time for each stored proc call.


Not sure how to look.. will we have to look for unique combination of applid/UOWID/pkgname/sec_number Or what ?


Any help in this question will be truly appreciated.

New DBA Needs To Automate Creating LOGIN/ROLE

$
0
0
I'm a new Jr. DBA and I'm currently being asked several times a day to add new users as follows:

Code:

USE [master]
GO

CREATE LOGIN [ZOO\johnsmith] FROM WINDOWS WITH DEFAULT_DATABASE=[master]
GO

USE [marketing]
GO

CREATE USER [ZOO\johnsmith] FOR LOGIN [ZOO\johnsmith]
GO

USE [marketing]
GO

ALTER ROLE [agent] ADD MEMBER [ZOO\johnsmith]
GO

I'm not seasoned enough to understand what is the best way to simplify this task I run several times per week. It's very very time consuming to launch SSMS and script out new user request as I scripted out above. Should I create a sproc in SSMS or what do you guys recommend if I'm constantly given a list of names to add to SQL Server 2012?

ObjID in Page Header

$
0
0
Hi,

I am reading the article at http://www.sqlskills.com/blogs/paul/...omy-of-a-page/

I have a database ‘MyDB’, and there is a table ‘MyTable’ in the database.

I have the following questions:

1. If I do as follows:

(1) use the following query to find the object ID for a table:

Use MyDB;
select sys.objects.name, sys.objects.object_id from sys.objects where (name = ‘MyTable’);

(2) then use the following command to find all pages allocated to ‘MyTable’:

dbcc ind(MyDB, 'MyTable', -1);

(3) then in the result table, I choose one of the data pages(page type = 1), and use the following command:

DBCC TRACEON(3604);
DBCC PAGE (MyDB, 1, 17386, 3);

Then in the dumped content(page header) of step (3), the m_objId (AllocUnitId.idObj) field should equal to the object ID obtained in step (1). Is that correct?

And whether that works for both user tables and system base tables, such as ‘sys.syscolpars’ base table?

Based on my test, the above two conclusion are both correct.

2. What is the meaning of Metadata: ObjectId? In article http://www.sqlskills.com/blogs/paul/...omy-of-a-page/, the ‘metadata: objectId’ <> ‘m_objId’. But from my own tests, the ‘metadata: objectId’ always equals to ‘m_objId’. Why? The original article does not explain the metadata clearly.

I am using SQL Server 2005, 2008, 2008R2, 2012 and 2014

Thanks

stored procedure executing for infinite time. Need to kill it.

$
0
0
DELIMITER $$

CREATE DEFINER=`root`@`localhost` PROCEDURE `calculateGraceMarkTwo`()
BEGIN
-- declare VARIABLES as per the below CURSOR
DECLARE v_StuID int(11) DEFAULT 0;
DECLARE v_StuFname VARCHAR (255) DEFAULT "";
DECLARE v_StuLname VARCHAR (255) DEFAULT "";
DECLARE v_StuCID int(11) DEFAULT 0;
DECLARE v_StuMrk int(11) DEFAULT 0;
-- declaration for not found handler
DECLARE v_finished INTEGER DEFAULT 0;
-- declare one variable to capture the full mark and passmark of the SUBJECT
DECLARE v_CFullmark INTEGER DEFAULT 0;
DECLARE v_CPassmark INTEGER DEFAULT 0;
DECLARE v_Grace FLOAT DEFAULT 0.00;
-- declare variable to insert into final table student_mark
DECLARE SName VARCHAR(255) default "";
DECLARE CName VARCHAR(255) DEFAULT "";
DECLARE IMark FLOAT DEFAULT 0.00;
DECLARE TMark FLOAT DEFAULT 0.00;
DECLARE Result VARCHAR(10) default "";
DECLARE Remark VARCHAR(25) default "";

-- Declare Cursor for this
DECLARE student_cursor CURSOR FOR select s.Student_Id, s.Student_Fname, s.Student_Lname,s.Course_Id,s.Mark_Obtained,c.Full _Mark , c.Pass_Mark,c.Grace_Per,c.Course_Name
from student s ,course c
where s.Course_id = c.Course_id;
DECLARE CONTINUE HANDLER FOR NOT FOUND SET v_finished =1;

-- Open the CURSOR

OPEN student_cursor;

-- now start the LOOP

calculate_mark: LOOP

FETCH student_cursor INTO v_StuID,v_StuFname,v_StuLname,v_StuCID,v_StuMrk,v_ CFullmark,v_CPassmark,v_Grace,CName;

SET SName = CONCAT(v_StuFname ," ", v_StuLname);
-- SET CName = (select Course_Name FROM course where Course_Id = v_StuCID);
SET IMark = v_StuMrk+(v_CFullmark * (v_Grace/100));

IF IMark >= v_CPassmark THEN
SET Result = 'PASS';
SET Remark = 'Grace Applied';
INSERT INTO student_mark(Stu_Name, Course_Name,Mark_Secured,Result,Remarks) VALUES(SName, CName,IMark,Result,Remark);
ELSE
SET Result = 'FAIL';
SET Remark = 'Grace Applied';
INSERT INTO student_mark(Stu_Name, Course_Name,Mark_Secured,Result,Remarks) VALUES(SName, CName,IMark,Result,Remark);
END IF;

END LOOP ;

CLOSE student_cursor;
END

*****************
Basically it's calculating correctly for all the records. But loop is not terminating for the last record and running infinite times.

select * from student_mark

Records in student_mark table:

# Stu_Name, Course_Name, Mark_Secured, Result, Remarks
'Bhabesh Sahoo', 'Mathematics', '101', 'PASS', 'Grace Applied'
'Jitendra Sahoo', 'Physics', '72', 'PASS', 'Grace Applied'
'Romakanta Patro', 'Chemistry', '66', 'PASS', 'Grace Applied'
'Tarakanath Shimadri', 'Botany', '30', 'PASS', 'Grace Applied'
'Sudhansu Parida', 'Zoology', '97.5', 'PASS', 'Grace Applied'
'Amit Agarawal', 'Zoology', '12.5', 'FAIL', 'Grace Applied'
'Amit Agarawal', 'Zoology', '12.5', 'FAIL', 'Grace Applied'
'Amit Agarawal', 'Zoology', '12.5', 'FAIL', 'Grace Applied'
'Amit Agarawal', 'Zoology', '12.5', 'FAIL', 'Grace Applied'
'Amit Agarawal', 'Zoology', '12.5', 'FAIL', 'Grace Applied'
'Amit Agarawal', 'Zoology', '12.5', 'FAIL', 'Grace Applied'
'Amit Agarawal', 'Zoology', '12.5', 'FAIL', 'Grace Applied'
'Amit Agarawal', 'Zoology', '12.5', 'FAIL', 'Grace Applied'
'Amit Agarawal', 'Zoology', '12.5', 'FAIL', 'Grace Applied'

Please guide me where this is going wrong.

WHUK Launch Offer | Intel E5 Servers | FREE Wildcard SSL & SpamExperts

$
0
0
WHUK Intel® Xeon® E5-2600v3 Managed Dedicated Servers are industry leading server configuration built to deliver optimum performance to any website. Get Free Plesk Web Pro, Wildcard SSL, SpamExperts and Free Server Monitoring with any of the below servers.

WHUK Xeon E5-2600v3 Server features:

  • Enterprise Quality Server Hardware
  • SmarterBundle Pro
  • Proactive Server Monitoring
  • IPv6 Support
  • UK Data Centers


WHUK E5 Standard - FREE Wildcard Domain SSL, SpamExperts
CPU Model - 1 x Intel Xeon E5-2630v3 2.4GHz, 20MB CPU Cache
CPU Cores/Threads – 8 Cores / 16 Threads
RAM - 16GB ECC DDR4 (Max 256GB)
Hard Disk - 2 x 1 TB 7.2K SATA
Port Speed – 1 Gbit
Monthly Bandwidth – 15 TB
2 IPv4 Addresses
Hardware Firewall - Fortigate Firewall (Optional)
£ 179.99/pm ex-VAT | Order Now

WHUK E5 Professional - FREE Wildcard Domain SSL, SpamExperts
CPU Model - 2 x Intel Xeon E5-2620v3 2.4GHz, 30MB CPU Cache
CPU Cores/Threads – 12 Cores / 24 Threads
RAM - 32GB ECC DDR4 (Max 512GB)
Hard Disk - 4 x 1 TB 7.2K SATA
Port Speed – 1 Gbit
Monthly Bandwidth – 20 TB
2 IPv4 Addresses
Hardware Firewall - Fortigate Firewall (Optional)
£ 199.99/pm ex-VAT | Order Now

WHUK E5 Enterprise - FREE Wildcard Domain SSL, SpamExperts
CPU Model - 2 x Intel Xeon E5-2630v3 2.4GHz, 40MB CPU Cache
CPU Cores/Threads – 16 Cores / 32 Threads
RAM - 32GB ECC DDR4 (Max 512GB)
Hard Disk - 4 x 1 TB 7.2K SATA
Port Speed – 1 Gbit
Monthly Bandwidth – 30 TB
2 IPv4 Addresses
Hardware Firewall - Fortigate Firewall (Optional)
£ 249.99/pm ex-VAT | Order Now

For more details visit: https://www.webhosting.uk.com/dedicated-servers

All the above servers are also available with SDD option

We offer monthly, quarterly and annual billing options on all servers with 24 x 7 e-mail, live chat and phone support included as standard.

In case you have any questions, you can contact our sales department by initiating a chat or by dropping an email to sales @ webhosting.uk.com or call us on 0800 862 0890 / +44-191-303-8069.

.
Web hosting blog: How an Online Store Can Benefit From Dedicated Hosting


FREE SSL and SpamExperts Offer Terms and Conditions:



  • Each new E3-2600V3 Dedicated Server customer will be eligible to get a Domain SSL Wildcard Certificate free for a year.
  • One free SSL Certificate per Server only.
  • Each new E3-2600V3 Dedicated Server order gets SpamExperts Spam Filter free.
  • Free SpamExperts license is for two domains and includes incoming and outgoing mail filter.
  • The standard prices will be charged at the time of renewal.



About WHUK:
Established in the year 2001, Webhosting.UK.Com (WHUK) Limited offers a wide array of value for money web hosting services including Linux/Windows Shared Hosting, Reseller Hosting, Cloud Hosting, Virtual Private Servers (VPS), Dedicated Servers, SSL and Offsite Backup Solutions. 24x7x365 technical support is available and 99.95% uptime guarantee is offered as standard features with UK-based servers.

Clearing an Unbound Combo box with Add New Record Button

$
0
0
The title of this thread sounds like a simple problem, but I have been working on this for hours and cannot figure it out.

I currently have a form with two unbound combo boxes that have a rowsource referencing a query. Once a selection has been made in the first combo box, it filters the results of the second unbound combobox.

In addition, I also have a few bound text boxes that store user input and an add new record button. The issue I am having is clearing the comboboxes after the user hits add new record. The bound textboxes clear immediately and store information properly, but for some reason I cannot get the comboboxes to clear.

Thus far, I can get it to work by using combobox="" if I make a new command button, but I would like to have the add new record button submit the record and then clear the boxes.

It seems I can get it to work using the combobox="" if I do it as the FIRST line in the private sub for the add new record button, but then it clears the data before storing the information.... which, obvioiusly, is not what I want.

If I add it beneath the rest of the code I have, then it doesn't clear. Am I missing something here? my code for the add new record button is below. Any help would be appreciated.

Private Sub SubmitStatus_click()
On Error GoTo Err_SubmitStatus_Click

[User] = fOSUserName()

DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70
DoCmd.GoToRecord , , acNewRec

Exit_SubmitStatus_Click:
Exit Sub

Err_SubmitStatus_Click:
MsgBox Err.Description
Resume Exit_SubmitStatus_Click

DoCmd.RunSQL "INSERT INTO DailyStatusBackend (MasterProjectID)" & "Values(&me.combo14.column(6)&)"
CurrentDb.Execute strSQL, dbFailOnError


'this is where I have been adding the combobox="" and it doesn't work. Neither does me.combobox.value=null, me.combobox="", etc.

End Sub

Thank you again.

IBM xlc compiler for db2 systemcall

$
0
0
In order to call shell scripts from DB2 I need to be able to do system calls as describe here
http://www.ibm.com/developerworks/da...303stolze.html

They describe how to compile the os_calls with ibm xlc
The problem is that I cant find xlc compiler for linux rhel . They do provide xlc for linux on power but other architectures doesnt support this (RHEL for example).

this is the base problem

[db2fenc1@mlozdb3 ~]$ db2 "call systemCall ('/home/db2fenc1/test.sh', null)"
SQL1646N A routine failed because the fenced user ID cannot access required
files in the sqllib directory or other instance or database directories.

Don't have the javavm/install/* folder in my Oracle instalation (Oracle 11g2)

$
0
0
Hello, I would like to set up my Oracle Database for a bonita bpm access, so I followed these steps:
http://documentation.bonitasoft.com/...onfiguration-1

Now, I'm at the last step --> Specific database configuration and I have to check if all these packages exist and are valid:

Comp_name Version Status
Oracle Database Catalog Views 11.2.0.1.0 VALID
Oracle Database Packages and Types 11.2.0.1.0 VALID
JServer JAVA Virtual Machine 11.2.0.1.0 VALID
Oracle XDK 11.2.0.1.0 VALID
Oracle Database Java Packages 11.2.0.1.0 VALID
But the thing is, I only have the first 2 components, the other are missing.

To install the other components, Internet says I have to run the initjvm.sql in the ORACLE_HOME/javavm/install/ directory.
If I do this, I get this:
SQL> @?/javavm/install/rmjvm.sql
SP2-0310: unable to open file "/u01/app/oracle/product/11.2.0/xe/javavm/install/rmjvm.sql"
Because I don't have the javam directory and yeah, I did not found a solution for this yet after hours of searching.
(maybe because I don't exactly know what I have to search for, because I'm new to Oracle and stuff. Can't find a downloadable initjvm.sql script)

I Installed Oracle 11g with this tutorial:
http://blog.whitehorses.nl/2014/03/1...ubuntu-64-bit/
and it works fine.

I use Ubuntu 14.04, my Java Version is:
java -version
java version "1.8.0_65"
Java(TM) SE Runtime Environment (build 1.8.0_65-b17)
Java HotSpot(TM) 64-Bit Server VM (build 25.65-b01, mixed mode)

My pathvariables are set like this (if the information is needed):
export JAVA_HOME=/usr/lib/jvm/java-7-oracle
export PATH=$JAVA_HOME/bin:$PATH
export ORACLE_HOME=/u01/app/oracle/product/11.2.0/xe
export ORACLE_SID=XE
(the root folders)

Did I missed something?

Farfetch is looking for a Senior BI Developer to join the Business Intelligence Team

$
0
0
Responsibilities:

Taking a key role in the planning and design of Data Warehouse and OLAP solutions in accordance with best practice and the reference architecture;
Working with the team to set and maintain standards and development practices;
Working with the Product Owner and the team to understand the requirements needed of the data stored in the DW and how to best make it available;
Being a keen advocate of quality and continuous improvement;
Making sure that the data is available to allow BI projects to align with the business strategy.


Key skills and experience:

Solid previous Data Warehousing experience in a fast paced environment, using the Microsoft SQL Server 2012/2014 BI stack, from architecture, design, development, testing through to deployment – mandatory;
Expert SSIS developer: lookups, loops, caches, events and parametrization;
Advanced proficiency in SSAS and experience in optimizing SSAS for large data volumes;
Database partitioning and data compression;
Experience in working with a source control tool, like TFS;
Excellent communication skills;
Good English, both written and spoken;
Commitment to provide a high level of customer service to internal users;
Good analytical and problem solving skills;
Ability to work in a fast moving operational environment;
Strong attention to detail;
Enthusiastic and positive attitude;
Passion for solving problems and the ability to translate your problems into delivery;
Knowledge of Tableau and Power BI is a plus;
Knowledge of Hadoop, Hive, Mongo DB or similar is preferred.

Apply: https://express.candarine.com/campai...d/ab8d6f8a2395

Autonumber in word 2007

$
0
0
I have a question, I have a form that users fill out on a daily basis is there a way to assign an automatic 5 digit number for every form? so if a user prints a form the Rework # 1790 number would show 1791..and the next user when he prints he sees 1792 is that possible through a macro or something??

DB2 BLOB field and ODBC

$
0
0
Is there any DB2 ODBC DSN parameter that will allow DB2 BLOB fields to be seen as RichText? Currently, I am running DB2 9.7 FP9, but soon to go to DB2 10.5 (not sure which FP). The issue is that, for example, is this:

I create an ODBC DSN to my DB2 DB.
Within MS Access, I link to tables.
BLOB fields are automatically interpreted as Short Text (maximum 255 characters).

This precludes reading the full content of the field.

I know several things:

1. It is something in the ODBC driver. Access has a Long Text format that would work for this. But when I connect to the BLOB field via ODBC, the ODBC driver presents it to Access as Short Text.
2. The BLOB field is in RichText format within DB2. That is, I can create a new table & field within Access, then directly in DB2, run a query to retrieve the raw RTF content of a BLOB field in a record. When I copy and paste that into my Long Text field in Access and then display it on a form--it correctly appears formatted, with correct font styles and sizes & colors.

But I cannot see any of the many ODBC parameters that can be configured within the DSN to tell ODBC to interpret BLOB fields correctly as Long Text (used to be called Memo), or RTF fields.

FRM-40735 Error in Oracle Forms 11gr2

$
0
0
Hi All,

I have this problem: When opening a form on Fusion Middleware 11g, I get the error: FRM-40735: Pre-form trigger raised unhandled exception ORA-06508.
Please help me resolve this problem.
I have included in the forms_path all the PLLs which I have recompiled before using, but still, the error persists..

Thanks in advance for all your suggestions and/or resolutions.

Mike
Viewing all 13329 articles
Browse latest View live