473,385 Members | 1,357 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Execute Function from VB/ADO

Here is my function:

CREATE OR REPLACE FUNCTION public.getLatestInBinsBetween(timestamp,
timestamp, varchar, varchar)
RETURNS SETOF record AS
'
SELECT cmt.binid, cmt.sitename, cmt.exerciseid,
Max(cmt.datetimestamp) AS datetimestamp, max(cmt.issuancetime) AS
IssuanceTime
FROM consolidatedMetReading cmt INNER JOIN (SELECT Distinct BinID,
SiteName, ExerciseID
FROM consolidatedMetReading gbib
WHERE gbib.BinID BETWEEN $1 and $2
AND gbib.SiteName = $3
AND gbib.ExerciseID = $4) gbib
ON gbib.BinID = cmt.BinID
AND gbib.SiteName = cmt.SiteName
AND gbib.ExerciseID = cmt.ExerciseID
GROUP BY cmt.binid, cmt.sitename, cmt.exerciseid
ORDER BY cmt.binid, cmt.sitename, cmt.exerciseid
'
LANGUAGE 'sql' VOLATILE;
here is the sql statement from a SQL window:

SELECT *
FROM getLatestInBinsBetween('10-08-2003', '10-09-2003', 'Anniston',
'real')
AS gLIBB(binid timestamp, sitename varchar, exerciseid varchar,
datetimestamp timestamp, issuancetime timestamp)
How can I execute this from a ADO connection?

Thomas LeBlanc

__________________________________________________ _______________
Fast, faster, fastest: Upgrade to Cable or DSL today!
https://broadband.msn.com
---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to ma*******@postgresql.org

Nov 12 '05 #1
0 2387

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: TheDustbustr | last post by:
<code> from __future__ import generators from time import time threads= def sleep(n): print "In Sleep" t=time() while (t+n>time()): yield None
9
by: PyPK | last post by:
Hi if I have a function called tmp=0 def execute(): tmp = tmp+1 return tmp also I have def func1(): execute() ....
4
by: Sergey Suleymanov | last post by:
Documentation says "By default, only the owner (creator) of the function has the right to execute it." But for me newly created function has execute privilege to public by default. And we have...
5
by: Gustavo Randich | last post by:
Hello, I'm writing an automatic SQL parser and translator from Informix to DB2. Now I'm faced with one of the most difficult things to translate, the "foreach execute procedure" functionality...
3
by: Lyle Fairfield | last post by:
MS-SQL Server utilities Enterprise Manager and Query Analyzer will model almost any MS-SQL object as a simple script file with a default ".sql" extension. But how to "run these files? They are...
0
by: Dexter | last post by:
Hello all, I have the following problem. I need to execute a javascript function of inside of a asp.net page. .... Private Sub execute_test() '... here a asp.net code '... here a asp.net code...
7
by: msxkim | last post by:
How to execute functions in the parent class first and then functions in the child class? For example, I have a parent class with functions 'ONE' and 'TWO' and child class has a function 'THREE'. ...
2
by: Sike | last post by:
Hi everyone, I've been browsing this and a few other related newsgroups trying to get my head around this problem, and so far all the trails seem to go cold, without an acceptable solution being...
9
by: Pachydermitis | last post by:
Hi, Is there any way to execute a function by using it's pointer? The reason I want to do this is: I have a control on a form that I have wrapped with a class. I want to be able to dynamically...
17
by: =?Utf-8?B?SmltIFJvZGdlcnM=?= | last post by:
I am trying to replace a huge chunck of code that currently I incorporate with an #Include directive. The program rarely has to flow through that code, so I thought it would be better if I used...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.