473,387 Members | 1,790 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,387 software developers and data experts.

ADP: QueryDef equivalent?

Seems like ADP is predicated on the notion that you'd only want to use
stored procedures in the back end or in-line SQL in the front end.

Makes it really messy to develop something like
-------------------------------------
SELECT
v.SECURITY_ALIAS,
v.NEXT_REFIX_DATE AS ConversionDate,
v.RESET_DAY AS VariableRateMode,
CASE
WHEN v.RESET_DAY='MO' THEN 'Monday'
WHEN v.RESET_DAY='TU' THEN 'Tuesday'
WHEN v.RESET_DAY='WE' THEN 'Wednesday'
WHEN v.RESET_DAY='W' THEN 'Wednesday'
WHEN v.RESET_DAY='TH' THEN 'Thursday'
WHEN v.RESET_DAY='FR' THEN 'Friday'
WHEN v.RESET_DAY='F' THEN 'Friday'
WHEN v.RESET_DAY='1' THEN '1-Day'
WHEN v.RESET_DAY='7' THEN '7-Day'
WHEN v.RESET_DAY='28' THEN '28-Day'
WHEN v.RESET_DAY='35' THEN '35-Day'
WHEN v.RESET_DAY='90' THEN '90-Day'
WHEN v.RESET_DAY='D' THEN 'Daily'
WHEN v.RESET_DAY='FMO' THEN 'First of Month'
WHEN v.RESET_DAY='H' THEN 'Holiday Rules Appl'
WHEN v.RESET_DAY='MM' THEN 'Mid-Month'
WHEN v.RESET_DAY='NA' THEN Null
WHEN v.RESET_DAY='NUL' THEN Null
ELSE Null
END AS VariableRateMode_Mapped

FROM
SECURITYDBO.VARIABLE_RATE v,
(
SELECT
v0.SECURITY_ALIAS AS Security_Alias,
Max(v0.EFFECTIVE_DATE) AS Effective_Date

FROM
SECURITYDBO.VARIABLE_RATE v0

WHERE
v0.SRC_INTFC_INST = 83

GROUP BY
v0.SECURITY_ALIAS
) mx

WHERE
v.SECURITY_ALIAS = mx.Security_Alias AND
v.EFFECTIVE_DATE = mx.Effective_Date AND
v.SRC_INTFC_INST = 83
-------------------------------------

in, say, SQL Programmer and then adapt it to the ADP.

In regluar MS Access, you'd just create a passthrough query and paste
the SQL directly into it, and go.

With an ADP it seems like one has to choose between a humongous
in-line string and laborously putting in "_ " line continuation
strings - which makes it really time-consuming to flip-flop
back-and-forth between the SQL development tool and ADP...

Is there a better way for somebody who does not have CREATE authority
for SPs in the back end?
Nov 12 '05 #1
1 2386
PeteCresswell wrote:
Seems like ADP is predicated on the notion that you'd only want to use
stored procedures in the back end or in-line SQL in the front end.

Makes it really messy to develop something like
-------------------------------------
SELECT
v.SECURITY_ALIAS,
v.NEXT_REFIX_DATE AS ConversionDate,
v.RESET_DAY AS VariableRateMode,
CASE
WHEN v.RESET_DAY='MO' THEN 'Monday'
WHEN v.RESET_DAY='TU' THEN 'Tuesday'
WHEN v.RESET_DAY='WE' THEN 'Wednesday'
WHEN v.RESET_DAY='W' THEN 'Wednesday'
WHEN v.RESET_DAY='TH' THEN 'Thursday'
WHEN v.RESET_DAY='FR' THEN 'Friday'
WHEN v.RESET_DAY='F' THEN 'Friday'
WHEN v.RESET_DAY='1' THEN '1-Day'
WHEN v.RESET_DAY='7' THEN '7-Day'
WHEN v.RESET_DAY='28' THEN '28-Day'
WHEN v.RESET_DAY='35' THEN '35-Day'
WHEN v.RESET_DAY='90' THEN '90-Day'
WHEN v.RESET_DAY='D' THEN 'Daily'
WHEN v.RESET_DAY='FMO' THEN 'First of Month'
WHEN v.RESET_DAY='H' THEN 'Holiday Rules Appl'
WHEN v.RESET_DAY='MM' THEN 'Mid-Month'
WHEN v.RESET_DAY='NA' THEN Null
WHEN v.RESET_DAY='NUL' THEN Null
ELSE Null
END AS VariableRateMode_Mapped

FROM
SECURITYDBO.VARIABLE_RATE v,
(
SELECT
v0.SECURITY_ALIAS AS Security_Alias,
Max(v0.EFFECTIVE_DATE) AS Effective_Date

FROM
SECURITYDBO.VARIABLE_RATE v0

WHERE
v0.SRC_INTFC_INST = 83

GROUP BY
v0.SECURITY_ALIAS
) mx

WHERE
v.SECURITY_ALIAS = mx.Security_Alias AND
v.EFFECTIVE_DATE = mx.Effective_Date AND
v.SRC_INTFC_INST = 83
-------------------------------------

in, say, SQL Programmer and then adapt it to the ADP.

In regluar MS Access, you'd just create a passthrough query and paste
the SQL directly into it, and go.

With an ADP it seems like one has to choose between a humongous
in-line string and laborously putting in "_ " line continuation
strings - which makes it really time-consuming to flip-flop
back-and-forth between the SQL development tool and ADP...

Is there a better way for somebody who does not have CREATE authority
for SPs in the back end?


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Arvin Meyers (I believe) used to store his queries in a table and
retrieve them into a string before running. Do you have table creation
permission on the db you are working with?

Perhaps its time to talk to the DBA and get permission to do your work!
Yeah! You tell 'em!! :-)

If that fails, maybe you can create a local .mdb file that has a table
of queries, or the queries themselves if the .mdb file can be linked to
the SQL back-end. Some OpenDatabase() or Automation work to get at the
local tables/queries. Just some ideas . . . .

--
MGFoster:::mgf00 <at> earthlink <decimal-point> net
Oakland, CA (USA)

-----BEGIN PGP SIGNATURE-----
Version: PGP for Personal Privacy 5.0
Charset: noconv

iQA/AwUBQIQ9n4echKqOuFEgEQLfOwCgvT8JACkpKmJ5zfoMATm6bA Gk6bgAoOYt
JkA1hwzmFvsiwm2nV7POefKl
=jnHD
-----END PGP SIGNATURE-----

Nov 12 '05 #2

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

Similar topics

33
by: Jerry Boone | last post by:
A long time ago Larry Linson (MVP contributor to this group) made a point to me that mdb's could do anything ADP's (Access Projects) could by using linked tables to leverage Sql server databases. ...
3
by: CFW | last post by:
I have a view (Access .adp fronte end and SQL Server back) that retrieves a currency field from a table that is sometimes a NULL value. That view is the RowSource for a List box that displays the...
2
by: Lauren Quantrell | last post by:
I used to use this code to create shortcuts in my Access Jet MBD programs but it won't work in Access ADP projects. I know it's related to reference to CurrentDB.Properties (where it errors). IS...
7
by: brett valjalo | last post by:
Hey Folks: Long time no see! Hope everyone is well. I have an old mdb I'm upsizing to an adp. There is a button on a form which executes code similar to the following (this is a search form...
0
by: PeteCresswell | last post by:
Seems like ADP is predicated on the notion that you'd only want to use stored procedures in the back end or in-line SQL in the front end. Makes it really messy to develop something like...
60
by: Neil | last post by:
I have a situation with an ODBC linked view in an Access 2000 MDB with a SQL 7 back end. The view is scrolling very slowly. However, if I open the view in an ADP file, it scrolls quickly. I...
6
by: Tim Marshall | last post by:
A2003, but this behaviour also occurred during the same DAO process I'm about to describe in A97. I have a sub procedure which takes two arguments: a querydef name; and an SQL statement...
3
by: Zahed | last post by:
Using Microsoft 2003 (ADP)connecting to SQL 2000. I am trying to create a simple form in Access and pass parameters to a SQL query. tried but dosen't work : SELECT Port_Code, Port_Name...
6
by: rahuldev999 | last post by:
Hi I am beginner in the access project. can anyone suggest how to deal with this " Set rq = Db.CreateQueryDef("r_temp_rslt_research", strSql)" in the below code.As its a MDB application...
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: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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...
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...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.