473,396 Members | 2,154 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,396 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 2389
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: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.