Solved

+ in sql

Posted on 2007-11-14
4
1,388 Views
Last Modified: 2013-12-19
CAn anyone tell me what does + sign mean in this sql
 "select * from v_costed_events where " +
                                                            "date_of_entry >= to_date(?, 'MM/DD/YYYY') and "+
                                                            "Date_of_entry < to_date(?, 'MM/DD/YYYY') and "+
                                                            "vendor_event_type='CC_adj' and service = 'BREW_01'"
0
Comment
Question by:dgupta70
  • 2
4 Comments
 
LVL 143

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 20283547
that is not SQL itself, but some other coding language that builds up the sql string to be executed dynamically later.


0
 
LVL 74

Expert Comment

by:sdstuber
ID: 20284161
the + is the string concatenation operator for java and many other languages.

If it were sql or pl/sql it would look like this...

'select * from v_costed_events where ' ||
'date_of_entry >= to_date(?, ''MM/DD/YYYY'') and ' ||
'Date_of_entry < to_date(?, ''MM/DD/YYYY'') and ' ||
'vendor_event_type=''CC_adj'' and service = ''BREW_01'''
0
 

Author Comment

by:dgupta70
ID: 20284291
Don't you think it is an outer join?
0
 
LVL 74

Accepted Solution

by:
sdstuber earned 250 total points
ID: 20285139
No

outer joins are designated by  plus sign in parentheses and the plus is to the right
of the column in the outer table.

like this....

select * from a, b where
a.col1 (+) = b.col1

that statement is not standalone sql.  It's a string that will be parsed and executed inside some client software written in some language like java.

0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Truncate is a DDL Command where as Delete is a DML Command. Both will delete data from table, but what is the difference between these below statements truncate table <table_name> ?? delete from <table_name> ?? The first command cannot be …
Checking the Alert Log in AWS RDS Oracle can be a pain through their user interface.  I made a script to download the Alert Log, look for errors, and email me the trace files.  In this article I'll describe what I did and share my script.
This video shows how to copy a database user from one database to another user DBMS_METADATA.  It also shows how to copy a user's permissions and discusses password hash differences between Oracle 10g and 11g.
This video explains what a user managed backup is and shows how to take one, providing a couple of simple example scripts.

820 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question