Showing posts with label ive. Show all posts
Showing posts with label ive. Show all posts

Wednesday, March 21, 2012

Find the newest date of 2 date fields

I've 2 date fields clidlp,clidlc in my data base table. How do I find the newest dates between the fields? Thanks for your help!

Hello, you can use a CASE statement in your SQL Query

Eample:
SELECT CASE WHEN clidlp > clidlc THEN clidlp ELSE clidlc END AS NewestDate
FROM [Table]

Monday, March 12, 2012

find out tirggers in a DB

Hi,
I've a DB not designed by me. I found that there is a trigger updating
table B when I update table A. I want to disable this trigger but I
don't know the name. Can someone help me? Thanks.
See if this helps you
http://dimantdatabasesolutions.blogspot.com/2007/04/has-table-trigger.html
"klonic" <jaume.pf@.gmail.com> wrote in message
news:1181202534.816813.51310@.m36g2000hse.googlegro ups.com...
> Hi,
> I've a DB not designed by me. I found that there is a trigger updating
> table B when I update table A. I want to disable this trigger but I
> don't know the name. Can someone help me? Thanks.
>
|||Thanks for your help. I found the trigger I was looking for!!! It's
possible to know the code of the trigger?
On Jun 7, 10:04 am, "vt" <vinu.t.1...@.gmail.com> wrote:
> Hi
> Hope you using sql 2000
> SELECT
> name,
> status = CASE WHEN OBJECTPROPERTY (id, 'ExecIsTriggerDisabled') = 0
> THEN 'Enabled' ELSE 'Disabled' END,
> Table_name = OBJECT_NAME (parent_obj)
> FROM
> sysobjects
> WHERE
> type = 'TR'
> the above select returns all the triggers in the database.
> then use the ALTER TABLE to disable the trigger
> --
> VT
> Knowledge is power, share it...http://oneplace4sql.blogspot.com/"klonic" <jaume...@.gmail.com> wrote in message
> news:1181202534.816813.51310@.m36g2000hse.googlegro ups.com...
>
>
> - Show quoted text -
|||On Jun 7, 1:47 pm, "vt" <vinu.t.1...@.gmail.com> wrote:
> Hi
> sp_helptext triggername
> See bol for more info
> regards
> VT
> Knowledge is power, share it...http://oneplace4sql.blogspot.com/"klonic" <jaume...@.gmail.com> wrote in message
> news:1181205063.304596.159350@.p47g2000hsd.googlegr oups.com...
>
>
>
>
>
>
> - Show quoted text -
select object_definition(object_id(<trigger name>))
sp_helptext <table name>
select definition from sys.sql_modules where object_id =
object_id(<trigger name>)
|||Thanks to everybody for your help! With your posts and some
imagination i solved out the problem!
C U!
On Jun 7, 4:52 pm, amish <shahami...@.gmail.com> wrote:
> On Jun 7, 1:47 pm, "vt" <vinu.t.1...@.gmail.com> wrote:
>
>
>
>
>
>
>
>
>
>
> select object_definition(object_id(<trigger name>))
> sp_helptext <table name>
> select definition from sys.sql_modules where object_id =
> object_id(<trigger name>)- Hide quoted text -
> - Show quoted text -

Friday, March 9, 2012

Find out how much data was replicated

Hi
I use SQL Servers 2000 SP3 on Windows 2000 Advanced Server
SP4. I've set up a transactional replication w/o updating
between two servers, one of which is a publisher and the
other is a distributor/pull-subscriber. I wonder if SQL
Server has means of finding out how much data was
replicated (i.e. sent to the subscriber), say, during the
day. If it hasn't, are there any third-party tools, which
would allow me to do this?
Many thanks,
Osk
check the replication monitor in EM it will display a "gross" level of
information processed by article published.
"Osk" wrote:

> Hi
> I use SQL Servers 2000 SP3 on Windows 2000 Advanced Server
> SP4. I've set up a transactional replication w/o updating
> between two servers, one of which is a publisher and the
> other is a distributor/pull-subscriber. I wonder if SQL
> Server has means of finding out how much data was
> replicated (i.e. sent to the subscriber), say, during the
> day. If it hasn't, are there any third-party tools, which
> would allow me to do this?
> --
> Many thanks,
> Osk
>
|||Hi
What do you mean by "gross" level? I need to know how much
bytes were delivered to the subscriber during a time interval.
Thanks,
Osk

>--Original Message--
>check the replication monitor in EM it will display a
"gross" level of
>information processed by article published.
>"Osk" wrote:
>.
>

Wednesday, March 7, 2012

Find floats with exponential notation

I'm having trouble identifying a column that is a float data type that uses
exponential notation. I've tried Casting and Converting to various data
types in order to find the 'E' but the 'E' never comes through. Is there a
better way to identify any float that displays with exponential notation?
TIA
Matt
The float column is stored as a binary number with a binary exponent.
It may be displayed with an E, but this is simply the way the front
end shows it. Internally there is no E.
The size at which a float is displayed using the E notation is built
into the front end program performing the display. It is not an
attribute of SQL Server.
Roy Harvey
Beacon Falls, CT
On Wed, 15 Aug 2007 10:57:21 -0400, "Matt Williamson"
<ih8spam@.spamsux.org> wrote:

>I'm having trouble identifying a column that is a float data type that uses
>exponential notation. I've tried Casting and Converting to various data
>types in order to find the 'E' but the 'E' never comes through. Is there a
>better way to identify any float that displays with exponential notation?
>TIA
>Matt
>
|||> The size at which a float is displayed using the E notation is built
> into the front end program performing the display. It is not an
> attribute of SQL Server.
I understand that, but I still need to identify those that display using exp
notation. What is the internal mechanism that causes SQL server to display
the number as exponential? In our case it is negative numbers with a decimal
and a leading 0. The issue I'm facing is that someone queried a table,
copied and pasted the results into a text file and imported the data into a
program. The columns that had exponential notation are off by 2-3 decimal
places because of that. There were probably a hundred thousand rows
extracted and the data was heavily manipulated prior to the import. There
are relatively few rows that had the data in exp notation but they have a
major effect on the dataset. It would be much easier to re-query the data
and cast it to varchar or decimal and just extract and import those rows
instead of trying to do the whole thing (which was about a weeks worth of
work) again but in order to do that, I need a way to identify the rows where
that field is exponential notation. So, if there is ANY way to determine if
a float will display using exponential notation, I'd really like to know
how. If anyone has other suggestions on how to handle this situation whether
it be SQL or otherwise, I'm open to suggestions.
TIA
Matt
|||If you use a client that displays floats in scientific notation (which
is quite common), and this notation is a problem, then you shouldn't use
float.
One way to do that, is to create a view that casts the float to a
decimal, and instruct your users / applications to use that view (and/or
disallow selects from the base table).
As mentioned by Roy, the value that is transferred to the client does
not contain an "E".
Gert-Jan
Matt Williamson wrote:
>
> I understand that, but I still need to identify those that display using exp
> notation. What is the internal mechanism that causes SQL server to display
> the number as exponential? In our case it is negative numbers with a decimal
> and a leading 0. The issue I'm facing is that someone queried a table,
> copied and pasted the results into a text file and imported the data into a
> program. The columns that had exponential notation are off by 2-3 decimal
> places because of that. There were probably a hundred thousand rows
> extracted and the data was heavily manipulated prior to the import. There
> are relatively few rows that had the data in exp notation but they have a
> major effect on the dataset. It would be much easier to re-query the data
> and cast it to varchar or decimal and just extract and import those rows
> instead of trying to do the whole thing (which was about a weeks worth of
> work) again but in order to do that, I need a way to identify the rows where
> that field is exponential notation. So, if there is ANY way to determine if
> a float will display using exponential notation, I'd really like to know
> how. If anyone has other suggestions on how to handle this situation whether
> it be SQL or otherwise, I'm open to suggestions.
> TIA
> Matt
|||There is no single answer because this is not done by SQL Server but
by whatever front-end program processes the result of the SELECT.

>The issue I'm facing is that someone queried a table,
>copied and pasted the results into a text file and imported the data into a
>program. The columns that had exponential notation are off by 2-3 decimal
>places because of that.
All I can suggest is find out what tool that person used, along with
whatever configuration settings were in place, and experiment until
you understand what that tool does to display exponential data. If
they repeat that very first step perhaps you can pick the problems out
there.
Roy Harvey
Beacon Falls, CT
On Wed, 15 Aug 2007 13:19:47 -0400, "Matt Williamson"
<ih8spam@.spamsux.org> wrote:

>I understand that, but I still need to identify those that display using exp
>notation. What is the internal mechanism that causes SQL server to display
>the number as exponential? In our case it is negative numbers with a decimal
>and a leading 0. The issue I'm facing is that someone queried a table,
>copied and pasted the results into a text file and imported the data into a
>program. The columns that had exponential notation are off by 2-3 decimal
>places because of that. There were probably a hundred thousand rows
>extracted and the data was heavily manipulated prior to the import. There
>are relatively few rows that had the data in exp notation but they have a
>major effect on the dataset. It would be much easier to re-query the data
>and cast it to varchar or decimal and just extract and import those rows
>instead of trying to do the whole thing (which was about a weeks worth of
>work) again but in order to do that, I need a way to identify the rows where
>that field is exponential notation. So, if there is ANY way to determine if
>a float will display using exponential notation, I'd really like to know
>how. If anyone has other suggestions on how to handle this situation whether
>it be SQL or otherwise, I'm open to suggestions.
>TIA
>Matt
>

Sunday, February 26, 2012

find an article

There was an article that Ive come across and not even aware of what issue
it pertains to..
All i remember is that it talks about perfmon and based upon the ecid value
or something like that in sysprocesses, it then states to go to the thread
counter. It was pretty interesting and it was to debug something.. Does
anyone recollect this ? Not too sure if i read it at the
sql-server-performance.com site or someplace else...
maybe from the Online Seminar from PSS below
http://support.microsoft.com/default...b;en-us;838622
http://support.microsoft.com/default...Fwct041504.asp
Andy
"Hassan" <fatima_ja@.hotmail.com> wrote in message
news:e%23rJovGYEHA.2944@.TK2MSFTNGP11.phx.gbl...
> There was an article that Ive come across and not even aware of what issue
> it pertains to..
> All i remember is that it talks about perfmon and based upon the ecid
value
> or something like that in sysprocesses, it then states to go to the thread
> counter. It was pretty interesting and it was to debug something.. Does
> anyone recollect this ? Not too sure if i read it at the
> sql-server-performance.com site or someplace else...
>
>

find an article

There was an article that Ive come across and not even aware of what issue
it pertains to..
All i remember is that it talks about perfmon and based upon the ecid value
or something like that in sysprocesses, it then states to go to the thread
counter. It was pretty interesting and it was to debug something.. Does
anyone recollect this ? Not too sure if i read it at the
sql-server-performance.com site or someplace else...maybe from the Online Seminar from PSS below
http://support.microsoft.com/default.aspx?scid=kb;en-us;838622
http://support.microsoft.com/default.aspx?scid=%2Fservicedesks%2Fwebcasts%2Fen%2Ftranscripts%2Fwct041504.asp
Andy
"Hassan" <fatima_ja@.hotmail.com> wrote in message
news:e%23rJovGYEHA.2944@.TK2MSFTNGP11.phx.gbl...
> There was an article that Ive come across and not even aware of what issue
> it pertains to..
> All i remember is that it talks about perfmon and based upon the ecid
value
> or something like that in sysprocesses, it then states to go to the thread
> counter. It was pretty interesting and it was to debug something.. Does
> anyone recollect this ? Not too sure if i read it at the
> sql-server-performance.com site or someplace else...
>
>

find an article

There was an article that Ive come across and not even aware of what issue
it pertains to..
All i remember is that it talks about perfmon and based upon the ecid value
or something like that in sysprocesses, it then states to go to the thread
counter. It was pretty interesting and it was to debug something.. Does
anyone recollect this ? Not too sure if i read it at the
sql-server-performance.com site or someplace else...maybe from the Online Seminar from PSS below
http://support.microsoft.com/defaul...kb;en-us;838622
ranscripts%2Fwct041504.asp" target="_blank">http://support.microsoft.com/defaul...2Fwct041504.asp
Andy
"Hassan" <fatima_ja@.hotmail.com> wrote in message
news:e%23rJovGYEHA.2944@.TK2MSFTNGP11.phx.gbl...
> There was an article that Ive come across and not even aware of what issue
> it pertains to..
> All i remember is that it talks about perfmon and based upon the ecid
value
> or something like that in sysprocesses, it then states to go to the thread
> counter. It was pretty interesting and it was to debug something.. Does
> anyone recollect this ? Not too sure if i read it at the
> sql-server-performance.com site or someplace else...
>
>