Hi,
I'm a little bit stumped trying to put together a query that will list a customer Id, and the number of times their Id appears in the History table.
I'm using two tables (simplified);
Customers
id
Name
History
id
CustomerId
I tried the following query;
SELECT...
A small add-on to this problem ;)
The query provides the entire list of customers with their last contact time. Now I'm trying to order the entire list by the contact time so the most recently contacted are displayed at the top.
I tried;
SELECT
a.id,a.contact_name,a.username,a.status...
Hi,
I have two tables, one containing account details and the second containing the account history. I'm trying to pull the date the account was last updated along with the account details in a single query;
SELECT
a.id, a.contact_name, a.username, a.status, b.timestamp
FROM
accounts a...
Hi,
I have an object with a property containing an array, eg;
---------------------------------------
#!/usr/bin/perl
use strict;
my $Obj = main->new;
exit 0;
sub new {
my $class = shift;
bless {
property => ['zero', 'one', 'two', 'three']
}, $class;
}...
Hi,
Our MS guys have an exchange server configured with an invalid internal domain name[0]. All local exchange mailboxes forward to real-world corresponding mailboxes on our sendmail mailserver.
The problem here, is that the "From" address will always show up as...
If only I'd held out & kept searching for another 10-15mins ;-)
It all seems so easy after seeing the solution;
@values = sort {$a->{'age'} <=> $b->{'age'}} @values;
Pete
Hi,
I'm using an array of hashes to hold some data - a simplified example as follows;
my @values;
$values[0]{'name'} = "Bob";
$values[0]{'age'} = 41;
$values[1]{'name'} = "Fred";
$values[1]{'age'} = 25;
...
$values[25]{'name'} = "Joe";
$values[25]{'age'} = 38...
Ok, after having a little break from the code, and re-reading it a little later, I did some debugging further up the code (between the object creation, and the foreach loop).
The creating of the object "my $object = class->new(.." was causing the error, and therefore didn't have the...
Hi,
I'm wanting to perform a series of regex's on a number of properties for an object. I've tried something similar to;
# ------------------------
my $object = class->new("xxxxxx");
foreach my $field (@fields) {
my $item = $object->{$field};
# .. then perform regex's on $item...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.