How can i use Variable?

More
4 years 2 months ago - 4 years 2 months ago #21754 by Bozik
Hi,
it is possible to use a local variable <username> as field in the record?
thx
Peter

Peter

Product: Visual Importer Enterprise & Active Table Editor
Repository: Microsoft SQL Server - 11.0.2100.60
Windows: Server 2012 Standart 64Bit
Last edit: 4 years 2 months ago by Bozik.

Please Log in or Create an account to join the conversation.

More
4 years 2 months ago #21755 by admin
Replied by admin on topic How can i use Variable?
yes it is possible

Here is the list of supported variables

<ATEUserName>
<username> OS user name
<computername>
<datetime>

www.etl-tools.com/wiki/active-table-editor/options/

Mike
ETL Architect
The following user(s) said Thank You: Bozik

Please Log in or Create an account to join the conversation.

More
4 years 2 months ago #21756 by Bozik
Replied by Bozik on topic How can i use Variable?
But when i use it i get the following error:



Peter

Product: Visual Importer Enterprise & Active Table Editor
Repository: Microsoft SQL Server - 11.0.2100.60
Windows: Server 2012 Standart 64Bit
Attachments:

Please Log in or Create an account to join the conversation.

More
4 years 2 months ago #21757 by admin
Replied by admin on topic How can i use Variable?
SQL should be a simple select statement:
EG select * from the table.

In your case, it is a script

Mike
ETL Architect

Please Log in or Create an account to join the conversation.

More
4 years 2 months ago #21758 by Bozik
Replied by Bozik on topic How can i use Variable?
aha .. but that's how it works :silly:
Code:
SET @iUser = 'TEST'; SET @result = lmxdatsk.fRegisterOrder(@iUser); SELECT @result AS IdOrder;

Peter

Product: Visual Importer Enterprise & Active Table Editor
Repository: Microsoft SQL Server - 11.0.2100.60
Windows: Server 2012 Standart 64Bit

Please Log in or Create an account to join the conversation.

More
4 years 2 months ago #21759 by Bozik
Replied by Bozik on topic How can i use Variable?

SQL should be a simple select statement:
EG select * from the table.

The same error when I use a simple query with a variable ..
Code:
SELECT * from md_orders Where createdby = <ATEUserName>;

Peter

Product: Visual Importer Enterprise & Active Table Editor
Repository: Microsoft SQL Server - 11.0.2100.60
Windows: Server 2012 Standart 64Bit

Please Log in or Create an account to join the conversation.

Cookies user preferences
We use cookies to ensure you to get the best experience on our website. If you decline the use of cookies, this website may not function as expected.
Accept all
Decline all
Read more
Marketing
Set of techniques which have for object the commercial strategy and in particular the market study.
Google
Accept
Decline
Analytics
Tools used to analyze the data to measure the effectiveness of a website and to understand how it works.
Google Analytics
Accept
Decline
Google Analytics
Accept
Decline
Functional
Tools used to give you more features when navigating on the website, this can include social sharing.
Advertisement
If you accept, the ads on the page will be adapted to your preferences.
Google Ad
Accept
Decline
Save