BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
havmaage
Obsidian | Level 7

Hi Sas, 

when running delete from table thought SQL Passthrough on mssql from OPC batch it errors out 

with ERROR: No data found/modified. 

 

CONNECT TO ODBC AS PASSTHRU
(noprompt="DRIVER={SQL SERVER};DATABASE=&_DB;Trusted_Connection=Yes;SERVER=&_INC;ansiNPW=yes;ansi_null=YES;autotranslate=yes");

    &SQLINI from connection to passThru (
	DELETE FROM SQL.TESTTABLE
	
 );

DISCONNECT FROM passThru;

i have notice that it has been mensioned in the past and there should be a hotfix 

https://support.sas.com/kb/42/537.html

But as for now this is not an option. Does anybody know of any workound to avoid this. 

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
3 REPLIES 3
ChrisNZ
Tourmaline | Level 20

1. What's variable SQLINI ?   You need an execute by  statement here, not a select ... from statement.

havmaage
Obsidian | Level 7
Oh sorry &SQLINI has a text string value (select * from )

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

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
  • 3 replies
  • 1435 views
  • 0 likes
  • 2 in conversation