Showing posts with label missing. Show all posts
Showing posts with label missing. Show all posts

Wednesday, March 21, 2012

Query Tool from SQL Server 2K Missing in 2k5 Edition?

My favorite tool ever in SQL 2000 was a little utility, a front end if you will for querying the system tables. It was under the tools menu and if you typed say 'account', you could find all objects containing the name 'account'- stored procs, tables, columns, etc. A GREAT little tool that few people seemed to use. Now I have 2K5, can't remember its proper name to google it by, and can't seem to find it anywhere, though I suspect it is burried somewhere.

Anyone seen this one in SQL 2K and remember its name, or better yet, seen it in 2K5 and can point me there?

Thanks in advance,

Jeff

Moving the thread to the Tools forum.|||I think you are thinking of object search, this is currently not part of the SQL Server 2005 toolset.|||

Yep, that's the one...

Object Search. Dang I used that a lot, too bad they left it out of 2k5.

Do you happen to know is there anything similar in 2k5 to get the job done or is it down the querying the systables manually?

Thanks,

Jeff

sql

Query Tool from SQL Server 2K Missing in 2k5 Edition?

My favorite tool ever in SQL 2000 was a little utility, a front end if you will for querying the system tables. It was under the tools menu and if you typed say 'account', you could find all objects containing the name 'account'- stored procs, tables, columns, etc. A GREAT little tool that few people seemed to use. Now I have 2K5, can't remember its proper name to google it by, and can't seem to find it anywhere, though I suspect it is burried somewhere.

Anyone seen this one in SQL 2K and remember its name, or better yet, seen it in 2K5 and can point me there?

Thanks in advance,

Jeff

Moving the thread to the Tools forum.|||I think you are thinking of object search, this is currently not part of the SQL Server 2005 toolset.|||

Yep, that's the one...

Object Search. Dang I used that a lot, too bad they left it out of 2k5.

Do you happen to know is there anything similar in 2k5 to get the job done or is it down the querying the systables manually?

Thanks,

Jeff

Tuesday, March 20, 2012

Query to return count of items missing every hour

Hello,
I have been trying to work on a query to return the amount of entries
that are not in each hour. There is a problem with the syncronisation
between our databases and I want to find a pattern, in the hours or in
the tags on what is not syncronising. In one DB (primary) I have the
full 6000 records, per hour, over the span of a weekend the backup
site was short about 200 records.
An example of the tables is
TableA TableB
tagId tagName tagId
gmt_time(hourly)
PK composite PK
approx 6000 records approx 6000 every hour
So essentially I would like to see if anyone would know a query that
would group by the hours and return which tags were not present in
that hour.
Thank you in advance for any help.
Andy McDonagh
select tagid, datepart(d, gmt_time) as dy, datepart(hh, gmt_time) as hr
from tablea a (nolock)
where not exists (select * from tableb b (nolock) where a.tagid = b.tagid)
group by datepart(d, gmt_time), datepart(hh, gmt_time)
TheSQLGuru
President
Indicium Resources, Inc.
<mcdonaghandy@.gmail.com> wrote in message
news:1184775962.160779.8450@.x35g2000prf.googlegrou ps.com...
> Hello,
> I have been trying to work on a query to return the amount of entries
> that are not in each hour. There is a problem with the syncronisation
> between our databases and I want to find a pattern, in the hours or in
> the tags on what is not syncronising. In one DB (primary) I have the
> full 6000 records, per hour, over the span of a weekend the backup
> site was short about 200 records.
> An example of the tables is
> TableA TableB
> tagId tagName tagId
> gmt_time(hourly)
> PK composite PK
> approx 6000 records approx 6000 every hour
> So essentially I would like to see if anyone would know a query that
> would group by the hours and return which tags were not present in
> that hour.
> Thank you in advance for any help.
> Andy McDonagh
>

Query to return count of items missing every hour

Hello,
I have been trying to work on a query to return the amount of entries
that are not in each hour. There is a problem with the syncronisation
between our databases and I want to find a pattern, in the hours or in
the tags on what is not syncronising. In one DB (primary) I have the
full 6000 records, per hour, over the span of a weekend the backup
site was short about 200 records.
An example of the tables is
TableA TableB
tagId tagName tagId
gmt_time(hourly)
PK composite PK
approx 6000 records approx 6000 every hour
So essentially I would like to see if anyone would know a query that
would group by the hours and return which tags were not present in
that hour.
Thank you in advance for any help.
Andy McDonaghselect tagid, datepart(d, gmt_time) as dy, datepart(hh, gmt_time) as hr
from tablea a (nolock)
where not exists (select * from tableb b (nolock) where a.tagid = b.tagid)
group by datepart(d, gmt_time), datepart(hh, gmt_time)
TheSQLGuru
President
Indicium Resources, Inc.
<mcdonaghandy@.gmail.com> wrote in message
news:1184775962.160779.8450@.x35g2000prf.googlegroups.com...
> Hello,
> I have been trying to work on a query to return the amount of entries
> that are not in each hour. There is a problem with the syncronisation
> between our databases and I want to find a pattern, in the hours or in
> the tags on what is not syncronising. In one DB (primary) I have the
> full 6000 records, per hour, over the span of a weekend the backup
> site was short about 200 records.
> An example of the tables is
> TableA TableB
> tagId tagName tagId
> gmt_time(hourly)
> PK composite PK
> approx 6000 records approx 6000 every hour
> So essentially I would like to see if anyone would know a query that
> would group by the hours and return which tags were not present in
> that hour.
> Thank you in advance for any help.
> Andy McDonagh
>

Query to return count of items missing every hour

Hello,
I have been trying to work on a query to return the amount of entries
that are not in each hour. There is a problem with the syncronisation
between our databases and I want to find a pattern, in the hours or in
the tags on what is not syncronising. In one DB (primary) I have the
full 6000 records, per hour, over the span of a weekend the backup
site was short about 200 records.
An example of the tables is
TableA TableB
tagId tagName tagId
gmt_time(hourly)
PK composite PK
approx 6000 records approx 6000 every hour
So essentially I would like to see if anyone would know a query that
would group by the hours and return which tags were not present in
that hour.
Thank you in advance for any help.
Andy McDonaghselect tagid, datepart(d, gmt_time) as dy, datepart(hh, gmt_time) as hr
from tablea a (nolock)
where not exists (select * from tableb b (nolock) where a.tagid = b.tagid)
group by datepart(d, gmt_time), datepart(hh, gmt_time)
TheSQLGuru
President
Indicium Resources, Inc.
<mcdonaghandy@.gmail.com> wrote in message
news:1184775962.160779.8450@.x35g2000prf.googlegroups.com...
> Hello,
> I have been trying to work on a query to return the amount of entries
> that are not in each hour. There is a problem with the syncronisation
> between our databases and I want to find a pattern, in the hours or in
> the tags on what is not syncronising. In one DB (primary) I have the
> full 6000 records, per hour, over the span of a weekend the backup
> site was short about 200 records.
> An example of the tables is
> TableA TableB
> tagId tagName tagId
> gmt_time(hourly)
> PK composite PK
> approx 6000 records approx 6000 every hour
> So essentially I would like to see if anyone would know a query that
> would group by the hours and return which tags were not present in
> that hour.
> Thank you in advance for any help.
> Andy McDonagh
>

Query to obtain missing number

I've been trying to figure out how to create a query that would list the missing numbers between a high and low number for a field. For example, If I have the recordset below:

1
3
4
6
7
9

I'd like the resulting recordset to be:

2
5
8

Is there a way to achieve this? Thanks, Jason.Yes, there are several ways.

What have you covered so far in class?

-PatP|||In Class? I'm not taking a class. I know the programming language fairly well, I just cannot figure this one out. Can you give me a quick example? Thanks, Jason.|||There are multiple ways to do this. Probably the simplest is to create a "numbers" table with one row for every interesting (possible) value that a number might have. For a two byte integer, this range could be -32768 through 32767. Once you've got the numbers table, you can do a simple exists test, something like:SELECT n.val
FROM numbers AS n
WHERE NOT EXISTS (SELECT *
FROM myRecordset AS r
WHERE r.val = n.val)Of course you'd also need to limit the result to just the values of interest in this case (between the Min and Max values already in your recordset).

-PatP|||I had thought of this, the problem is, I cannot create another table. I'm using Foxpro with a proprietary program which will not allow non-program specific tables to be used in conjunction with it's own. I need to find a different way. Thanks for the post though!!|||I had thought of this, the problem is, I cannot create another table. I'm using Foxpro with a proprietary program which will not allow non-program specific tables to be used in conjunction with it's own. I need to find a different way. Thanks for the post though!!|||I had thought of this, the problem is, I cannot create another table. I'm using Foxpro with a proprietary program which will not allow non-program specific tables to be used in conjunction with it's own. I need to find a different way. Thanks for the post though!!|||I had thought of this, the problem is, I cannot create another table. I'm using Foxpro with a proprietary program which will not allow non-program specific tables to be used in conjunction with it's own. I need to find a different way. Thanks for the post though!!|||Does Foxpro support recursive queries? If so, you could recursively increment an integer up to some limit and exclude the non-qualifying rows.