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

Splitting one row into mutiple rows

$
0
0
Hi,

I think this should be relatively simple, but i can't for the life of my figure out how to do this.

I've got 4 Columns

Symbol , Price , Vol , Date
Z , 10 , 1 , 1/1/2015
Y , 5 , 3 , 1/1/2015
X , 7 , 2 , 1/1/2016

I just want to split the rows based on the vol column to get

Symbol Price Vol Date
Z , 10 , 1 , 1/1/2015
Y , 5 , 1 , 1/1/2015
Y , 5 , 1 , 1/1/2015
Y , 5 , 1 , 1/1/2015
X , 7 , 1 , 1/1/2016
X 7 1 1/1/2016


I'm thinking I should use an outer join of sorts on one side but i can't remember how to repeat rows.

Any ideas?

Thanks.

Dedicated Server - IPs - Root Access - 250GB HDD - 8GB RAM - 100MBs Uplink - GroomHos

$
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.
• PayPal
• PAYEER
• BTC-E




Dedicated Server Packages


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

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

ORDER NOW




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

Intel Core i7
16GB 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
8GB RAM
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@GroomHost.com
Like us on Facebook fb.com/GroomHost
Follow us on Twitter @GroomHost

VBA Help to read the recordset of a form and create new record

$
0
0
Hi Basically I'm stuck, and need help please

I am using Access 2007, what I am trying to accomplish is this, when an engineer goes out to a service call, the user will fill in the details of the service call via a form, and set the call status from open to complete

If I add "Add New Record" button, to the form, this will indeed generate a new record for this customer/machine, but I have lost the detail to the original record set, for I need to calculate the next service date, from the completion date of the previous record

What I would like if possible!, When the status field is changed from open to complete, I need to read the current form details, create a new record and calculate the next service date e.g. 6 months in the future, and populate the next service date.

Cheers

Sample query for convert int to time for informix

$
0
0
I have a column in table data stored as int, i wanted to convert this value into time HH:MM:SS format.

Also is there any function to find Average time for a column datatype is varchar

0:04:28
0:05:36
0:02:49
0:03:02
0:02:15
0:03:23
0:04:19
0:01:42
0:00:00
0:02:32
0:04:01
0:05:11

Using Nested IIF Statement in Query to bring back only records that match

$
0
0
Please excuse me if this is a very basic question.

I am writing a query that will become an append query. The field on the form (used in the expression: [Forms]![frmSynMonthYear]![SyndicationMonth]) is the milestone end date that all the tasks (the query that will become an append query). Most tasks are repeated each month but some tasks are quarterly, semi-annual or annual. I wanted to use the values from the tblTaskFeed field "FrequencyID" to filter what is appended for each month. I.e. We will need monthly, quarterly, semi-annual and annual tasks in January; monthly in February, quarterly and monthly in April and so-on.

Here is the nested IIF statement I wrote. It brings back 0 records so obviously I did not write this correctly:

IIF((Month([Forms]![frmSynMonthYear]![SyndicationMonth])=1),(LIKE ([tblTaskFeed]![FrequencyID]=1) AND ([tblTaskFeed]![FrequencyID]=2) AND ([tblTaskFeed]![FrequencyID]=3) AND ([tblTaskFeed]![FrequencyID]=4)),IIF((Month([Forms]![frmSynMonthYear]![SyndicationMonth])=4),(LIKE ([tblTaskFeed]![FrequencyID]=1) AND ([tblTaskFeed]![FrequencyID]=2) AND ([tblTaskFeed]![FrequencyID]=5)),IIF((Month([Forms]![frmSynMonthYear]![SyndicationMonth])=7), (LIKE ([tblTaskFeed]![FrequencyID]=1) AND ([tblTaskFeed]![FrequencyID]=2) AND ([tblTaskFeed]![FrequencyID]=3)),IIF((Month([Forms]![frmSynMonthYear]![SyndicationMonth])=10), (LIKE ([tblTaskFeed]![FrequencyID]=1) AND ([tblTaskFeed]![FrequencyID]=2)),
(LIKE [tblTaskFeed]![FrequencyID]=1)))))

I tried to write it so that if it was a month not listed it would just bring back the monthly tasks only ([tblTaskFeed]![FrequencyID]=1). I added the "LIKE" after reading some suggestions online but it didn't seem to make a difference whether I included it or not.

I also saw suggestions to write a VBA function but I am not sure how to write one correctly or how to call it in the Build Expression box.

I also tried using the SWITCH function which also brought back 0 records.

FYI The [tblTaskFeed]![FrequencyID] field is joined with another table that lists as follows:
ID Frequency
1 Monthly
2 Quarterly
3 Semi-annual
4 Annual
5 Annual (April Only)

microsoft access 2003

$
0
0
hi all,
I have a lot .mdb files of MS Access 2003. I have never had problems before today. I got a message: This database is in an unrecognized format, I tried this error again at next opening, but it was ineffective. I opened my database via MS Access 2007 from another pc, but I got the same problem. I would be happy to find a method to recovery access database.

Cannot connect to pgbouncer through psql

$
0
0
I am trying to set up connectional pooling using pgbouncer 1.7.2 for PostgreSQL 9.6 on Windows 10.

Trying to connect to pgbouncer in the cmd

psql -p 6432 -h 127.0.0.1 postgres pgbouncer

gives the error:

psql: server closed the connection unexpectedly Server terminated abnormally before or while processing

The port 6432 is listening and looking in the pg_log there are no errors.

Here is my pgbouncer.ini config file:

[databases]

mydb = host=127.0.0.1 port=5432 dbname=mydb

[pgbouncer]

logfile = pgbouncer.log
pidfile = pgbouncer.pid

listen_addr = *
listen_port = 6432

auth_type = md5
auth_file = C:/Program Files/pgbouncer-1.7.2-win32/etc/pgbouncer/userlist.txt

admin_users = postgres, lisam

stats_users = stats, root


Where userlist.txt contains "postgres" "some_password"

In the pgbouncer guide it says:

"Since PostgreSQL 9.0, the text files are not used anymore. Thus the auth file needs to be generated. See ./etc/mkauth.py for sample script to generate auth file from pg_shadow table. PostgreSQL MD5-hidden password format: "md5" + md5(password + username)"

Does anyone know if this is the root of the connection problem and if so how to manually generate the auth file?

Any help would be much appreciated.

Thanks,

Lisa

CHEAP ASP.NET CORE 1.0.1 HOSTING ★ $1/mo ★ FREE MSSQL DB ★ FREE MIGRATE

$
0
0


:: CHEAP ASP.NET Core 1.0.1 HOSTING WITH ASPHOSTPORTAL.COM ::

Are you tired of endless downtimes? Long support response times? Poor speeds? You don't need to deal with these! You are paying your hard-earned money, why put up with sub-par services??!! Transfer over to ASPHostPortal Solutions and all these issue will go away.

With Min 1000 Mbps connection and our premium hardware, we will make sure your site never feel slow. When you make the switch to ASPHostPortal Solutions the transfer from your previous hosting provider is completely free of charge. We also give you everything you need and more to run your websites smoothly with a professional support team available 24/7 to assist you.

GET IT NOW !!!

=======================

With hundreds of web hosting companies out there, how can you decide which one is best for you?

Here are a few things that make ASPHostPortal differs from the rest.

>> We offer web hosting in 12 different locations. Washington, London, Paris, Frankfurt, Amsterdam, Melbourne, Toronto, Sao Paulo, Chennai, Milan, Hongkong and Singapore.
>> We have the fastest 1,000 Mbps connection backbone in all of our server, say goodbye to SLOW problems.
>> We will give you daily backup service, your data will be safe every time.
>> We offer Cheap Windows and Linux Dedicated Cloud Server Plans, for those who have outgrown shared hosting and want to manage their own server.
>> We have 24/7 support team to solve your issue. Every time we are ready for you.

Switching to us? We have a unique SLA promise if you unsatisfied with our service in first 30 days, we will give your money back.

=======================

:: OUR ASP.NET CORE Core 1.0.1 HOSTING PLAN FEATURES ::

Ready to switch your website for the very last time?

HOST INTRO - $1/month
1 GB Hard Drive Space
10 GB Bandwidth
One Domains
Perfect for: personal websites, small blogs

HOST ONE - $5/month
5 GB Hard Drive Space
60 GB Bandwidth
Unlimited Domains
Perfect for: personal websites, small blogs

HOST TWO - $9/month
15 GB Hard Drive Space
150 GB Bandwidth
Unlimited Domains
Perfect for: small business, forums, etc.

HOST THREE - $14/month
50 GB Hard Drive Space
500 GB Bandwidth
Unlimited Domains
Perfect for: busy blogs/forums/image sites

For Order please visit : http://asphostportal.com/ASPNET-Core-1-0-Hosting

=======================

:: ASPHOSTPORTAL SUPPORTED FEATURES ::

>> Support all version of ASP.NET Hosting
>> Support all version of ASP.NET MVC Hosting
>> Support WCF RIA, and all version of Silverlight 5 Hosting
>> Support all version of Visual Studio Hosting
>> Support FULL Trust Mode
>> Support all version of SQL Hosting
>> Support all version of Crystal Report Hosting
>> Support Visual Studio LightSwitch Hosting
>> Support Web Deploy and FTP
>> Support all version of SSRS Hosting
>> Other features such as Wordpress, Joomla, Umbraco, DotNetNuke, Orchard, Drupal, etc

=======================

:: ABOUT US ::

ASPHostPortal is a hosting company that best support in Windows and ASP.NET-based hosting. Services include shared hosting, reseller hosting, and SharePoint hosting, with specialty in ASP.NET, SQL Server, and architecting highly scalable solutions. As a leading small to mid-sized business web hosting provider, ASPHostPortal strive to offer the most technologically advanced hosting solutions available to all customers across the world. Security, reliability, and performance are at the core of hosting operations to ensure each site and/or application hosted is highly secured and performs at optimum level.

Scary Deals at WHUK this Halloween | 20% OFF on VPS and Cloud Servers

$
0
0
This Spooky Halloween season, WHUK is offering 20% discount on Fully Managed VPS and Cloud Hosting in the UK.

Webhosting UK Com Ltd. (WHUK), a renowned web hosting company in the UK since 2001, offers professional grade VPS and cloud hosting service over Dell hardware hosted in Tier IV datacenter facility.

With our latest promo on VPS and Cloud servers, our entire range of plans have evolved into more affordable and value for money proposition! Here's what you can avail through the latest promotion:

Use Halloween Discount Code for VPS : "HALLOWEEN20VPS" to avail 20% OFF*.

Use Halloween Discount Code for Cloud : "HALLOWEEN20CLOUD" to avail 20% OFF*.

* Use the code during signup before checkout button. The offer will be available ONLY for the First Invoice.

This is a limited time period offer and ends on Wednesday 2 November 2016, 11.59pm BST. So hurry before the offer ends.

Quote:

Initiate a live chat with one of our friendly sales advisor to avail exclusive benefits on these servers besides the discounts!
Here is the list of Linux VPS Servers:

VPS Basic @ £15.59 GBP Inc. VAT
  • 1 vCPU Core
  • 30 GB SSD Storage
  • 1 GB RAM
  • Full Root SSH Access
  • Free 24x7 Premium Support, Fully Managed
  • 99.95% Uptime Guarantee
Monthly Price: £15.59 GBP Inc. VAT | Order Now

VPS Starter @ £23.99 GBP Inc. VAT
  • 2 vCPU Core
  • 60 GB SSD Storage
  • 2 GB RAM
  • Full Root SSH Access
  • Free 24x7 Premium Support, Fully Managed
  • 99.95% Uptime Guarantee
Monthly Price: £23.99 GBP Inc. VAT | Order Now

VPS Business @ £32.39 GBP Inc. VAT
  • 3 vCPU Cores
  • 80 GB SSD Storage
  • 4 GB RAM
  • Free 24x7 Premium Support, Fully Managed
  • 99.95% Uptime Guarantee
Monthly Price: £32.39 GBP Inc. VAT | Order Now

VPS Enterprise @ £40.79 GBP Inc. VAT
  • 4 vCPU Cores
  • 120 GB SSD Storage
  • 6 GB RAM
  • Free 24x7 Premium Support, Fully Managed
  • 99.95% Uptime Guarantee
Monthly Price: £40.79 GBP Inc. VAT | Order Now

For full list of Linux VPS Hosting features, visit: https://www.webhosting.uk.com/vps-hosting.php

Here is the list of Windows VPS Servers:

Win. VPS Basic @ £19.19 GBP Inc. VAT
  • 2 vCPU Core
  • 30 GB SSD Storage
  • 2 GB RAM
  • Full Root SSH Access
  • Free 24x7 Premium Support, Fully Managed
  • 99.95% Uptime Guarantee
Monthly Price: £19.19 GBP Inc. VAT | Order Now

Win. VPS Starter @ £27.59 GBP Inc. VAT
  • 2 vCPU Core
  • 60 GB SSD Storage
  • 3 GB RAM
  • Full Root SSH Access
  • Free 24x7 Premium Support, Fully Managed
  • 99.95% Uptime Guarantee
Monthly Price: £27.59 GBP Inc. VAT | Order Now

Win. VPS Business @ £35.99 GBP Inc. VAT
  • 3 vCPU Core
  • 80 GB SSD Storage
  • 4 GB RAM
  • Full Root SSH Access
  • Free 24x7 Premium Support, Fully Managed
  • 99.95% Uptime Guarantee
Monthly Price: £35.99 GBP Inc. VAT | Order Now

Win. VPS Enterprise @ £44.39 GBP Inc. VAT
  • 4 vCPU Cores
  • 120 GB SSD Storage
  • 6 GB RAM
  • Full Root SSH Access
  • Free 24x7 Premium Support, Fully Managed
  • 99.95% Uptime Guarantee
Monthly Price: £44.39 GBP Inc. VAT | Order Now

For full list of Windows VPS Hosting features, visit: https://www.webhosting.uk.com/windows-vps-hosting.php

Here is the list of Cloud Servers:

Linux VMWARE CLOUD @ £33.00 GBP inc. VAT
  • CPU: 2 vCPUs (Upgrades up to 12 vCPUs)
  • Disk: 60 GB (Upgrades up to 1 TB)
  • Bandwidth: 5000 GB
  • RAM: 2 GB (Upgrades up to 64 GB)
  • OS: Linux CentOS 6.x, Fedora Core 10, Debian 5, Ubuntu 9.x
  • Control Panel: cPanel/WHM, Plesk 12 (at an additional charge)
Monthly Price: £33.00 GBP inc. VAT | Order Now

Windows Hyper-V CLOUD @ £33.00 GBP inc. VAT
  • CPU: 2 vCPUs (Upgrades up to 12 vCPUs)
  • Disk: 60 GB (Upgrades up to 1 TB)
  • Bandwidth: 5000 GB
  • RAM: 2 GB (Upgrades up to 64 GB)
  • Control Panel: Plesk 12 (at additional charge)
  • OS: Windows 2012 Standard R2
Monthly Price: £33.00 GBP inc. VAT | Order Now

For full list of Cloud Hosting features, visit https://www.webhosting.uk.com/cloud-hosting.php

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.

Creating an iOS + Android app for my community!

$
0
0
I am thinking about having an iOS iPhone, iPad, and Android app for my community. I have had some requests from users because they think it will be easier to talk to the other members, ask questions and view various content I create.

Does anyone have their own iOS and Android app for their community?

Slow array_agg after upgrade from 9.2 to 9.5

$
0
0
Internally we upgraded from 9.2 to 9.5 en we had defined an median function.
This became about 7 to 8 times slower using the same functions.

They are defined like this:


CREATE OR REPLACE FUNCTION public._final_median(anyarray)
RETURNS double precision
LANGUAGE sql
AS
$body$
WITH q AS
(
SELECT val
FROM unnest($1) val
WHERE VAL IS NOT NULL
ORDER BY 1
),
cnt AS
(
SELECT COUNT(*) AS c FROM q
)
SELECT AVG(val)::float8
FROM
(
SELECT val FROM q
LIMIT 2 - MOD((SELECT c FROM cnt), 2)
OFFSET GREATEST(CEIL((SELECT c FROM cnt) / 2.0) - 1,0)
) q2;
$body$
IMMUTABLE
COST 100;


CREATE AGGREGATE median(anyelement)
(
sfunc = array_append,
stype = anyarray,
finalfunc = _final_median,
initcond = '{}'
);

All SQL still work but a lot slower now. Our tables on which we use this function are between 5.000 and 150.000 rows with between 18 and 800 columns.

We found that the median function that fills an array is the slow part. When we change our SQL from median(fieldname) to _final_median(array_agg(fieldname)) the performance is even 3 times faster than on 9.2.

So it looks like the array_agg function when used in a self-defined function is extremly slow.

As we have a lot of files in our ETL proces where a lot of median functions are used we tried to fix this issue instead of altering the median SQL as mentioned above. But we are not yet succeeding.

Anybody had this issue and knows about a way to solve this gracefully?

Regards,
jaroet

Adding Autonumber to exiting database that has a manual ref number

$
0
0
Ok, so I was asked to help out a client with there database. They have 400 records and ref numbers allocated to each record. These reference numbers are not in any particular order - (i.e. 1 wasn't the first record entered to the system) Due to Human Errors when allocating ref numbers I've been asked to add an Autonumber Field as REF No. (but making the sure the number itself of the record stays the same)


Sorted the Database by Ref No in Numerical order .... 1,2,3 (keeping in mind that this is not the order they were inputted)

switched to design view, added new field, Auto Ref No - datatype - Autonumber.
Switched back to Datasheet View and it had rearranged the records into order of age - date entered. Meaning my Auto Ref No and My Ref No field aren't matching up.

Is there anyway of avoiding this? Can I set the autonumber to my ORIGINAL numerical order rather than order of RECORD ENTRY DATE?

User defined search Query for Listbox

$
0
0
I'm building a database for a laboratory setting. The operators perform 20 test, and input the data into a form. The table in which it is entered is roughly as below:

DATE | TIME | Test 1 |Test 2 | ... | Test 20

I'm trying to build a form for the supervisor to search for specific ranges with in the tests. Ideally, I'd like for them to enter a date range (via two unbound text boxes - startDate/endDate), and then have text boxes for them to enter the data range they are searching for via other text boxes (StartTest1/EndTest1, StartTest2/EndTest2, ... StartTest20/EndTest20). I was going to build a query in query design view and use the criteria for each field as Between [startDate] and [endDate], then for the fields would be Between [StartTest1] and [EndTest1] Or [StartTest1] Is Null And [EndTest1] Is Null. Sometimes the supervisor will search ranges for one test, but sometimes he/she may need to refine the search based on serveral test. My assumption (and this has worked on a smaller scale) is that this would search the table for records between the dates and with values between whatever information was inputted, unless they were left blank, then it would simply return the records between the inputted dates. If two fields have a start and end value then it would refine the search to fit those criteria with the others left null, and so on. Is there a better way to creating a query to search for this data? When I use the criteria above for more than 8 fields the query seems to lock up.

The query created is to be used to create value in a listbox, which when selected would find that record and allow for the supervisor to edit the record, and also used to create a graph and report.

Any help, or resources to help with this problem would be greatly appreciated.

Thank you

EDIT: I could possibly get this to work by making separate queries to perform the date range, then a query based on the date range query for test 1-5, then another query based on the test 1-5 for test 6-10... etc... but I assume this would be inefficient

T-SQL to strip HTML tags from string without using a function...need straight SQL

$
0
0
Can someone assist me with straight t-sql to strip HTML tags from a string in a column field. will need all variations of HTML tags stripped before exporting to a flat file.
The application sql window does not allow me to create functions since it was created by a third party vendor, but I have access to pull raw data using Putty.

here's an example of a record with HTML tabs:
"<P class=MsoNormal style=""MARGIN: 0in 0in 0pt""><FONT size=3><FONT face=""Times New Roman""><I><U>Watch Hit Information:</U></I><U> </U><?xml:namespace prefix = ""o"" ns = ""urn:schemas-microsoft-com:office:office"" /><o:p></o:p></FONT></FONT></P>
<TABLE class=MsoNormalTable style=""mso-cellspacing: 1.5pt; mso-yfti-tbllook: 1184"" cellPadding=0 border=0>
<TBODY>
<TR style=""mso-yfti-irow: 0; mso-yfti-firstrow: yes"">
<TD style=""BORDER-TOP: #f0f0f0; BORDER-RIGHT: #f0f0f0; BORDER-BOTTOM: #f0f0f0; PADDIN"

If this data was all in SQL Server I'd have no problems stripping HTML tags with a function, but since its DB2...its a whole new ball game.

Thanks in advance for your assistance

DPF redistribute

$
0
0
Hi,

db2 V 10.5 fp 7

Linux 6

Have 5 logical partition, trying to drop partition 5 which is been used by database.

Have created a partition map using db2gpmap.

example output

0 1 2 3 4 5 0 1 2 3 4 5 0 1 2 3 4 5 0 1 2 3 4 5 0 1 2 3 4 5
0 1 2 3 4 5 0 1 2 3 4 5 0 1 2 3 4 5 0 1 2 3 4 5 0 1 2 3 4 5
0 1 2 3 4 5 0 1 2 3 4 5 0 1 2 3 4 5 0 1 2 3 4 5 0 1 2 3 4 5
0 1 2 3 4 5 0 1 2 3 4 5 0 1 2 3 4 5 0 1 2 3 4 5 0 1 2 3 4 5
0 1 2 3 4 5 0 1 2 3 4 5 0 1 2 3 4 5 0 1 2 3 4 5 0 1 2 3 4 5


Have edited to text file and removed 5

example

0 1 2 3 4 0 1 2 3 4 0 1 2 3 4 0 1 2 3 4 0 1 2 3 4
0 1 2 3 4 0 1 2 3 4 0 1 2 3 4 0 1 2 3 4 0 1 2 3 4
0 1 2 3 4 0 1 2 3 4 0 1 2 3 4 0 1 2 3 4 0 1 2 3 4
0 1 2 3 4 0 1 2 3 4 0 1 2 3 4 0 1 2 3 4 0 1 2 3 4
0 1 2 3 4 0 1 2 3 4 0 1 2 3 4 0 1 2 3 4 0 1 2 3 4
0 1 2 3 4 0 1 2 3 4 0 1 2 3 4 0 1 2 3 4 0 1 2 3 4


redistribute using this targetmap file give error

db2 "REDISTRIBUTE database partition group IBMDEFAULTGROUP using TARGETMAP ibmdefaultgrp1.out "
SQL6053N Error exists in file "ibmdefaultgrp1.out". Reason code = "1".
SQLSTATE=00000

Please suggest

regds
paul

Total mySQL Noob - Heavy MySQL queries

$
0
0
Hello!
I am stuck on where to ask this question. I am a total buffoon when it comes to MySQL... I have a blog setup and just received the below email from my hosting:

Quote:

Our server administrators have detected that the database 'Blah' was getting heavy quires. The volume of which is sufficient enough to degrade overall performance of other websites hosted on the shared server.

To reduce the impact on the servers and other customer accounts, we had to temporarily disable website and CGI services for your hosting account 'blah'.

I have uploaded sample SQL query which was causing the issue in the file 'sqlquery.txt' in stats folder.

Please administrate your database and address the large queries. These types of queries are often generated by plugins and set to re-occur at regular intervals.
As far as I know, everything has been running smoothly up until this point and I've never had an issue. The problem is, I literally know nothing.... so trying to diagnose the issue seems almost impossible. If I at least knew what was causing the issue, I could repair it.

Here is a dropbox link to the SQL query... if anyone can help shed some light or point me in the right direction it would be greatly appreciated. https://www.dropbox.com/s/00sr7o0869...query.txt?dl=0

Insert a Naira Sign in the number field

$
0
0
Hi Guys,

A client as me to insert a Nigerian currency - Naira currency sign ₦ in a number field, but BD cannot read the sign. How can this be implemented?

Thanks

Ernie

PostgreSQL 9.3 I function returnig data from 2 tables

$
0
0
Hello,
In PostgreSQL 9.3 I wrote function returnig data from pd_product_comment table + 1 joined field username :
Quote:

CREATE FUNCTION get_new_product_comments() RETURNS SETOF pd_product_comment
LANGUAGE plpgsql
AS $$
declare
r pd_product_comment%rowtype;
begin
for r in
SELECT pd_product_comment.*, pd_ion_users.username as username, pd_ion_users.username as username
FROM pd_product_comment
LEFT JOIN pd_ion_users ON pd_ion_users.id = pd_product_comment.user_id
WHERE pd_product_comment.approved_status = 'N'
GROUP by pd_product_comment.id, pd_product_comment.product_id, username
ORDER BY pd_product_comment.product_id, pd_product_comment.created_at asc
loop
return next r;
end loop;
return;
end
$$;
But I got only fileds of pd_product_comment table, not username field...

have I to create new Type for this? If yes, please give sample or link how to do it ?

Thanks!

Creating report that composed of INV1 OPRJ and JDT1 in SAP TABLES

$
0
0
So first I want to create a report which displaying all the drivers expenses and gross.
This are the column names examples:

Plate No. | Driver's Name | Gross | 2% | FUEL | FUEL %tage | NET | 11%/12% | Cash Advance | Over

So I already done working with this column but my problem is the Cash advances and Over because this fields are in JDT1 or in Journal Entry Modules in SAP.

My Problem is how can I join the JDT1 table so that I can create formula to get the Over. Or what should I do to create this reports .

Please kindly help me with this problem.
Thanks and Regards in advances.

sapforum1.pngsapforum2.png
Attached Images

Max number of columns for each data type?

$
0
0
PostgreSQL states Maximum Columns per Table is 250 - 1600 depending on column types.

Does anyone know the specifics of these limits for each data type? And how it works for tables with multiple column types?
Viewing all 13329 articles
Browse latest View live