Is there any way to get a SQL query using Microsoft's implementation of JDBC
interfaces/classes?
I know using Oracle, I can type cast a Statement into an OracleStatement and
it has a new method which returns the SQL query associated with that
Statement object
Any way to do this with SQL Server classes?
There isn't any and even if there were I would not recommend using it.
It will make your code dependent on the particular driver/DBMS
combination. If you really-really need to debug something use P6Spy,
but not in a production environment.
Alin,
The jTDS Project.
Showing posts with label implementation. Show all posts
Showing posts with label implementation. Show all posts
Friday, March 23, 2012
getting SQL query from Statement
Labels:
cast,
classesi,
database,
implementation,
jdbcinterfaces,
microsoft,
microsofts,
mysql,
oracle,
query,
server,
sql,
statement,
type
Wednesday, March 7, 2012
getting last 2 months date..but dont have datefield in table
Hi groups,
I forget to declare datefield in my employee table...but now in implementati
on stage...my customer is asking me to list the last two months inserted dat
e from employee table. How i can get the last 2 months inserted rows from a
table which is not having a datefield/time..
Is there any hidden data say inserted datetime etc for each rows ...?
please suggest
--
Mhsh Kumr. R> Is there any hidden data say inserted datetime etc for each rows ...?
No, unless you have a backup from two months ago and can compare it to
today's data...|||Hi
You will not have this information anywhere.
You can tell ur customer that it needs a fix and introduce a new column with
timestamp field atleast now.
u can update the timestamp with previous date or current date.
Or u might be having employee join date, u can fetch data based on that
please let me know if you would like to know anything else
best Regards,
Chandra
http://chanduas.blogspot.com/
http://groups.msn.com/SQLResource/
---
"Maheshkumar.R" wrote:
> Hi groups,
> I forget to declare datefield in my employee table...but now in implementation s
tage...my customer is asking me to list the last two months inserted date from emplo
yee table. How i can get the last 2 months inserted rows from a table which is not h
avi
ng a datefield/time..
> Is there any hidden data say inserted datetime etc for each rows ...?
'
> please suggest
> --
> M?hésh Kum?r|||> introduce a new column with
> timestamp field atleast now.
Just to clarify, DATETIME or SMALLDATETIME (not the poorly-named TIMESTAMP
data type).|||No, no, no. "Time stamp field" is actually a less known painting by Dali.
ML
I forget to declare datefield in my employee table...but now in implementati
on stage...my customer is asking me to list the last two months inserted dat
e from employee table. How i can get the last 2 months inserted rows from a
table which is not having a datefield/time..
Is there any hidden data say inserted datetime etc for each rows ...?
please suggest
--
Mhsh Kumr. R> Is there any hidden data say inserted datetime etc for each rows ...?
No, unless you have a backup from two months ago and can compare it to
today's data...|||Hi
You will not have this information anywhere.
You can tell ur customer that it needs a fix and introduce a new column with
timestamp field atleast now.
u can update the timestamp with previous date or current date.
Or u might be having employee join date, u can fetch data based on that
please let me know if you would like to know anything else
best Regards,
Chandra
http://chanduas.blogspot.com/
http://groups.msn.com/SQLResource/
---
"Maheshkumar.R" wrote:
> Hi groups,
> I forget to declare datefield in my employee table...but now in implementation s
tage...my customer is asking me to list the last two months inserted date from emplo
yee table. How i can get the last 2 months inserted rows from a table which is not h
avi
ng a datefield/time..
> Is there any hidden data say inserted datetime etc for each rows ...?
'
> please suggest
> --
> M?hésh Kum?r|||> introduce a new column with
> timestamp field atleast now.
Just to clarify, DATETIME or SMALLDATETIME (not the poorly-named TIMESTAMP
data type).|||No, no, no. "Time stamp field" is actually a less known painting by Dali.
ML
Subscribe to:
Posts (Atom)