PEPPLER.ORG
Michael Peppler
Sybase Consulting
Menu
Home
Sybase on Linux
Install Guide for Sybase on Linux
General Sybase Resources
General Perl Resources
Freeware
Sybperl
Sybase::Simple
DBD::Sybase
BCP Tool
Bug Tracker
Mailing List Archive
Downloads Directory
FAQs
Sybase on Linux FAQ
Sybperl FAQ
Personal
Michael Peppler's resume

sybperl-l Archive

Up    Prev    Next    

From: Eduard dot Mostert at sybase dot com
Subject: Re: How to setup DBD-Sybase-0.95_01?
Date: Feb 10 2003 2:46PM

Tamas,

Try this:

my($query) = "SELECT size FROM master.dbo.sysusages
            WHERE dbid = db_id ('".$db."')
              AND segmap != 4";
$size = &querysum($query);

I am sure there better alternatives, but this one popped into my head
first.

Regards,

Eduard Mostert
Senior Consultant
Sybase Professional Services



                                                                                                                      
                    "Trebisch Tamas"                                                                                  
                                   
                    zo.hu>                    cc:                                                                     
                    Sent by:                  Subject:     How to setup DBD-Sybase-0.95_01?                           
                    owner-SYBPERL-L@lis                                                                               
                    t.cren.net                                                                                        
                                                                                                                      
                                                                                                                      
                    02/10/2003 09:10 AM                                                                               
                    Please respond to                                                                                 
                    "Trebisch Tamas"                                                                                  
                                                                                                                      
                                                                                                                      



Hi guruz,

What's wrong with my query, please?

$size = &querysum(qq{SELECT size FROM master.dbo.sysusages
         WHERE dbid = db_id(\'$db\')
         AND segmap != 4});


Can't set CS_EXTERNAL_CONFIG to false
at /usr/local/lib/perl5/5.8.0/sun4-solaris/DynaLoader.pm line 249,
 line 1.
DBD::Sybase::db do failed: Server message number=151 severity=15
state=1 line=1 server=SERVER2text='$' is an invalid money value.
Server message number=102 severity=15 state=1 line=1
server=SERVER2text=Incorrect syntax near '$'.

As I understood the problem is here:
db_id(\'$db\')
but I don't know how should I use the \ symbol
to comment out '...

Thanks in advance!

Regards,

Tamas