How can i use Variable?

More
1 year 5 months ago - 1 year 5 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: 1 year 5 months ago by Bozik.

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

More
1 year 5 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/ate/options

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

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

More
1 year 5 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
1 year 5 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
1 year 5 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
1 year 5 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.