BookmarkSubscribeRSS Feed
anandbillava
Fluorite | Level 6
I have one unusual situation where in my sql query works fine under 9.1. But under 9.2 the program never finishes execution. At the end I have to abruptly exit the program.
I am using Unix SAS. Let me know if any one has answer.

Here is my query


connect to sqlsvr(user=aaaa pwd='xxxxxxxxxxx' datasrc=pppp);
** All Edit checks **;
Execute(select dbo.fnlds(projectname, 'eng') as Project, CRFDrafts.ProjectId, CRFDrafts.CrfdraftId
into #tmpDrafts
from projects
inner join CRFdrafts on CrfDrafts.projectId = projects.projectid
) by sqlsvr;


create table mmnecdl2 as select *
from connection to sqlsvr
(
Select Draftchecks.CRFDraftId as CRFDraftId, ProjectId, Isvalid, Draftchecks.DraftCheckName as DraftCheckName, Project, created
from #tmpDrafts
inner Join Draftchecks on Draftchecks.crfdraftid = #tmpDrafts.crfdraftid
and isvalid = 1
and created >= "&startdt"

order by Project
);
1 REPLY 1
Doc_Duke
Rhodochrosite | Level 12
I don't know the answer, but I have suspicions. Under Unix, SAS/Access to SQL/Server actually runs against an ODBC third-party add-on. Your support group may have changed the ODBC product that they are using in Unix. Are the 9.1 and 9.2 versions of SAS on the same physical box? There are a lot of moving parts to get from Unix to SQL/Server, so it could be something else has changed. From the 9.2 documentation,

"SAS/ACCESS Interface to Microsoft SQL Server has been tested and certified against Data Direct Technologies Connect ODBC and Data Direct SequeLink ODBC products"

It could also be that the new environment does not support all of the features that the old one did.

My first effort at debugging the problem would be to see if I could run any query against the database, as you are using fairly advanced features in the first query.

Doc Muhlbaier
Duke

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 1 reply
  • 701 views
  • 0 likes
  • 2 in conversation