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

last day of the next month

$
0
0
Anyone an idea how to get the last day of the month in timestamp format


so running the query in May 2015 should return 2015-06-30-23.59.59.999999
while running the query in June 2015 should return 2015-07-31-23.59.59.999999
etc .....

Thanks

Powerful USA Based Semi-Managed Dedicated Server - Dual Core ATOM - 10TB BW - 2GB RAM

$
0
0
GroomHost.com - Provides Perfect Money Hosting & Webmoney Shared, Reseller, VPS, Dedicated web hosting and SSL


GroomHost Web Hosting – Providing you the quality service and support. Our plans are competitive and well priced. We have 24/7 support. Also, there's our money back guarantee.



Account Features

• FREE instant Setup
• Instant Account Activation
• 24/7 Technical Support
• 30 Days Money Back Guarantee
• LiteSpeed Web Server
• CloudLinux Maximum Performance & Reliability
• Latest cPanel with Softaculous
• Latest PHP 5.2x,5.3x Perl, CGI & MySQL
• RVSiteBuilder Pro
• FREE Website Migrations
• And much more!




We Accept:

• Payza(AlertPay)
• Web Money
• Perfect Money
• Money Gram
• Western Union
• Skrill(Moneybookers)
• Bitcoin.
• 2CO(Paypal & Credit Card )
• PayPal




Dedicated Server Packages


==================================================
Starter: $200/Month
==================================================

Dual Core
RAM 2048 MB
Bandwidth 10 X 1000 GB
Hard Disk 250 GB
Dedicated IPs 1
Server Location United States
Best for starter teams

ORDER NOW




==================================================
Plus+: $500/Month
==================================================

Intel Core i7
RAM 16 GB RAM
Bandwidth 10 X 1000 GB
Hard Disk 2 X 1 TB
Dedicated IPs 1
Server Location United States
Best for Business

ORDER NOW



==================================================
Enterprise: $300/Month
==================================================


Quad Core
RAM 4096 MB
Bandwidth 10 X 1000 GB
Hard Disk 1 TB
Dedicated IPs 1
Server Location United States
Best for Enterprise

ORDER NOW




30 Days Money Back Guarantee
If we fail to satisfy you we believe it's our fault you can get refund with in 30 days without any question.

99% Uptime Guarantee
We work hard to maintain servers uptime but there are many unpredictable threats such as DDoS attacks, hardware issues, natural disasters that can effect our datacenter, so we guarantee 99% uptime.

24/7 Support
We have a team of support staff waiting to deal with support tickets. If you ever feel you need a little extra help feel free to send us a support ticket. We can guarantee a quick resolution to any problems you encounter.

Migration From Another Host
No worries! We've got you covered. After signup just fill out our transfer form and we'll transfer over your existing cPanel account from your current host with all data intact and no website downtime usually within a few hours.


For any query email us: support[at]GroomHost.com
Like us on Facebook fb.com/GroomHost
Follow us on Twitter@GroomHost

Apologies but I am desperately looking for a PostgreSQL DBA for a contract role

$
0
0
Hi everyone

Again I apologise if this isn't the right place to place my query but I was wondering if anyone could help...

I am looking for a PostgreSQL DBA for a short-term contract in Hampshire (potential to extend), they do require you to be on site full-time, daily rate isn't an issue with this particular role

Also, any experience of JBOSS would be really helpful too

To give you an idea of how urgent this role is, they had a contractor doing the role who has now left for a new contract offering more money so they are completely stuck and have a gap in their programme, they did offer the position to my candidate but he didn't accept due to being offered something closer to home so now they are really panicking because they can't find anyone to do the role

It's a fantastic client and from what I've been told about the programme it looks like a lot of work which could potentially run for a role long

If anyone is interested please send your CV to c.hynes @ parity.net, if not any help or advice would be much appreciated. Are there any other forums you guys connect on at all?

Thanks in advance,

Claire Hynes
44 (0)208 171 1714

MQT access & Dimensional Filtering

$
0
0
I have this fact table:

DAY_ID
LOCATION_ID
PRODUCT_ID
MEASURE 1
MEASURE 2

and 3 linked Dimension Table:

CALENDAR_DIM(DAY_ID)
LOCATION_DIM(LOCATION_ID)
PRODUCT_DIM(PRODUCT_ID)
I built an MQT on fact table as following:

CREATE SUMMARY TABLE FACT_AGGREGATE AS (
SELECT CAL.YEAR,CAL.MONTH,F.LOCATION_ID,F.PRODUCT_ID,SUM( F.MEASURE1),SUM(F.MEASURE2)
FROM CALENDAR CAL,FACT_TABLE F
WHERE CAL.DAY_ID = F.DAY_ID
GROUP BY CAL.YEAR,CAL.MONTH,F.LOCATION_ID,PRODUCT_ID)

For example, using this query:

SELECT CAL.YEAR,CAL.MONTH,LOC.SECTOR,PRD.FAMILY,SUM(MEASU RE1)
FROM CALENDAR_DIM CAL ,LOCATION_DIM LOC,PRODUCT_DIM PRD
WHERE CAL.DAY_ID = F.DAY_ID AND
LOC.LOCATION_ID = F.LOCATION_ID AND
PRD.PRODUCT_ID = F.PRODUCT_ID
GROUP BY CAL.YEAR,CAL.MONTH,LOC.SECTOR,PRD.FAMILY

the DB2 optimizer points to materialized table, instead using this one:

SELECT CAL.YEAR,CAL.MONTH,LOC.SECTOR,PRD.FAMILY,SUM(MEASU RE1)
FROM CALENDAR_DIM CAL ,LOCATION_DIM LOC,PRODUCT_DIM PRD
WHERE CAL.DAY_ID = F.DAY_ID AND
LOC.LOCATION_ID = F.LOCATION_ID AND
PRD.PRODUCT_ID = F.PRODUCT_ID and
CAL.YEAR = 2014
GROUP BY CAL.YEAR,CAL.MONTH,LOC.SECTOR,PRD.FAMILY

it doesn't use the materialized table. Why the filter affects in that way the query execution?

Can someone explain me this behaviour?

PS: My db2 version is 9.5

Thanks in advance

Emiliano

Inventory Balance in excel

$
0
0
Hello all,

I have a spreadsheet with inventory balances of many items in one column (D, 'Current (2015)'), and 3 other columns (E, F, G) dedicated to different field surveys that will all be using inventory from D. I would ideally like to have the value that is entered in any given survey column subtracted from the total inventory number in column D. I can't think of how to do this right in excel without creating a circular reference, and I am not versed in any language enough to write code.

I'd like to add an example of my spreadsheet but I can't seem to figure out how... ?:S

Any ideas would be greatly appreciated!
-Jeanette

NOT WORKING! Filter Datasheet Subform from a Mainform using an unbound Combo Box

$
0
0
Hi All,

I have searched the web for an answer and found some really close ones, but none that I could use for my form.

I have a datasheet subform (subfrmEE) that I would like to filter. I have an unbound combo box (cbo_EEProjNum) above the subform to use as the control for filtering.

I have the master/child links set. I added the SQL statement to the “After Update” event properties, but nothing is working. Frustrating. :mad:

<Begin Code>
Me.RecordSource = "SELECT * FROM EEtbl WHERE EEtbl.Project Number = " & cbo_EEProjNum
<End Code>

Need info for chargeable predicates

$
0
0
Hi All,

I need to know the concept of chargeable predicates? This was the question asked in the interview.

I googled it but did not get the answer properly.

Can anyone please explain or share the good links which explains the concept in detail.

Thanks in advance.

Run-Time Error '3134' HELP

$
0
0
Hi,

Im currently working on a project for a small database and need a bit of help with the following code, if anyone could point me in the right direction as to why I'm gettin the 3134 error, it would be much appreciated.

Private Sub ButtonAddRecord_Click()
'add data to table
CurrentDb.Execute "INSERT INTO ModDatabase(ModID,Zone,ModificationName,Technician ,Date,SupervisorApproved,SupervisorName) " & _
" VALUES(" & Me.txtModID & ",'" & Me.ComboZone & "','" & Me.txtModName & "','" & Me.txtTech & "','" _
& Me.txtDate & "','" & Me.txtSupervisorApproved & "','" & Me.txtSupervisorName & "')"

'refresh data in list on form
ModDatabaseSubform.Form.Requery

Thanks!

TO_DATE with special Characters

$
0
0
Hi all,
I've to transform a Date String like '2015-04-30T12:03:20'.
Using SELECT TO_DATE('2015-04-30T12:03:20','YYYY-MM-DD,HH24:MI:SS') from dual does not work.
I think because the 'T' is a special character.
Any idea how to solve this problem?

Deleting duplicates from Access Database

$
0
0
Hello everyone,

I'm currently having some technical difficulties with my access database. Basically, i have a hundreds of duplicates that i need to delete/remove however i have no skills at all in SQL. Therefore, i was hoping to be able to handle the situation by using a query. I've tried using logic to conquer the duplicates by adding criteria to my fields which lowers the amount of duplicates but doesn't get rid off them.

Is there not a function that i can use enabling me to delete the older records and preserve the latest one ?

I'm open to using SQL but as mentioned i have no experience at all

Many thanks !

can we export all the tables from database which is having lobs and also non lobs

$
0
0
Hi

Can we export all the tables from database which is having lobs and also non lobs using single query, if it is possible can any post the query

Access my Database through a webpage

$
0
0
How hard is this to accomplish?

I want to basically access my Access Database anywhere by putting in a http website, so I am able to add and change the data anywhere i have internet access. I am currently writing down bookings on a piece of paper and having to add them when i get to the work computer. I would like to just type in the website address and input the data on the fly. Can it be done?

My current experience with Microsoft Access is currently limited but I have studied I.T my whole life and pick things up pretty quickly.

I already have a webhosting if this helps the situation.

Thank you for your time!

Steve

Linking text file with todays date in file name

$
0
0
Hey -

Needing some assistance. I have a text file that is dropped into a folder on a daily basis; each day the text file has todays date in the name, example: CCP2_Urgent_Inquiry_CMS_Rpt05_06_2015.txt. I have a macro with a query that runs daily and utilizes this file, which I have linked into my db. The way I currently do this is by moving the file into my C:/temp folder and removing the date portion of the name and having the text file linked into the db, example: CCP2_Urgent_Inquiry_CMS_Rpt.
I have to manually move the file to the temp folder and manually remove the date each morning. What I'm hoping is possible is that I can avoid the moving of the file and the removal of the date; I would like to be able to automatically Link or Import this file daily as is with the date included.

Another option I was thinking about is possibly some automated task that goes out to this folder with the daily drop and moves the CCP2... file with the date to the temp folder and removes the date automatically. Just thinking out loud though.

I'm pretty good with Ms Access and SQL coding but have limited knowledge of VBA which I'm guessing this is going to involve. I would appreciate any assistance in this matter.

Thanks,
Dylan

Corrupt vfp 8.0 dbf file

$
0
0
We have a visual basic 6.0 program that updates a foxpro table through odbc. We have a timer program that starts up every minute to print reports from an action.dbf. Whenever we run a procedure in our program we are opening the tables that we use and then close them. I don't know what happens but sometimes I get an error message whenever we try to open the dbf that the VB program updated. The message is *.dbf has been corrupted. The table will need to be repaired before using again. We have a repair program that we use to fix the dbf file and the repair message says File EOF mark adjusted! (VFP8+). The only thing the VB program is doing is setting a logical field to either true or false. I can't figure out what vb would be doing to cause this problem. Ant help would be appreciated.

Thanks!

How to view content damaged ms sql server database?

$
0
0
Hi guys

I got a huge problem. One of my employes deleted a MSSQL Database instead of detach. Now i tried to recover the .mdf and .ldf file but when i trie to attach it it says. "File is not a primary database file"

Anybody got an Idea how to fix this? It's very urgent.

I need your help!

$
0
0
Hello BD users,

I am trying to write a script and I am having problem and wondering if anyone can provide advise on how to accomplish the following tasks:

1. I would like to find duplicate records within the same folder (folder name = Contacts) based on the following fields:

First name, last name, address and email address see example below:

ID, First name, last name, address, city, email


Record # 1 - 123, John, Smith, 100 any street name, any city, johns@johnsmith.com
Record # 2 - 234, John, Smith, 100 any street name, any city, johns@johnsmith.com
Record # 3 - 567, John, Smith, 100 any street name, any city, johns@johnsmith.com
Record # 4 - 234, John, Smith, 200 any street name, any city, johns@johnsmith.com

Based on the above criteria, identify John Smith as a duplicate record & replace his ID numbers as shown below:


Record# 1 - 123, John, Smith, 100 any street name, any city, johns@johnsmith.com
Record# 1 - 123, John, Smith, 100 any street name, any city, johns@johnsmith.com
Record# 1 - 123, John, Smith, 100 any street name, any city, johns@johnsmith.com

2. Now move the duplicate records to another folder (folder name=duplicate records). The end result should as follows:

Record # 2 - 234, John, Smith, 100 any street name, any city, johns@johnsmith.com
Record # 3 - 567, John, Smith, 100 any street name, any city, johns@johnsmith.com

Thank you in advance for helping on this task.

"Microsoft does not recognize as valid field or expression".

$
0
0
I am using this big crosstab query and trying to build a report based on it but when I run the report it gives me error "Microsoft does not recognize as valid field or expression". I have stated in the crosstab query the parameters of start date and end date. Query works absolutely fine. Its only the report which gives me this error. One thing which I noticed while making another crosstab is that when some of the fields doesn't have value report gives me this error.


Code:

PARAMETERS [Forms]![frmSummaryofOpenIssue]![startDate] DateTime, [Forms]![frmSummaryofOpenIssue]![ENDDate] DateTime;
 TRANSFORM Count([Ucondition].TagID) AS CountOfTagID
 SELECT ManagerReport.Center, ManagerReport.Department, ManagerReport.ClosedIssuesByCenter.[CountOFAudit], ManagerReport.OpenIssueByCenter.[CountOfAudit], ManagerReport.CountOfHighPriority, ManagerReport.CountOfMediumPriority, ManagerReport.CountOfLowPriority
 FROM ManagerReport INNER JOIN [UCondition] ON (ManagerReport.Center = [UCondition].Center) AND (ManagerReport.Department = [UCondition].Department)
 WHERE ((([UCondition].Date) Between [Forms]![frmSummaryofOpenIssue]![startDate] And [Forms]![frmSummaryofOpenIssue]![EndDate]))
 GROUP BY ManagerReport.Center, ManagerReport.Department, ManagerReport.ClosedIssuesByCenter.[CountOfAudit], ManagerReport.OpenIssueByCenter.[CountOfAudit], ManagerReport.CountOfHighPriority, ManagerReport.CountOfMediumPriority, ManagerReport.CountOfLowPriority
 PIVOT IIf(DateDiff("d",[TargetDate],Date())<0,"On Target",IIf(DateDiff("d",[TargetDate],Date())<8,"7 Days Past Due",IIf(DateDiff("d",[TargetDate],Date())<22,"21 Days Past Due",IIf(DateDiff("d",[TargetDate],Date())>30,"30+ Days Past Due","On Target"))));

RoboCopy Issue

$
0
0
Hey -

Not sure if this is where this question should go or not, but going to give it a shot.

So the issue I'm having is I have a text file that is dropped into a folder on a daily basis; each day the text file has todays date in the name, example: CCP2_Urgent_Inquiry_CMS_Rpt05_06_2015.txt. I have a macro within ms access that that runs daily and utilizes this file, which I have linked into my db. The way I currently do this is by moving the file into my C:/temp folder and removing the date portion of the name and having the text file linked into the db, example: CCP2_Urgent_Inquiry_CMS_Rpt.
I was previously having to manually move the file to the temp folder but recently learned of robocopy and now have an task scheduled to auto pull this file into the C/:temp folder for me. However, my issue now is that I have to manually remove the date each morning in order to run the macro as the linked table within ms access will only recognize a linked file with the exact name as the link; same goes for importing a file.
What I'm hoping someone can assist with is advising me on how to either A: create a scheduled task to change the file name within the temp folder to auto-drop the date portion of the file each morning or B: someone to advise me on how I can link or import a file each day that has a different date.

I posted this similar question in the MS Access forum and received a few responses with links to sites but after reading through those I dont believe they will work either.
I've done a good amount of google searching and believe the above A can be done though the xcopy command but I am not exactly savvy with xcopy as I honestly just found out it existed.

I would appreciate any assistance in this matter.

Thanks
Dylan

Static Varibles

$
0
0
Here is a question. At the start of the database I would like to load some static varibles. Seems to work but
when I check the database status it says it cannot find them. Is there a way to prevent this? Although they appear
holding the data I put in them.

VBA Delete Duplicates for 2 tables

$
0
0
Hello everyone,

I'm looking for your help because my database is swimming with duplicates and i haven't been able to dispose of them by using alternative methods such as using Criteria in Queries. So i have been obliged to use VBA which i have never used before.

I want to delete duplicates from 2 tables:
- 011- Extraction FA ENSEMBLE
- 010- ENSEMBLE before table

All my tables are bound by a Key which is called "Key". However this key is not enough in order to precisely deal with the duplicates. So in order to deal with them i suppose I have to create a subquery using the following field "MaxDeN°BL" (field which indicates the Package number of the last sent item).However, the records containing empty fields musn't be deleted !!

I gave it a shot with only one table with the following however it is my first time at trying VBA so it didn't work

DELETE FROM 011- Extraction FA ENSEMBLE
WHERE Key <> (SELECT Min (Key) AS MinOfKey FROM 011- Extraction FA ENSEMBLE AS Dupe
WHERE (Dupe.Key = 011- Extraction FA ENSEMBLE.Key)
AND (Dupe.MaxDeN°BL = 011- Extraction FA ENSEMBLE.MaxDeN°BL));

Any help will be deeply appreciated !
Viewing all 13329 articles
Browse latest View live