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

Simple Macro - OutputTo - Output file

$
0
0
Is it possible in a simple Macro to have a variable field (such as current date) in the output file name?

I am creating a RTF file from an open report using the OutputTo action. Currently in the Output File field I have:

C:\Apps - Auto.rtf

Is it possible to add the current date in that name somewhere, so each week I run the macro the current date will display in the output file name?

Thanks.

How to convert minutes into hours in report

$
0
0
Hey there all,

I have a tracking database I have been working on. What I am trying to do is have the totals =. Ex. 1.25 + 3.50 would give Grand total of 4.15 not 4.75. Thew table has a field called time spent which stores the time. I have attached an example database.
Thanks for any help and your time.

Attached Files
File Type: zip Sample.zip (45.2 KB)

SQL String Functions (removing from string)

$
0
0
Hello,

I have a MySQL database field 'product' which has several products listed as well as additional appended information concerning the product. The contents of the database field look similar to the following:

1M96-3P - MR + Disc:$10
1018 - MR + Disc:$10
1M99-3P - MR + Disc:$10
1M02-SS - SF + Disc:$15
6504 - SR + Disc:$15
23M9 - bulk + Apron
23M9 - bulk + Apron
20M1 - bag + Cruise
Smartchoice 5G Smartbox-50#
Smartchoice 5G Smartbox-50#
Smartchoice 5G Smartbox-50#
RoundUp Power Max - Bulk + Disc:$1


What I would like to do is write a SQL UPDATE statement that takes the product field and deletes '+ Disc:' and everything to the right of the '+ Disc:' portion of the product name.

I have been looking at and playing with SQL String Functions but I can't seem to find anything that works specifically how I am trying to do it.

Thank you for your assistance

Button in Form to open a different form and chose a customer based on last form

$
0
0
Sorry Duplicate Thread, Please Delete

Button in Form to open a different form and chose a customer based on last form

$
0
0
Hello Guys, Access 2010 issue, for a Catering Database.

Basically I have a Customer Form, which I have a New party button on it,
this button opens up the party form to a new party, what I would like it to do is open up a new party but make the new party for the customer I had selected in the previous form.

I have tried the GoTo macro's but cannot seem to get it to work, A little guidance and/or help on this would be greatly appreciated.

I am thinking on clicking the button it will need to get the Customer ID, and then open the party form, create new party, and paste in the Customer ID, which then updates the Name - Date - Address - Company Fields.

How would I go about getting this to work?

I have tried this. On the Customer Form Button,

Code:

DoCmd.OpenForm "New Party List", acNormal, "", "", , acNormal
    On Error Resume Next
    DoCmd.GoToRecord , "", acNewRec
    If (MacroError <> 0) Then
        Beep
        MsgBox MacroError.Description, vbOKOnly, ""
    End If

And this as the New Party List Form OnLoad

Code:

Me.[Name of Customer] = Forms("Customers")("Customer Name")
I get this error.

The Value you entered isn't valid for this field

deploy mde

$
0
0
All, I am working on an access 2003 db using access 2010. I created a mde for using 2010? This deployed to users having 2003-2010. Will the users have problems? The users for 2003 and 2007 cannot open the database. What can I do to make this happen. thanks

V10 New feature! VOW!!

$
0
0
Yesterday I got a reply for one my requests from BD. They are going to increase the number of forms from 64 to 256.This is a great new feature for who wish to develop complicated programs!

exclude sunday's and time should start from 8.00Am to 6.00PM in mysql query

$
0
0
I have query problem for the below point, So can some help us on this, as we are trying this one for the past 2 weeks.

exclude sunday's and time should start from 8.00Am to 6.00PM in mysql query

And The query we have is

SELECT B.ProblemID, A.problemID,A.EnclID as A_ENCLID,
B.EnclID as B_EnclID, B.EnclSubmittedTime,
(SPLIT_STR(B.enclname,"_", 1)),
B.EnclComment,B.EnclSubmittedTime,
COALESCE((TIMEDIFF(A.EnclSubmittedTime, B.EnclSubmittedTime))) AS Time_DIFF
FROM TABLE B
LEFT JOIN TABLE A ON B.EnclID < A.EnclID
AND A.problemID = B.ProblemID
and A.enclname not like 'Enclosure%'
where B.enclname not like 'Enclosure%'
and A.EnclSubmittedTime not in (
Give_Me_Dates_Days(1, B.EnclSubmittedTime, A.EnclSubmittedTime)
)
Group by B.ProblemID, B.EnclID
order by B.ProblemID ASC

If any quries, please reply to this, we will response you.

Thanks In Advance.

DB2 SQL Error: SQLCODE=-30090, SQLSTATE=25000, SQLERRMC=22

$
0
0
Hi,
I am getting below error on DB2 9.7 while same is working fine on DB2 9.5.

We are trying to insert into Federated table.

DB2 SQL Error: SQLCODE=-30090, SQLSTATE=25000, SQLERRMC=22

Please help to resolve it.

Regards,

Free Valentina Studio; Valentina Studio Pro

$
0
0


Free Valentina Studio is a db management tool for Linux, Windows and Mac OS X. Mac OS X users can grab it off of the Mac App Store. Valentina Studio was previously sold for $99.

Valentina Studio Pro also adds a powerful Report Designer, SQLDIFF, Reverse/Forward Engineering with database diagramming (Reverse supported in Free Valentina Studio).

Valentina Studio works with many popular databases. As of 5.1, it supports MySQL / MariaDB, Postgre, SQLite and Valentina DB.

The Report Designer lets you run reports within Valentina Studio Pro, or generate report templates for use with Valentina Server (a free version of Valentina Server is available).

If agreeable to the admins, Ill post updates to the same thread as they come out.

Validation rule

$
0
0
Field shouldn't get sign like "| \ / : * ? " < > "
e.g. John/

I try to write many event combination like:
not ("?","<",">",":","*","/","\","|")
<> "?" Or "<" Or ">" Or ":" or "*" Or "/" Or "\" Or "|"
but it doesn't work :/

Please help me guys!

Ready to enjoy the shows and movies

Syntex that still requires last weeks data

$
0
0
Hello

I have a piece of syntex which has been working perfectly, up until the new financial year (Today)

My SQL is:

decode(to_char(sysdate, 'Q'),
'1', trunc(add_months(sysdate, -9), 'Q'),
add_months(trunc(sysdate, 'YYYY'), 3))
AND next_day(sysdate,'SUNDAY')-7


This has been picking up the last financial year up until the last Sunday. However when i ran this data today 02/04/2013 our new financial year started on 01/04/2013 and now I get an error message:

Error: ORA-00920: invalid relational operator
(State:S1000, Native Code: 398)

As last Sunday was 31/03/2013 what I had hoped to show was a full year of data, but am returning 0 values

Could anyone help me rewrite the correct syntex so that I capture the entire financial year? and inaddition I need to know whether my above syntex will work when i run it next week and will pick up just April 2013 data?

01/04/2012 - 31/03/2013

Thanks
Helen

select data for all days of previous month

$
0
0
Hi guys

Was wondering the best way to specify to select data from a table for all the days of the previous month?

Regards
Shajju

tempdb table in Stored procedure

$
0
0
We have a stored procedure which has following code

create procedure test_proc
as

if exists (select 1 from tempdb..sysobjects where type='U' and name='test_data')
begin
insert into tempdb..test_data values (getdate())
end
....
.....



Tempdb table was obviously created prior to creating proc. As long as tempdb table exists the code works fine. Expectation is that if tempdb table does not exist then the above insert code should not execute. Server was recycled so temp table is gone and sp throws error on insert - why is th at? Without recycling server only if tempdb table was dropped insert stmt is not executed. what is difference in 2 cases.

How to delete LEFT OUTER JOIN ... WHERE is NULL

$
0
0
I have two tables that share the key mdr_report_key. I now want to delete all rows from one of the tables that don't have a common mdr_report_key in the other table.

That is, I want to do the opposite of an INNER JOIN: rather than select the joined rows, I want to delete the rows that can't be joined. I can select the rows using this SQL

Quote:

select n.narrative_id, m.text
from narrative_report as n
left outer join
medwatch_report as m
on m.mdr_report_key=n.mdr_report_key
where m.text is NULL
but how do I write the DELETE from narrative_report, using the "LEFT OUTER JOIN ...where m.text is NULL" syntax? I keep getting syntax errors.

Microsoft email notification for a stability program

$
0
0
Is it possible to build a microsoft access database where products are entered for a stability program that need to be tested at a certain frequency (ie every 6 months after initial entry for example). Can you program a query in that microsoft access database such that an email notification is sent just prior to the next test date is due so we can test the product in question in time. Can it be done, if yes can you show me how or refer me to books or sites that can help? thank you very much. chessman

need help in constructing script

$
0
0
hi guys,
i need some suggestions/ideas in constructing a script for insert statement with below sample.

col1
101201
101202
101203
101204
101205

col2
al
al
al
al
al

col3
pl
pl
pl
pl
pl

i need to create an insert script where first four numbers(1012) in col1 is constant and the last two numbers are incrementing. your suggestions might help. thanks

Error: Server closed the connection unexpectedly

$
0
0
When i connect to the server on PostgreSQL i get this error:

Server closed the connection unexpectedly.
This probably means the server termitate abnormally before or
while processing the request
If someone could help me i would appreciate it. Thank you :)

Grant select on schema

$
0
0
Is there a possibility to grant multiple users "select, insert, update" on a specific schema, without worrying about the number of tables inside?

I've tried

GRANT SELECT, INSERT, UPDATE
ON SCHEMA <schema-name>
TO USER <user-name1>, USER <user-name2>

Thanks
Viewing all 13329 articles
Browse latest View live