Hi: Can any one please tell me what i do changes in the query so that
the in clause will be shows with comma when i select multiple location
as right now it is showing in clause like that:
user_view.User_Office_Location in ('PASC|INSS|NYML|FLWP|')
Required in clause
user_view.User_Office_Location in ('PASC','INSS','NYML','FLWP')
and when i select one location then in ('PASC')
I try to use the replace function AssignID = Replace(AssignID, "|",
",") but its not showing the way which i need
ORIGINAL QUERY in the program
SQL = "select distinct(dbtr_view.debtor_id),
dbtr_view.Next_Contact_Date,debt.clt_id, clt_ref_no, name1, name2,
list_date, cur_bal, assign_id, dbtr_view.status_code,
dbtr_view.status_date, dbtr_view.next_contact_date " & _
"From dm.dbtr_view " & _
"left outer join dm.debt on (debt.debt_id =
dbtr_view.debtor_id,0) " & _
"inner join dm.user_view on user_view.user_id =
dbtr_view.assign_id " & _
"left outer join dm.pmt on (dbtr_view.debtor_id =
pmt.debtor_id,0) where "
SQL = SQL & "user_view.User_Office_Location in ('" & AssignID
& "')"
debug.print SQL
select distinct(dbtr_view.debtor_id),
dbtr_view.Next_Contact_Date,debt.clt_id, clt_ref_no, name1, name2,
list_date, cur_bal,
assign_id, dbtr_view.status_code, dbtr_view.status_date,
dbtr_view.next_contact_date From dm.dbtr_view left outer join
dm.debt on (debt.debt_id = dbtr_view.debtor_id,0) inner join
dm.user_view on user_view.user_id = dbtr_view.assign_id left
outer join dm.pmt on (dbtr_view.debtor_id = pmt.debtor_id,0) where
user_view.User_Office_Location in ('PASC|INSS|NYML|FLWP|')
REQUIRED QUERY
select distinct(dbtr_view.debtor_id),
dbtr_view.Next_Contact_Date,debt.clt_id, clt_ref_no, name1, name2,
list_date, cur_bal,
assign_id, dbtr_view.status_code, dbtr_view.status_date,
dbtr_view.next_contact_date From dm.dbtr_view left outer join
dm.debt on (debt.debt_id = dbtr_view.debtor_id,0) inner join
dm.user_view on user_view.user_id = dbtr_view.assign_id left
outer join dm.pmt on (dbtr_view.debtor_id = pmt.debtor_id,0) where
user_view.User_Office_Location in ('PASC','INSS','NYML','FLWP') 1 1167
Why can't you replace "|" with "','" ?
Robin S.
Ts'i mahnu uterna ot twan ot geifur hingts uto.
-----------------------------------------------
"Anna" <co*********@gmail.comwrote in message
news:11*********************@s48g2000cws.googlegro ups.com...
Hi: Can any one please tell me what i do changes in the query so that
the in clause will be shows with comma when i select multiple location
as right now it is showing in clause like that:
user_view.User_Office_Location in ('PASC|INSS|NYML|FLWP|')
Required in clause
user_view.User_Office_Location in ('PASC','INSS','NYML','FLWP')
and when i select one location then in ('PASC')
I try to use the replace function AssignID = Replace(AssignID, "|",
",") but its not showing the way which i need
ORIGINAL QUERY in the program
SQL = "select distinct(dbtr_view.debtor_id),
dbtr_view.Next_Contact_Date,debt.clt_id, clt_ref_no, name1, name2,
list_date, cur_bal, assign_id, dbtr_view.status_code,
dbtr_view.status_date, dbtr_view.next_contact_date " & _
"From dm.dbtr_view " & _
"left outer join dm.debt on (debt.debt_id =
dbtr_view.debtor_id,0) " & _
"inner join dm.user_view on user_view.user_id =
dbtr_view.assign_id " & _
"left outer join dm.pmt on (dbtr_view.debtor_id =
pmt.debtor_id,0) where "
SQL = SQL & "user_view.User_Office_Location in ('" & AssignID
& "')"
debug.print SQL
select distinct(dbtr_view.debtor_id),
dbtr_view.Next_Contact_Date,debt.clt_id, clt_ref_no, name1, name2,
list_date, cur_bal,
assign_id, dbtr_view.status_code, dbtr_view.status_date,
dbtr_view.next_contact_date From dm.dbtr_view left outer join
dm.debt on (debt.debt_id = dbtr_view.debtor_id,0) inner join
dm.user_view on user_view.user_id = dbtr_view.assign_id left
outer join dm.pmt on (dbtr_view.debtor_id = pmt.debtor_id,0) where
user_view.User_Office_Location in ('PASC|INSS|NYML|FLWP|')
REQUIRED QUERY
select distinct(dbtr_view.debtor_id),
dbtr_view.Next_Contact_Date,debt.clt_id, clt_ref_no, name1, name2,
list_date, cur_bal,
assign_id, dbtr_view.status_code, dbtr_view.status_date,
dbtr_view.next_contact_date From dm.dbtr_view left outer join
dm.debt on (debt.debt_id = dbtr_view.debtor_id,0) inner join
dm.user_view on user_view.user_id = dbtr_view.assign_id left
outer join dm.pmt on (dbtr_view.debtor_id = pmt.debtor_id,0) where
user_view.User_Office_Location in ('PASC','INSS','NYML','FLWP') This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: James |
last post by:
My form and results are on one page.
If I use :
if ($Company) {
$query = "Select Company, Contact
From tblworking
Where ID = $Company
Order By Company ASC";
}
|
by: netpurpose |
last post by:
I need to extract data from this table to find the lowest prices of
each product as of today. The product will be listed/grouped by the
name only, discarding the product code - I use...
|
by: Dom Boyce |
last post by:
Hi
First up, I am using MS Access 2002.
I have a database which records analyst rating changes for a list of
companies on a daily basis. Unfortunately, the database has been set
up (by my...
|
by: Andrew McNab |
last post by:
Hi folks,
I have a problem with an MS Access SQL query which is being used in an
Access Report, and am wondering if anyone can help.
Basically, my query (shown below) gets some records from a...
|
by: Steve Patrick |
last post by:
Hi All
You guys are my last hope, despite spending money on books and hours reading
them I still can not achieve the results I need.
I have designed a database in Access 2000 based on 1 table,...
|
by: Alan Lane |
last post by:
Hello world:
I'm including both code and examples of query output. I appologize if
that makes this message longer than it should be.
Anyway, I need to change the query below into a pivot table...
|
by: Takeadoe |
last post by:
Dear NG,
Can someone assist me with writing the little code that is needed to
run an update table query each time the database is opened? From what
I've been able to glean from this group, the...
|
by: mcmahonb |
last post by:
Hey people...
I've been searching this forum for a few hours and even though this topic has been went over from many different angles; I cannot seem to figure out how to make things work on my...
|
by: n |
last post by:
Hello! Here is a problem I hope you can point me to a solution. It
Problem: A teacher needs to know which lesson to teach.
A school has a curriculum with 26 lessons, A-Z.
For a given class,...
|
by: Jo |
last post by:
Hi there,
I'm Jo and it's the first time I've posted here. I'm in process of creating
a database at work and have come a little unstuck.....I'm a bit of a novice
and wondered if anyone could...
|
by: ryjfgjl |
last post by:
ExcelToDatabase: batch import excel into database automatically...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, we are pleased to welcome back...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, we are pleased to welcome back...
|
by: jfyes |
last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
|
by: ArrayDB |
last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
|
by: CloudSolutions |
last post by:
Introduction:
For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
|
by: Shællîpôpï 09 |
last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
|
by: af34tf |
last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
|
by: Faith0G |
last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
| |