This worked but I would rather use it as a Access query rather than a pass-thru, if you guys can continue to help diagnose my syntax.
With Warm Regards, Arthur D. LorenziniIT System ManagerCheyenne River Housing AuthorityWk.(605)964-4265 Ext. 130Fax (605)964-1070
"Anyone who claimed that old age had brought them patience was either lying or senile."
From: "Duane Hookom duanehookom@hotmail.com [MS_Access_Professionals]" <MS_Access_Professionals@yahoogroups.com>
To: Access Professionals Yahoo Group <ms_access_professionals@yahoogroups.com>
Sent: Monday, April 13, 2015 2:04 PM
Subject: RE: [MS_AccessPros] r SQL Server query to Access
Art,
Did you set the ODBC Connect Str property of the P-T query? There is a builder button that helps you create this. I typically use DSN-less connections. There are lots of examples at http://www.connectionstrings.com/sql-server/.
Duane Hookom, MVP
MS Access
To: MS_Access_Professionals@yahoogroups.com
From: MS_Access_Professionals@yahoogroups.com
Date: Mon, 13 Apr 2015 18:55:44 +0000
Subject: Re: [MS_AccessPros] r SQL Server query to Access
I am trying it as a Pass Through query but every time I run it prompts for my ODBC data source. WHen I made it my forms record source it also prompts for the ODBC datasource over and over again. ANy idea?
With Warm Regards, Arthur D. LorenziniIT System ManagerCheyenne River Housing AuthorityWk.(605)964-4265 Ext. 130Fax (605)964-1070
"Anyone who claimed that old age had brought them patience was either lying or senile."
From: "wrmosca@comcast.net [MS_Access_Professionals]" <MS_Access_Professionals@yahoogroups.com>
To: MS_Access_Professionals@yahoogroups.com
Sent: Monday, April 13, 2015 12:55 PM
Subject: RE: [MS_AccessPros] r SQL Server query to Access
Duane - single quotes should work fine in this case.
-Bill Mosca
---In MS_Access_Professionals@yahoogroups.com, <duanehookom@hotmail.com> wrote :
Art,
If the query doesn't need to be updateable, I would create a pass-through query and use the SQL Server syntax.
If you need to re-write this in Access, you should try to replace the single quotes with double quotes.
Do you understand the difference between '' and Null? I would consider using:
city & "" <> ""'
Duane Hookom, MVP
MS Access
To: MS_Access_Professionals@yahoogroups.com
From: MS_Access_Professionals@yahoogroups.com
Date: Mon, 13 Apr 2015 07:58:56 -0700
Subject: [MS_AccessPros] r SQL Server query to Access
Is there a app or can someone help me to convert the following SQL Server Query to Access query:
SELECT a.CustID, a.UnitID, *
FROM (select custnmbr AS CustID, custclas AS Class, ADRSCODE AS UnitID,Hold,
CUSTNAME AS TenantName,
address1, address2, city, state, zip from RM00101
where INACTIVE = 0 and city <> ' ' AND CUSTCLAS='Rental' and Hold = 0
) AS a INNER JOIN (Select CUSTNMBR, CUSTNAME, LOCNCODE, LOCNDSCR, BSSI_PortfolioID, BSSI_Description1,
BSSI_Tenant_Lease_Status, BSSI_Lease_Execution_Dat, BSSI_Lease_Termination_D
From B4602200 where
BSSI_Tenant_Lease_Status = 2) AS b ON a.CustID = b.CUSTNMBR;
WHen I try to run this in ACCESS I get ODBC call error.
Thank you
Art Lorenzini
South Dakota.
#yiv3819394164 #yiv3819394164 -- #yiv3819394164ygrp-mkp {border:1px solid #d8d8d8;font-family:Arial;margin:10px 0;padding:0 10px;}#yiv3819394164 #yiv3819394164ygrp-mkp hr {border:1px solid #d8d8d8;}#yiv3819394164 #yiv3819394164ygrp-mkp #yiv3819394164hd {color:#628c2a;font-size:85%;font-weight:700;line-height:122%;margin:10px 0;}#yiv3819394164 #yiv3819394164ygrp-mkp #yiv3819394164ads {margin-bottom:10px;}#yiv3819394164 #yiv3819394164ygrp-mkp .yiv3819394164ad {padding:0 0;}#yiv3819394164 #yiv3819394164ygrp-mkp .yiv3819394164ad p {margin:0;}#yiv3819394164 #yiv3819394164ygrp-mkp .yiv3819394164ad a {color:#0000ff;text-decoration:none;}#yiv3819394164 #yiv3819394164ygrp-sponsor #yiv3819394164ygrp-lc {font-family:Arial;}#yiv3819394164 #yiv3819394164ygrp-sponsor #yiv3819394164ygrp-lc #yiv3819394164hd {margin:10px 0px;font-weight:700;font-size:78%;line-height:122%;}#yiv3819394164 #yiv3819394164ygrp-sponsor #yiv3819394164ygrp-lc .yiv3819394164ad {margin-bottom:10px;padding:0 0;}#yiv3819394164 #yiv3819394164actions {font-family:Verdana;font-size:11px;padding:10px 0;}#yiv3819394164 #yiv3819394164activity {background-color:#e0ecee;float:left;font-family:Verdana;font-size:10px;padding:10px;}#yiv3819394164 #yiv3819394164activity span {font-weight:700;}#yiv3819394164 #yiv3819394164activity span:first-child {text-transform:uppercase;}#yiv3819394164 #yiv3819394164activity span a {color:#5085b6;text-decoration:none;}#yiv3819394164 #yiv3819394164activity span span {color:#ff7900;}#yiv3819394164 #yiv3819394164activity span .yiv3819394164underline {text-decoration:underline;}#yiv3819394164 .yiv3819394164attach {clear:both;display:table;font-family:Arial;font-size:12px;padding:10px 0;width:400px;}#yiv3819394164 .yiv3819394164attach div a {text-decoration:none;}#yiv3819394164 .yiv3819394164attach img {border:none;padding-right:5px;}#yiv3819394164 .yiv3819394164attach label {display:block;margin-bottom:5px;}#yiv3819394164 .yiv3819394164attach label a {text-decoration:none;}#yiv3819394164 blockquote {margin:0 0 0 4px;}#yiv3819394164 .yiv3819394164bold {font-family:Arial;font-size:13px;font-weight:700;}#yiv3819394164 .yiv3819394164bold a {text-decoration:none;}#yiv3819394164 dd.yiv3819394164last p a {font-family:Verdana;font-weight:700;}#yiv3819394164 dd.yiv3819394164last p span {margin-right:10px;font-family:Verdana;font-weight:700;}#yiv3819394164 dd.yiv3819394164last p span.yiv3819394164yshortcuts {margin-right:0;}#yiv3819394164 div.yiv3819394164attach-table div div a {text-decoration:none;}#yiv3819394164 div.yiv3819394164attach-table {width:400px;}#yiv3819394164 div.yiv3819394164file-title a, #yiv3819394164 div.yiv3819394164file-title a:active, #yiv3819394164 div.yiv3819394164file-title a:hover, #yiv3819394164 div.yiv3819394164file-title a:visited {text-decoration:none;}#yiv3819394164 div.yiv3819394164photo-title a, #yiv3819394164 div.yiv3819394164photo-title a:active, #yiv3819394164 div.yiv3819394164photo-title a:hover, #yiv3819394164 div.yiv3819394164photo-title a:visited {text-decoration:none;}#yiv3819394164 div#yiv3819394164ygrp-mlmsg #yiv3819394164ygrp-msg p a span.yiv3819394164yshortcuts {font-family:Verdana;font-size:10px;font-weight:normal;}#yiv3819394164 .yiv3819394164green {color:#628c2a;}#yiv3819394164 .yiv3819394164MsoNormal {margin:0 0 0 0;}#yiv3819394164 o {font-size:0;}#yiv3819394164 #yiv3819394164photos div {float:left;width:72px;}#yiv3819394164 #yiv3819394164photos div div {border:1px solid #666666;height:62px;overflow:hidden;width:62px;}#yiv3819394164 #yiv3819394164photos div label {color:#666666;font-size:10px;overflow:hidden;text-align:center;white-space:nowrap;width:64px;}#yiv3819394164 #yiv3819394164reco-category {font-size:77%;}#yiv3819394164 #yiv3819394164reco-desc {font-size:77%;}#yiv3819394164 .yiv3819394164replbq {margin:4px;}#yiv3819394164 #yiv3819394164ygrp-actbar div a:first-child {margin-right:2px;padding-right:5px;}#yiv3819394164 #yiv3819394164ygrp-mlmsg {font-size:13px;font-family:Arial, helvetica, clean, sans-serif;}#yiv3819394164 #yiv3819394164ygrp-mlmsg table {font-size:inherit;font:100%;}#yiv3819394164 #yiv3819394164ygrp-mlmsg select, #yiv3819394164 input, #yiv3819394164 textarea {font:99% Arial, Helvetica, clean, sans-serif;}#yiv3819394164 #yiv3819394164ygrp-mlmsg pre, #yiv3819394164 code {font:115% monospace;}#yiv3819394164 #yiv3819394164ygrp-mlmsg * {line-height:1.22em;}#yiv3819394164 #yiv3819394164ygrp-mlmsg #yiv3819394164logo {padding-bottom:10px;}#yiv3819394164 #yiv3819394164ygrp-msg p a {font-family:Verdana;}#yiv3819394164 #yiv3819394164ygrp-msg p#yiv3819394164attach-count span {color:#1E66AE;font-weight:700;}#yiv3819394164 #yiv3819394164ygrp-reco #yiv3819394164reco-head {color:#ff7900;font-weight:700;}#yiv3819394164 #yiv3819394164ygrp-reco {margin-bottom:20px;padding:0px;}#yiv3819394164 #yiv3819394164ygrp-sponsor #yiv3819394164ov li a {font-size:130%;text-decoration:none;}#yiv3819394164 #yiv3819394164ygrp-sponsor #yiv3819394164ov li {font-size:77%;list-style-type:square;padding:6px 0;}#yiv3819394164 #yiv3819394164ygrp-sponsor #yiv3819394164ov ul {margin:0;padding:0 0 0 8px;}#yiv3819394164 #yiv3819394164ygrp-text {font-family:Georgia;}#yiv3819394164 #yiv3819394164ygrp-text p {margin:0 0 1em 0;}#yiv3819394164 #yiv3819394164ygrp-text tt {font-size:120%;}#yiv3819394164 #yiv3819394164ygrp-vital ul li:last-child {border-right:none !important;}#yiv3819394164
[Non-text portions of this message have been removed]
Posted by: Art Lorenzini <dbalorenzini@yahoo.com>
Reply via web post | • | Reply to sender | • | Reply to group | • | Start a New Topic | • | Messages in this topic (10) |
Tidak ada komentar:
Posting Komentar