-1

enter image description here enter image description here enter image description here

I want to access the table names from tFileInputDelimited, so how to write SQL squery in tDBInput so that I can able to access the data of that table.please just see the image you can understand, there is SQL query which i have written.

I tried various ways but it's not working.

James Z
  • 12,209
  • 10
  • 24
  • 44
P Pramod
  • 1
  • 1
  • what do you mean by access the table names from tFileInputDelimited ? are you stocking your table names in a csv file ? please show us your file and what your output ? – Amine Ben Khelifa Mar 23 '22 at 08:13
  • It's a txt file contains table_name column, so I am asking how to write SQL query without mentioning the table name. For example select * from (tFileInputDelimited.Table_Name) like that?? – P Pramod Mar 23 '22 at 08:24
  • You have to use a tFileInputRaw order then a tFileInputDelimited . – Amine Ben Khelifa Mar 23 '22 at 08:30
  • link the tFileInputRaw -> tlog and see the result ;) . The tFileInputRaw will return you an object that you have to parse then get the table names the put them in a tSetGlobalVar then yse the global variables in your tDbInput . Hope it helps . you have to give it a try then tell us if you are stack and what you tried – Amine Ben Khelifa Mar 23 '22 at 08:33
  • if you link your tFileInputDelimited -> tlog . what is your output could you mention that in the question ? – Amine Ben Khelifa Mar 23 '22 at 08:41
  • It's showing SQL syntax error for above query you have shared – P Pramod Mar 23 '22 at 09:05
  • Updated my answer , could you get the query i posted and tell me what error you are getting – Amine Ben Khelifa Mar 23 '22 at 09:31
  • It's showing like SQL syntax error, can we use tFixedFlowInput instaed of tfileinputdelimited. In that tFixedFlowInput we can use inline content option – P Pramod Mar 23 '22 at 09:47
  • show the error you are getting and in which component we can not guess the errors here ? update your question and show us – Amine Ben Khelifa Mar 23 '22 at 09:52
  • I have added the picture of error – P Pramod Mar 23 '22 at 10:04
  • if you do this tdbinput -> tlogrow with this query select * from "SYS_BIC"."inbound.ecc.p2r.cs/CV_JEST" . what it will return ? – Amine Ben Khelifa Mar 23 '22 at 10:25
  • in your sap environement what is the query you are using ? select * from "SYS_BIC"."inbound.ecc.p2r.cs/CV_JEST" ??? – Amine Ben Khelifa Mar 23 '22 at 10:26
  • Yes this is the query i use in sap – P Pramod Mar 23 '22 at 10:32
  • try to add a \ before every value in your file \"SYS_BIC\".\"inbound.ecc.p2r.cs/CV_JEST\" and so on – Amine Ben Khelifa Mar 23 '22 at 10:34
  • Please don't post pictures of text, and if you really need to take a picture, learn how to take screenshots. Taking pictures of monitor with a camera is just awful. – James Z Mar 23 '22 at 16:23

1 Answers1

0

try using this query

  "select  * from "+((String)globalMap.get("row2.Table_name"))+"" 

I supposed that your getting the right result from tFileInputDelimited to check that you have to link

tFileInputDelimited -> tLogRow