Solved

+ in sql

Posted on 2007-11-14
4
1,384 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 142

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 73

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 73

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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Join & Write a Comment

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 …
I remember the day when someone asked me to create a user for an application developement. The user should be able to create views and materialized views and, so, I used the following syntax: (CODE) This way, I guessed, I would ensure that use…
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 shows how to copy an entire tablespace from one database to another database using Transportable Tablespace functionality.

759 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

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now