The Community is now in read-only mode to prepare for the launch of the new Flexera Community. During this time, you will be unable to register, log in, or access customer resources. Click here for more information.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

add column on the result of the business adapter

tallal85
By
Level 6

Hi,

With a sql query I connected my business adapter to a database to list the users.
and after that, I want to add a column in my result of the business adapter with the name of a license.

I test with "add column" but i have an error message.

Regards,

 

(1) Solution

ChrisG
By Level 20 Flexeran
Level 20 Flexeran

First of all, "GO" is not a Transact-SQL statement, so you can't include that in your query text. ("GO" is a command used in interactive tools like SQL Server Management Studio to send batches of commands to SQL server.)

Secondly, you can only include a single "SELECT" statement in the adapter's query field to retrieve data to be imported. If you want to execute other direct SQL statements during the import process after to be imported data has been retrieved, you should add a custom object in your adapter

Thirdly,  "ADD COLUMN" is not a Transact-SQL statement either. I suspect you are meaning to use the "ALTER TABLE" statement. For example:

ALTER TABLE #ECMImport_YourImportName
ADD COLUMN licensename NVARCHAR(256)

 

(Did my reply solve the question? Click "ACCEPT AS SOLUTION" to help others find answers faster. Liked something? Click "KUDO". Anything expressed here is my own view and not necessarily that of my employer, Flexera.)

View solution in original post

(3) Replies

JJacildo
By Level 6 Flexeran
Level 6 Flexeran

Hi, will you be able to post the error message you are getting?

yes here is the error message

ChrisG
By Level 20 Flexeran
Level 20 Flexeran

First of all, "GO" is not a Transact-SQL statement, so you can't include that in your query text. ("GO" is a command used in interactive tools like SQL Server Management Studio to send batches of commands to SQL server.)

Secondly, you can only include a single "SELECT" statement in the adapter's query field to retrieve data to be imported. If you want to execute other direct SQL statements during the import process after to be imported data has been retrieved, you should add a custom object in your adapter

Thirdly,  "ADD COLUMN" is not a Transact-SQL statement either. I suspect you are meaning to use the "ALTER TABLE" statement. For example:

ALTER TABLE #ECMImport_YourImportName
ADD COLUMN licensename NVARCHAR(256)

 

(Did my reply solve the question? Click "ACCEPT AS SOLUTION" to help others find answers faster. Liked something? Click "KUDO". Anything expressed here is my own view and not necessarily that of my employer, Flexera.)