04-03-2013 11:21 AM
I there. This is part of an auto process program I created. I recently upgraded from 9.1 to 9.3 and I'm having trouble with some queries that used to work just fine. See below for the query and then below the query I have the Error that now occurs in 9.3.
create table get_load as
t.DEAL_OPTION_ID as VHET_SUBDEAL_ID,
t.PRODUCT_ATTRIBUTE as COMPONENT_NAME,
t.BUNDLE_OPTION as BUNDLE_OPTION_FLAG
t.TYPE in ('Pricing Component' 'Value Component') and
t.PRODUCT_ATTRIBUTE in ('ANNUAL_USAGE' 'TERM_LOAD' 'MARGIN' 'TOTAL_COGS' 'BROKER_FEE' 'CONTRACT_PRICE'
'ANNUAL_PEAK' 'REVENUE' 'PORTAL_FEE') and
t.DEAL_OPTION_ID in (&deal_option.) and
t.VERSION_CURRENT_YN = 'Y'
ERROR: PROC SQL requires any created table to have at least 1 column.
The macro variable &deal_option. doesn't seem to be the problem as that was my first guess. I'm not sure why the columns are now the issue.
Just for kicks, this is the macro variable code:
into: deal_option separated by " "
Any ideas guys/gals?
04-03-2013 02:47 PM
Tried it to no avail. I replaced the macro variable with just one of the numeric values it stores and the error is the same. If I take out the Where statement, the query runs, but the table is gigantic.
Also, thank you for your time. It is much appreciated.
04-03-2013 03:03 PM
I would try puting the WHERE statement back line by line until it fails. You should then be able to isolate where the problem lies. To speed up the testing add the INOBS = option to your PROC SQL statement.
04-03-2013 03:07 PM
I appreciate that. The problem doesn't look to be the code. I already attempted the inobs and it's getting hung on the table. I can't read from the table in 9.3.. Sounds like it could be a settings issue between my versions.
04-04-2013 06:46 AM
I think that if the orginal table vhet.dh_subdeal_product_structure was created by SAS 9.1there could be some problems in reading it by SAS 9.3. If it is possible try creating a copy for example in work library by datastep
and try to run the query reading from this copy of your original dataset.