Re: mySQL select statement [message #252752] |
Thu, 19 July 2007 21:05 |
npadilla
Messages: 9 Registered: July 2007
|
Junior Member |
|
|
can anyone convert this to a pl/sql statement?
SELECT DISTINCT
tbl_batch_step_tool_user_submit.fld_id,
tbl_batch.fld_batch_id AS BatchID,
tbl_batch.fld_name AS `Batch Name`,
tbl_step.fld_name AS Step,
tbl_user.fld_name AS `User Name`,
tbl_user.fld_user_id AS UserID,
tbl_step.fld_step_id,
tbl_batch_step_tool_user_submit.fld_date AS `Date Append`
FROM tbl_batch INNER JOIN tbl_batch_step_tool_user_submit
ON tbl_batch.fld_batch_id =tbl_batch_step_tool_user_submit.fld_batch_id
INNER JOIN tbl_step
ON tbl_batch_step_tool_user_submit.fld_step_id=tbl_step.fld_step_id
INNER JOIN tbl_user
ON tbl_batch_step_tool_user_submit.fld_user_id=tbl_user.fld_user_id
WHERE tbl_batch.fld_ver_id=', "'",ver_id, "'
AND (", where_clause, ' || 'SUBSTR(fld_step_string_series,', var_step,',1) =3
AND tbl_batch_step_tool_user_submit.fld_date< DATE_SUB(NOW(), INTERVAL 2 DAY);');
|
|
|
|
|
|
Re: mySQL select statement [message #252791 is a reply to message #252765] |
Fri, 20 July 2007 00:45 |
skooman
Messages: 913 Registered: March 2005 Location: Netherlands
|
Senior Member |
|
|
Eeeh, strictly speaking, this SQL is not valid as far as I can see. For example the aliases like "AS USER NAME" will not work. Furthermore, something weird is happening in the where clause:
WHERE tbl_batch.fld_ver_id = ', "' ",ver_id, "
'
AND (", where_clause, ' || 'SUBSTR(fld_step_string_series,', var_step,
',1) =3
AND tbl_batch_step_tool_user_submit.fld_date< DATE_SUB(NOW(), INTERVAL 2 DAY);');
Not sure, but maybe something interactive is meant here? Npadilla, we will need to know what you are trying to accomplish in order to help you. Why do you feel this needs to be "converted" to PL/SQL? What are you trying to do?
|
|
|
|
|
Re: mySQL select statement [message #252803 is a reply to message #252791] |
Fri, 20 July 2007 01:12 |
npadilla
Messages: 9 Registered: July 2007
|
Junior Member |
|
|
skooman...
We were given sotred procs that were written in mySQL and we need to convert those programs that could be read in Oracle 10g
Im really not familiar with mySQL that is why im seeking help from you guys... This is indeed a learning experience for me
Hope to hear from u soon
|
|
|
Re: mySQL select statement [message #252808 is a reply to message #252803] |
Fri, 20 July 2007 01:21 |
skooman
Messages: 913 Registered: March 2005 Location: Netherlands
|
Senior Member |
|
|
You state you don't know about MySQL, but to be honest, your knowledge of (Oracle) SQL doesn't seem to be enormous neither. I would suggest reading the manuals first or follow a training, before trying to convert any code.
No offense meant here, honestly trying to help you.
|
|
|
Re: mySQL select statement [message #252811 is a reply to message #252752] |
Fri, 20 July 2007 01:26 |
|
BlackSwan
Messages: 26766 Registered: January 2009 Location: SoCal
|
Senior Member |
|
|
>Im really not familiar with mySQL that is why im seeking help from you guys... This is indeed a learning experience for me
You admit you don't know MYSQL it appears you don't know PLSQL,
so what in the @##$$%^&*() do you know?
|
|
|