Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

xtk session write temp table

Avatar

Avatar
Validate 1
Level 2
srikanthr646926
Level 2

Likes

4 likes

Total Posts

23 posts

Correct Reply

1 solution
Top badges earned
Validate 1
Boost 3
Boost 1
Affirm 1
View profile

Avatar
Validate 1
Level 2
srikanthr646926
Level 2

Likes

4 likes

Total Posts

23 posts

Correct Reply

1 solution
Top badges earned
Validate 1
Boost 3
Boost 1
Affirm 1
View profile
srikanthr646926
Level 2

26-03-2018

Update not working when adding data to temp table and Js is not throwing any error but it is updating any tow. Any suggestions

var schemaName = vars.targetSchema.substring(vars.targetSchema.indexOf(":") + 1);

logInfo("Schem name = " +schemaName);

var formatString = function(str) {
   
       blah blah blah..........................
   

    return str;
}

var query = xtk.queryDef.create(
         <queryDef schema={vars.targetSchema} operation="select">
          <select>
            <node expr="@Label"/>
            <node expr="@FullName"/>
            <node expr="@lineNum"/>
          </select>
         </queryDef>);
  
var resultSet = query.ExecuteQuery();
for each (var row in resultSet.enrich5)
{
//instance.vars.Label=formatString(row.@Label);
//logInfo(formatString(resultSet.enrich5.@Label));
xtk.session.Write(<query _operation="update" _key="@lineNum" Label= {formatString(row.@Label)}  xtkschema="temp:enrich5"/>);

}

Replies

Avatar

Avatar
Validate 1
Level 2
srikanthr646926
Level 2

Likes

4 likes

Total Posts

23 posts

Correct Reply

1 solution
Top badges earned
Validate 1
Boost 3
Boost 1
Affirm 1
View profile

Avatar
Validate 1
Level 2
srikanthr646926
Level 2

Likes

4 likes

Total Posts

23 posts

Correct Reply

1 solution
Top badges earned
Validate 1
Boost 3
Boost 1
Affirm 1
View profile
srikanthr646926
Level 2

26-03-2018

typo it is not updating any row,

Avatar

Avatar
Boost 3
Level 2
daniell35335226
Level 2

Likes

4 likes

Total Posts

25 posts

Correct Reply

6 solutions
Top badges earned
Boost 3
Boost 1
Affirm 5
Affirm 3
Affirm 1
View profile

Avatar
Boost 3
Level 2
daniell35335226
Level 2

Likes

4 likes

Total Posts

25 posts

Correct Reply

6 solutions
Top badges earned
Boost 3
Boost 1
Affirm 5
Affirm 3
Affirm 1
View profile
daniell35335226
Level 2

26-03-2018

Hi

Here is working code that I have; maybe this will help:

     xtk.session.Write(&lt;query xtkschema="temp:query" _key="@id" id={id} email={email} status={status} status_description={status_description} date={date} /&gt;)

Let me know if that works.

Dan

Avatar

Avatar
Validate 1
Level 2
srikanthr646926
Level 2

Likes

4 likes

Total Posts

23 posts

Correct Reply

1 solution
Top badges earned
Validate 1
Boost 3
Boost 1
Affirm 1
View profile

Avatar
Validate 1
Level 2
srikanthr646926
Level 2

Likes

4 likes

Total Posts

23 posts

Correct Reply

1 solution
Top badges earned
Validate 1
Boost 3
Boost 1
Affirm 1
View profile
srikanthr646926
Level 2

26-03-2018

It's not working. Can you please let me why there is no reference of querydef variable or operation=update in the above code.

Avatar

Avatar
Validate 1
Level 3
kapilsharma0101
Level 3

Likes

14 likes

Total Posts

52 posts

Correct Reply

18 solutions
Top badges earned
Validate 1
Give Back 5
Give Back 3
Give Back 10
Give Back
View profile

Avatar
Validate 1
Level 3
kapilsharma0101
Level 3

Likes

14 likes

Total Posts

52 posts

Correct Reply

18 solutions
Top badges earned
Validate 1
Give Back 5
Give Back 3
Give Back 10
Give Back
View profile
kapilsharma0101
Level 3

27-03-2018

Hi Srikanth,

Instead of using the xtk.Session.Write, you can use the below statement to update the TempSchema :

sqlExec("update "+vars.tableName +" set abc='0' where bcd="+123);

Let me know if this works.

Regards,

Kapil

Avatar

Avatar
Ignite 1
Level 2
navink386520
Level 2

Like

1 like

Total Posts

21 posts

Correct Reply

0 solutions
Top badges earned
Ignite 1
Validate 1
Give Back 5
Give Back 3
Give Back
View profile

Avatar
Ignite 1
Level 2
navink386520
Level 2

Like

1 like

Total Posts

21 posts

Correct Reply

0 solutions
Top badges earned
Ignite 1
Validate 1
Give Back 5
Give Back 3
Give Back
View profile
navink386520
Level 2

26-06-2020

@kapilsharma0101  is this for ACS for ACC?

@srikanthr646926 @daniell35335226 

 

I am looking for help on ACS