How do I use OUTER JOIN to email different message than the default
I have a devotional that goes out daily from a MOBILE table containing:
mob_id
calendardate
title
scripture
body
The same devotional goes out to 3 different churches.
I have a second TABLE called EDITED that holds an edited version of the daily devotional, containing:
edit_id
calendardate
etitle
escripture
ebody
The query should look in the edited table for a devotional first to see if it matches the current date then send it out. Otherwise it sends out the default devotional that corresponds with the current date.
I would like to send out in replacement of the default devotional to the church that edited the devotional.
I am using the following outer Join but it doesn’t work. It sends the same devotional to everybody.
<cfoutput>
<cfloop query="getClients">
<!--- determine if there is an edited version of the devotional available for this day --->
<cfquery name="getDevotional" datasource="#application.dsn#">
SELECT mobile.mob_id, mobile.display_date, mobile.title, mobile.body, mobile.scripture,edited.edit_id,edited.contact_id,edited.etitle,edited.escripture,edited. ebody
FROM mobile
left outer join edited ON mobile.display_date = edited.display_date
where mobile.display_date = <cfqueryparam value ="#dateformat(now(), "YYYY-MM-DD")#" cfsqltype="cf_sql_date">
</cfquery>
What am I missing?
Yes the getClients grabs all information pertaining to the client and their layout information.
<cfquery name="getClients" datasource="#application.dsn#">
select *
from (subscriber INNER JOIN contacts ON subscriber.contact_id = contacts.contact_id)INNER JOIN layout ON contacts.contact_id = layout.contact_id
where subscriber.timezone = 3
</cfquery>
Below is the logic I used to determine which version to use:
<cfif getDevotional.edit_id NEQ "">#GetDevotional.etitle#<cfelse>#GetDevotional.title#</cfif>
Similar Messages
-
How should i setup my Alias iCloud email to be my the DEFAULT email?
Is there is a way to setup my Alias iCloud email to be my the defualt email?
Please advice
Thank you in advanceThank you Roger for your quick responde, really appreciate it, however; this is not actually what am looking for, it helps though.
Lets say for example that you create a new iCloud account and called ([email protected]) then later on, you created an Alias for that account and called ([email protected]).
Now, the ([email protected]) is your default email account which you use to login through iClould.com, restore your i device and so on, however; you can't use your Alias email ([email protected]) for this things, because basically its not your default account.
My question is, how should i setup ([email protected]) to replace ([email protected]) to be my default iCloud account? -
How do I use "Generate" to produce multiple file formats from the "Default" layer?
I have a Photoshop file with ~50 layers, each with unique file names for images I want to create. I want to produce in both .png and .svg file formats for each layer.
Rather than adding the code to each layer individually can multiple file formats be assigned on the "Default" layer? What is the correct syntax to do that?
Something like:
default 100% .png, svg/ *.svg
... to generate the .png versions and then also create a folder called "svg" that contains all the .svg versions of those images?Dear Thomas,
I entered TM and found the sparsebundle under the Filesync library. However, it appears NOT to be recoverable and I tried double clicking on it but it doesnt do anything other than show a summary of what it is.
By the way, I really do appreciate your comments and agree completely. Something strange happened with my syncing of Idisk (which is set to "automatic"). It has been working fine for years. But for some reason, it stopped two days ago and did not let me know. When I tried to put something manually on it (through drag/drop), it never showed up on the Idisk on the cloud which made me notice and check it out by going to Mobileme through the browser. I then went to the tech service for Idisk and they explained that something probably got corrupted so just hit STOP syncing and then hit Automatic again. Which is what I did. Then everything from the cloud went to my Idisk on my computer and for some reason, the latest version of my excel spread sheet for attendance showed two days ago, not last night. so I lost wed/thursday classes. I KNOW it was on my Laptop which is backed up to TM every morning.. Thats why I believe that the latest file IS on my TM backup for this morning. But I can't get to it. Any other help would be appreciated.
Skip -
How to set up ical to send email AND message alerts by default
How do I set up iCal to send me an email alert and a message with sound 15 minutes before the event by default so that I don't have to remember to do this everytime I add an event in iCal (which by the way I can't remember)?
Thanks for your help.Why not search for iPhone setup instructions on these forums? I have posted exact step by step instructions or configuration summaries at least three times in the past 6 months on this topic.
Here's one ....
http://forums.verizon.com/t5/Verizon-net-Email/Itouch-is-connected-but-can-t-get-email-to-work-from-...
The above one specifically deals with Verizon mail via the Yahoo portal. For Verizon regular mail you would modify as follows:
POP Account Information
Name: Joe User
Address: [email protected]
Description: Verizon
Incoming Mail Server
Host Name: incoming.verizon.net
User Name: [email protected]
Password: ******
Outgoing Mail Server
SMTP outgoing.yahoo.verizon.net ->
Primary Server ->
Host Name: outgoing.verizon.net
User Name: [email protected]
Password: ******
Use SSL: Off
Authentication: Password
Server Port: 587
Advanced
Deleted Message
Remove: After One Week
Incoming Settings
Use SSL: Off
Authentication: Password
Delete from server: Never
Server Port: 110 -
Using applescript to print from printers other than the default
Hi
I have this script to print from Quark which works fine:
tell application "QuarkXPress"
tell print setup of document 1
set separation to false
set printer type to "HP Laserjet 8150 Series"
set paper size to "A3"
set orientation to portrait
set bleed to "3"
set page position to center horizontal
set print spreads to false
set reduce or enlarge to "100%"
set registration marks to centered
set tiling to off
end tell
print document 1
end tell
It works fine but if I change my default printer to something else eg. our canon colour printer, then the document prints from there instead.
If anyone can help it would be much appreciated
Kind Regards
AndrewThanx Nova Scotian..
Didnt quite work but i got this from another forum which did in case your interested:
tell application "Printer Setup Utility"
set the visible of every window to false
if printer "ExactPrinterName" exists then set current printer to printer "ExactPrinterName"
get current printer -- debugging
if (current printer is not "ExactPrinterName") then display dialog "Please setup your 'ExactPrinterName'!!"
quit
end tell
Of course, ExactPrinterName is the name of the printer you WANT to use as it exists in the Printer Setup list.
Andrew -
How can I sync my ipod to a different computer than the one I originally started it from. My other computer crashed and lost everything there. dont want to loose my pics n music on my ipod.
If you want to get those pics and music off your ipod, you'll need to use an application like senuti:
http://www.fadingred.com/senuti/ -
How to use outer join condition in my below query.
Hi All,
How to use outer join condition in my below query.
In the table APPS_JP.GEDIS_OFFER_HEADER goh I have more records
in the table APPS_JP.GEDIS_ORDER_BUILDS gob I have less number of records.
I want all the records from APPS_JP.GEDIS_OFFER_HEADER goh
including other conditions.
I have tried goh.OFFER_NO=gob.OFFER_NO(+) but same result.
[code]SELECT GOH.ORIG_SYSTEM,
gsp.USER_NAME,
goh.ORDER_NO,
goh.OMEGA_ORDER_NUMBER,
goh.ORDER_TYPE,
gc.CUSTOMER_ID,
gc.OMEGA_CUSTOMER_NUMBER,
CASE WHEN gc.PRIVATE = 'N' THEN gc.CUSTOMER_NAME ELSE '' END
AS COMPANY_NAME,
goh.ORDER_STATUS,
goh.TOTAL_SELLING_PRICE,
goh.TOTAL_MARGIN,
ga1.ADDRESS1
|| ','
|| ga1.ADDRESS2
|| ','
|| ga1.ADDRESS3
|| ','
|| ga1.POSTAL_CODE
|| ','
|| ga1.CITY
AS SHIPPING_ADDRESS,
ga2.ADDRESS1
|| ','
|| ga2.ADDRESS2
|| ','
|| ga2.ADDRESS3
|| ','
|| ga2.POSTAL_CODE
|| ','
|| ga2.CITY
AS BILLING_ADDRESS,
ga.ADDRESS_ID,
gol.DESCRIPTION,
APPS_JP.TZ.to_local_date (goh.OFFER_DATE, goh.OFFER_DATE_UTC)
AS OFFER_DATE,
gc.LEVEL_8,
goh.NO_OF_BUILDS,
gob.SFDC_ID,
goh.PURCHASE_ORDER_NO AS PO,
gc1.CUSTOMER_NAME AS END_USAGE,
gol.LOB,
goh.TOTAL_MARGIN_PCT,
goh.TOTAL_DISCOUNT,
goh.TOTAL_DISCOUNT_PCT
FROM APPS_JP.GEDIS_OFFER_HEADER goh,
APPS_JP.GEDIS_ORDER_BUILDS gob,
APPS_JP.GEDIS_ORDER_LINES gol,
APPS_JP.GEDIS_OFFER_RELATED_CUSTOMER gorc,
APPS_JP.GEDIS_OFFER_RELATED_CUSTOMER ship,
APPS_JP.GEDIS_OFFER_RELATED_CUSTOMER bill,
APPS_JP.GEDIS_CUSTOMER gc,
APPS_JP.GEDIS_CUSTOMER gc1,
APPS_JP.GEDIS_CONTACT gct,
APPS_JP.GEDIS_ADDRESS ga,
APPS_JP.GEDIS_ADDRESS_NORM ga1,
APPS_JP.GEDIS_ADDRESS_NORM ga2,
(SELECT DISTINCT SALESPERSON_ID, USER_NAME
FROM APPS_JP.GEDIS_SALESPERSON
WHERE SALESPERSON_ID IN
(SELECT TO_NUMBER (COLUMN_VALUE) AS SALESPERSON_ID
FROM TABLE (APPS_GLOBAL.SplitString ('337309'))))
gsp
WHERE goh.ORDER_NO <> 0
AND goh.OFFER_NO <> 0
AND goh.OFFER_NO=gol.OFFER_NO
AND gol.BUILD_NO = 1
AND gol.LINE_NO = 1
AND goh.OFFER_NO=gob.OFFER_NO
AND gob.BUILD_NO = 1
AND goh.OFFER_NO = gorc.OFFER_NO
AND gct.CONTACT_ID = gorc.CONTACT_ID
AND ga.CUSTOMER_ID = gc.CUSTOMER_ID
AND ga.PRIMARY = 'Y'
AND goh.LEAD_SALESPERSON=gsp.SALESPERSON_ID
AND goh.OFFER_NO = ship.OFFER_NO
AND ship.RELATION_TYPE = 'SHIP'
AND ga1.ADDRESS_ID = ship.ADDRESS_ID
AND ga1.CUSTOMER_ID = gc1.CUSTOMER_ID
AND goh.OFFER_NO = bill.OFFER_NO
AND bill.RELATION_TYPE = 'BILL'
AND ga2.ADDRESS_ID = bill.ADDRESS_ID
AND goh.OFFER_DATE BETWEEN APPS_JP.TZ.LOCAL_TO_DB_DATE (
SYSDATE - 30
AND APPS_JP.TZ.LOCAL_TO_DB_DATE (SYSDATE)
AND gorc.RELATION_TYPE = 'BASE'
AND gorc.CUSTOMER_ID = gc.CUSTOMER_ID
AND goh.SALES_CHANNEL = gc.SALES_CHANNEL
AND gc.SALES_CHANNEL = 'SMB'
AND goh.LEAD_SALESPERSON IN (goh.CREATED_BY, goh.LEAD_SALESPERSON)
ORDER BY goh.OFFER_NO;[/code]
Please help me how to use this outer join condition.
Thanks in advance.Hi,
If you want all the rows from goh, then you don't want any conditions like goh.OFFER_NO <> 0.
Make all the joins to goh outer joins, and make all conditions that apply to any tables joined to goh (or to tables joined to them) part of the join condition, like this:
FROM APPS_JP.GEDIS_OFFER_HEADER goh
LEFT OUTER JOIN APPS_JP.GEDIS_ORDER_BUILDS gob ON gob.OFFER_NO = goh.OFFER_NO
AND gob.BUILD_NO = 1
LEFT OUTER JOIN APPS_JP.GEDIS_ORDER_LINES gol ON gol.OFFER_NO = goh.OFFER_NO
AND gol.BUILD_NO = 1
AND gol.LINE_NO = 1
LEFT OUTER JOIN APPS_JP.GEDIS_OFFER_RELATED_CUSTOMER
gorc ...
I hope this answers your question.
If not, post a little sample data (CREATE TABLE and INSERT statements, relevant columns only) for all the tables involved, and the results you want from that data.
Simplify the problem as much as possible. For example, do you really need all those tables to show what the problem is? Of course, you need them in tyour real query, but if you understand a solution that only involves 4 or 5 tables, you'll know how to apply it to any number of tables.
Explain, using specific examples, how you get those results from that data.Always say what version of Oracle you're using (e.g. 11.2.0.2.0).
See the forum FAQ https://forums.oracle.com/message/9362002#9362002 -
How to use outer join on 3 tables
how to use outer join on 3 tables
say tables are mkpf,lips and vbrp
mkpf-xblnr = lips-vbeln
lips-vbeln = vbrp-vgbelrefer following querry
select a~bukrs
a~anln1
a~ord42
a~ord43
b~afabe
b~ndabj
b~kaafa
b~aafag
c~kostl
d~afasl
d~ndjar
d~ndper
into corresponding fields of table gt_master
from ( ( anla as a inner join anlc as b
on abukrs = bbukrs
and aanln1 = banln1
and aanln2 = banln2 )
inner join anlz as c
on abukrs = cbukrs
and aanln1 = canln1
and aanln2 = canln2 )
inner join anlb as d
on abukrs = dbukrs
and aanln1 = danln1
and aanln2 = danln2
where a~bukrs in s_comp. -
How to use outer join in Corelated Update?
Hi,
I am using outer join in correlated update comand. But it is not updating the line which is not retrived from the query. Below is the example.
Update model_table a
Set a.model = (Select b.model_name from parts_table b
where b.model_id (+) = a.model_id)Check the above query and please let me know whether can user like this or not?
ThanksUpdating the values you want through subqueries is tricky. The correlated update should perform okay if the join columns are indexed but updating the correct rows may take some thought.
You might need to add a WHERE clause to the update to use the subquery to only update the rows when the subquery return value is not null - if this is what you want. Something like
Update model_table a
Set a.model = (Select b.model_name from parts_table b
where b.model_id = a.model_id)
where exists (Select b.model_name from parts_table b
where b.model_id = a.model_id)Edited by: riedelme on Jan 4, 2010 5:59 AM -
How to use OUTER JOIN in Oracle Answers Filters?
Hi, I need to have a filter on an 'Oracle Answers' report.
The query from the NQQuery.log appears as below. (I have simplified the SELECT clause here for easy reading)
SELECT t692.enquiry_business_route AS c1,
t692.enquiry_id AS c11, t913.YEAR AS c12,
t913.full_date AS c13, t666.surname AS c14,
t666.post_code AS c15, t855.company_name AS c16,
t983.notes AS c30
FROM
mkt_dw_enev_enhi_dim t983,
mkt_dw_key_partner_dim t855,
mkt_dw_event_type_dim t821,
mkt_dw_customer_dim t666,
mkt_dw_time_dim t913,
mkt_dw_enquiry_event_fact t692
WHERE (
t692.enquiry_id = t983.enqu_id
AND t666.customer_dim_key = t692.customer_dim_key
AND t692.event_date_time_key = t913.time_dim_key
AND TRUNC(t983.event_date)= t913.FULL_DATE
AND t692.event_type = t821.event_type_dim_key
AND t692.key_partner_dim_key = t855.key_partner_dim_key
AND t821.event_type_category = 'RECEIVE_FEE'
AND t913.YEAR = 2009
and t692.enquiry_id = 535986
For the following two lines I would like to have the OUTER JOIN.
AND t692.event_type = t821.event_type_dim_key(+)
AND t821.event_type_category(+) = 'RECEIVE_FEE' (THIS IS THE FILTER CONDITION, AT THE MOMENT IT DOESN'T WORK WITH OUTER JOIN SYMBOL)
Please could you let me know the best way of achieving the above.
Thanks
SrikanthIn the BMM layer in the join condition you will be able to specify the join to be (left, right or full outer join).
You can even add the required table in the LTS(logical table source) and also specify a left, right or full outer join there as well.
There is an interesting work around as mentioned in the below blog to get to the Outer join results with out changing anything in rpd but in Answers.
http://obiee101.blogspot.com/2008/11/obiee-outerjoin-workaround.html
Hope it helps
Thanks
prash -
How do I use p3scan to scan email (Thunderbird) using Clamav? [/b]
How do I use p3scan to scan email (Thunderbird) using Clamav? I followed this http://p3scan.sourceforge.net/readme.html
I searched for hours in Google and in forums looking for a way to get Clamav to scan email using p3Scan?
I have three questions (one question is in two parts) about setting up p3scan to use Clamav to scan for Viruses in incoming & outgoing email:
I now have three questions. One is in two parts:
Question 1)
Within the "/etc/p3scan/p3scan.conf" file there is a line that reads "# username: laitcg#pop.gmail.com:110 host: <url of p3scan machine> port: 8110".
My question is:how does a person find the url of the p3scan machine?
Question 2)
Within the read me file that you sent me (http://p3scan.sourceforge.net/readme.html)
there appears the following:
P3SCAN_USER=mail (clamav, etc...)
iptables -t nat -I PREROUTING -p tcp -i eth0 --dport pop3 -j REDIRECT --to 8110
iptables -t nat -I PREROUTING -p tcp -i eth0 --dport smtp -j REDIRECT --to 8110
iptables -t nat -I PREROUTING -p tcp -i eth0 --dport pop3s -j REDIRECT --to 8110
iptables -t nat -I OUTPUT -p tcp --dport pop3 -m owner --uid-owner $P3SCAN_USER -j ACCEPT
iptables -t nat -I OUTPUT -p tcp --dport pop3 -j REDIRECT --to 8110
My question as it pertains to the above is: Who is the owner and who is the P3SCAN_user?
Question 3)
Within the "/etc/p3scan/p3scan.conf" file there is a paragraph that reads:
"Clam Anti-Virus: http://www.clamav.net
# This program must run as the same user as p3scan is running so that
# it can access the mail files for scanning. Either compile with the
# options --with-user=mail --with-group=mail (if p3scan is using the
# the default user/group of "mail") or change "User" in clamav.conf
# to the user p3scan is running as. If you get a return code other
# than a 0 or 1, see the clamav documentation for the reason.
My question as it pertains to the above is: I installed Clamav years ago, so how do I make it run as user mail?
I would hope that no “Linux Guru” will post something to the effect of “the bash is the answer. Figure it out.” I learned and accomplished a great deal in Linux relative to the fact that I am a laymen whose college education did not encompass networking and computer science. I am asking for help because I cannot help myself.
Thanks in advance to everyone.
If someone could please, please answer the three questions that I've asked above, I would be most grateful.Still not solved
I decided to go with the host: <url of p3scan machine> vs iptables. It seemed easier at the time.
The problem is that everything is written as a bunch of options with no clear direction indicated, unless one has a computer science degree or a strong IT background, and I am lacking in both.
The bottom line is that more I look at p3scan, the more confused and lost I become. Is there an alternative to p3scan that actually has GOOD documentation? I looked at Claws but thanks to the new pacman, 50% of all packages fail checksum test, something for another post.
Can someone walk me through this? If someone would walk me through this, I'd be more than happy to turn it into a step-by-step outline designed for the average user because this is just ludicrous. It has been my experience that good documentation open the door to so much more as it pertains to advancing one's undrstanding and enjoyment of Linux. I know that this p3scan setup would be well within the ability of the average "Arch Linux" if it were written for the laymen.
Please help
Thanks
# username: laitcg host: pop.gmail.com port: 110
# To:
# username: laitcg#pop.gmail.com:110 host: <url of p3scan machine> port: 8110
# default: <none> -
HT1694 How do I log out of my email account to allow someone else to log in
How do I log out of my email account to allow someone else to log in
In mail app, you can remove the account and add theirs in settings>Mail, Calendars,Contacts.
or add theirs only and in mail, go up a level and view each inbox seperately.
The ipad is not designed for multi-user use however so it is not easy. -
How to do left outer join in one-one mapping
I tried to do a left outer join between two tables. I specified
kodo.jdbc.DBDictionary: JoinSyntax=sql92 in kodo.properties. I used
ref-join-type="outer" in the package.mapping. However, I still see Kodo is
translating my queries using inner join. How can I force kodo to use outer
join (or maybe even to use left outer join) when translating my queries?
Thanks.Kodo will automatically use an outer join when eager-fetching a to-one
relation (unless you have set null-value="exception" on the field, in
which case Kodo knows it can use an inner join). There is no need to set
the ref-join type (in fact, that is only for when the foreign key
columns are in a joined table).
When you place criteria on a relation in a query, though, the relation
must exist to satisfy the query. For example, in the filter:
"relation.x == y"
The "relation" field must hold a related object to satisfy the
expression, just as in Java.
If you want the "relation" field to optionally be null, then write your
filter exactly as you would in Java:
"relation == null || relation.x == y"
Kodo will correctly use an outer join in this case because the filter
can be satisfied even when no related object exists. -
TS3899 How do I log OUT of my emails
Hi
New to the I Pad. How do I log out of my emails when using the I Pad. Even though I switch off, when I switch back on again and click on mail, my emails are always there. I can't find anywhere where I need to sign in or sign out? Is this something I should be worried about. On my normal laptop of course, you have to sign in and out so why not on the I Pad.
Any help would be much appreciated.You can't log out of email on iPad.
Passcode protect your iPad. -
How to specify an outer join in query builder
I've very quickly built a large query with the query builder, and it works fine, but only produces 9 out of 2200 records - so I need to change it to an outer join.
My problem is that I can't seem to find a way to specify an outer join. I've tried editing the query that query builder formed, but it won't let me.
I know I can capture the query, edit it and run it in sql developer, and that works fine, but I want to use query builder as it is the fastest way I know of to quickly add and remove items - my users are unsure of exactly what to include.
I know it is kind of a trivial question, but i've searched the forum, the manual, the web and no luck
Thanks for any help you can give
GlennHi Glenn,
When you use the Query Builder to create the sql statement, you should click on the empty square to the right of the fields on each table to create the join. When you've done this, you should see a line drawn between the two tables. Click on this line and a small popup appears allowing you to select inner, left outer or right outer joins.
Once the report has been created, though, you need to edit the statement. For example, if you use the Query Builder to join DEPT to EMP based on the DEPTNO field on both tables, you get:
select "DEPT"."DEPTNO" as "DEPTNO",
"DEPT"."DNAME" as "DNAME",
"DEPT"."LOC" as "LOC",
"EMP"."EMPNO" as "EMPNO",
"EMP"."ENAME" as "ENAME",
"EMP"."JOB" as "JOB",
"EMP"."MGR" as "MGR",
"EMP"."HIREDATE" as "HIREDATE"
from "EMP" "EMP",
"DEPT" "DEPT"
where "DEPT"."DEPTNO"="EMP"."DEPTNO"Change this to:
select "DEPT"."DEPTNO" as "DEPTNO",
"DEPT"."DNAME" as "DNAME",
"DEPT"."LOC" as "LOC",
"EMP"."EMPNO" as "EMPNO",
"EMP"."ENAME" as "ENAME",
"EMP"."JOB" as "JOB",
"EMP"."MGR" as "MGR",
"EMP"."HIREDATE" as "HIREDATE"
from "EMP" "EMP"
LEFT OUTER JOIN "DEPT" "DEPT" ON "DEPT"."DEPTNO"="EMP"."DEPTNO"Andy
Maybe you are looking for
-
Importing footage from JVC camera in FCP6
Hi all, I am working with a JVC Everio HD camera (I think it is the GZ-EX250). I can't find a way to import footage directly into FCP6. It seems the only way to get the footage in there is to import it into iMovie (I have iMovie 8), then export it a
-
JDBC Error: ORA-01000: maximum open cursors exceeded
Post Author: prashant CA Forum: Information OnDemand I successfully created reports using CR4E on windows, deployed JSPS to Websphere running on windows and was able to view a large reports for a using JNDI connection resources to Oracle 10g. Every t
-
Hello All... My name waqas and I own a HP PAVILION15-e053se Laptop couple of months ago. PLEASE CAN ANYBODY CONFIRM THAT MY HP PAVILION 15-s053se Laptop IS COMPATIBLE FOR THE UP-GRADATION OF BACKLIT KEYBOARD, IF COMPATIBLE, DOES ALL THE KEY STROKES
-
SD_VBRK Archiving issue
Hello Archiving Experts, I want to implement archiving for SD_VBRK. I have been given a document which contains billing types and their retention in days. e.g.: YJR as 1460 days Y3R as 9999 days Does any body know any transaction from which t
-
Hello everybody I'm french so excuse me for the way i try to write my question: Can you tel me how to have a good setting for my apogge duet whith logic studio to get a good sound. Thank you http://www.myspace.com/didierledenmat