Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
how to pass an integer array variable in a query
#1
Not Solved
Hi I need to pass an integer array element in a query

I have used the following statement


Code:
Set rs= gDBConnection.execute ( "SELECT CMPGN_DIM_ID   FROM STENCPS01.UDWHIT.CPS_ADVRTSNG_CMPGN_FACT where ADVRTSR_BRAND_DIM_ID in ("&array1(i)&")")

but it shows a run time error as

Error "SELECT CMPGN_DIM_ID FROM STENCPS01.UDWHIT.CPS_ADVRTSNG_CMPGN_FACT where ADVRTSR_BRAND_DIM_ID. "Found "(" at char 98) expecting an identifier found a keyword

Can some one help me to solve this error


Attached Files Image(s)
   
Reply
#2
Not Solved
Looks like there is no syntax error as a Similar query in same format works fine for me
anyways try this

Code:
sqlquery="SELECT CMPGN_DIM_ID FROM STENCPS01.UDWHIT.CPS_ADVRTSNG_CMPGN_FACT where ADVRTSR_BRAND_DIM_ID in ("&array1(i)&")"
Set rs= gDBConnection.execute (sqlquery)


Regards,
Ravi
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Convert the single to an integer Mozza 2 1,254 09-27-2018, 12:36 PM
Last Post: Ankur
  Pass reference to datatable into function smallsteve 2 1,887 09-28-2017, 09:18 PM
Last Post: smallsteve
  Can you please help me in QTP DP to pass the variable name anshika.agarwal 1 2,591 09-04-2014, 06:43 PM
Last Post: anshika.agarwal
Rolleyes Browse object query Hema a newbie 0 1,697 07-22-2014, 08:37 PM
Last Post: Hema a newbie
  SQL Query Issue in QTP rajiv.qtp 1 2,277 11-28-2013, 10:36 AM
Last Post: Jay

Forum Jump:


Users browsing this thread: 3 Guest(s)