Showing posts with label query. Show all posts
Showing posts with label query. Show all posts

Monday, March 26, 2012

Microsoft Query?

I am using Microsoft Query to query against an SQL database and place the data into a pivot table but cannot figure out how to get the preceding 4 days worth of data. I currently am trying to get this to work using the following;

>=#3/13/2007# And <=#3/13/2007 11:59:59 PM#...this works, but i would like this so the report will run without hard coding dates.. i am trying to use this but with no luck.

>=getdate() And <=dateadd(dd,-1,getdate())

any ideas?

I think you need to reverse your logic to the following:

WHERE @.MyDate <= getdate() AND @.MyDate >= dateadd(dd,-1,getdate())

or equally :

WHERE @.MyDate BETWEEN dateadd(dd,-1,getdate()) AND getdate()

The criteria that you specified are impossible to meet.

Chris

Microsoft Query?

i am using the following criteria in the [DateTime] field;

>=#3/9/2007# And <=#3/12/2007 11:59:59 PM#

i am using microsft query and excel to create pivot tables, i created an odbc file to connect to my local server


[DateTime] [TagName] [Value]
2007-03-09 00:00:00.000 PS002_Pump1.Daily_Runtime 1.1833188533782959
2007-03-09 00:00:00.000 PS002_Pump2.Daily_Runtime 1.4499822854995728
2007-03-09 04:59:59.947 PS002_Pump1.Daily_Runtime 0.16666463017463684
2007-03-09 04:59:59.947 PS002_Pump2.Daily_Runtime 0.13333170115947723
2007-03-09 09:59:59.893 PS002_Pump1.Daily_Runtime 0.51666033267974854
2007-03-09 09:59:59.893 PS002_Pump2.Daily_Runtime 0.48332741856575012
2007-03-09 14:59:59.843 PS002_Pump1.Daily_Runtime 0.86665606498718262
2007-03-09 14:59:59.843 PS002_Pump2.Daily_Runtime 0.86665606498718262
2007-03-09 19:59:59.790 PS002_Pump1.Daily_Runtime 1.083320140838623
2007-03-09 19:59:59.790 PS002_Pump2.Daily_Runtime 1.1333194971084595
2007-03-10 05:59:59.683 PS002_Pump1.Daily_Runtime 0.18333110213279724
2007-03-10 05:59:59.683 PS002_Pump2.Daily_Runtime 0.18333110213279724
2007-03-10 10:59:59.630 PS002_Pump1.Daily_Runtime 0.49999389052391052
2007-03-10 10:59:59.630 PS002_Pump2.Daily_Runtime 0.56665974855422974
2007-03-10 15:59:59.577 PS002_Pump1.Daily_Runtime 0.83332318067550659
2007-03-10 15:59:59.577 PS002_Pump2.Daily_Runtime 0.93332195281982422
2007-03-10 20:59:59.527 PS002_Pump1.Daily_Runtime 1.1166530847549438
2007-03-10 20:59:59.527 PS002_Pump2.Daily_Runtime 1.2833176851272583
2007-03-11 07:59:59.420 PS002_Pump1.Daily_Runtime 0.14999817311763763
2007-03-11 07:59:59.420 PS002_Pump2.Daily_Runtime 0.24999694526195526
2007-03-11 12:59:59.367 PS002_Pump1.Daily_Runtime 0.56665974855422974
2007-03-11 12:59:59.367 PS002_Pump2.Daily_Runtime 0.69999146461486816
2007-03-11 17:59:59.317 PS002_Pump1.Daily_Runtime 0.81665670871734619
2007-03-11 17:59:59.317 PS002_Pump2.Daily_Runtime 0.98332130908966064
2007-03-11 22:59:59.263 PS002_Pump1.Daily_Runtime 1.1833188533782959
2007-03-11 22:59:59.263 PS002_Pump2.Daily_Runtime 1.3666499853134155
2007-03-12 03:59:59.210 PS002_Pump1.Daily_Runtime 0.11666524410247803
2007-03-12 03:59:59.210 PS002_Pump2.Daily_Runtime 0.08333231508731842
2007-03-12 08:59:59.157 PS002_Pump1.Daily_Runtime 0.23333048820495605
2007-03-12 08:59:59.157 PS002_Pump2.Daily_Runtime 0.28332987427711487
2007-03-12 13:59:59.107 PS002_Pump1.Daily_Runtime 0.66665852069854736
2007-03-12 13:59:59.107 PS002_Pump2.Daily_Runtime 0.76665729284286499
2007-03-12 18:59:59.053 PS002_Pump1.Daily_Runtime 0.89998900890350342
2007-03-12 18:59:59.053 PS002_Pump2.Daily_Runtime 1.0166542530059814
2007-03-12 23:59:59.000 PS002_Pump1.Daily_Runtime 1.1999853849411011
2007-03-12 23:59:59.000 PS002_Pump2.Daily_Runtime 1.3833163976669312


what i would like to do is not hard code the date for the data i need, is there a way to code the dates so that microsoft query
would pull those date from sql...ie;

[DateTime]

>= CONVERT(VARCHAR(20), GETDATE()-5, 100) 12:00:00 AM and <= CONVERT(VARCHAR(20), GETDATE(), 100) 11:59:59 PM

any ideas?

Can't you just use:

WHERE [DateTime] BETWEEN GETDATE() - 5 AND GETDATE()

Chris

|||no , because you only get the data for the current date and time. I need to code this so that it will pick up all data between 12:00:00 am and 11:5:59 pm for each date.|||

Just to clarify - if you ran the query now (15-Mar-2007 20:23:32.000) then you would expect to return data from 10-Mar-2007 00:00:00.000 to 15-Mar-2007 23:59:59.999 inclusive.

Is this correct?

If so, then this could help:

WHERE [DateTime] >= CAST(CONVERT(VARCHAR(8), GETDATE() - 5, 112) AS DATETIME)
AND [DateTime] < CAST(CONVERT(VARCHAR(8), GETDATE() + 1, 112) AS DATETIME)

Chris

|||Thank You Chris, that worked like a charm...Have a great weekend.

Friday, March 23, 2012

Microsoft OLE DB Provider for ODBC Drivers

I am using an system ODBC created to access data on an AS/400.
I can access the data fine, using the following query.
SELECT F0101.* FROM CRPDTA.PILGRIM.CRPDTA.F0101 as F0101
where the first CRPDTA is the DSN name, PILGRIM is the AS/400 catalog,
the second CRPDTA is the SCHEMA, and F0101 is the file name.
When I try to save this query as a view, I receive the following error.
The operation could not be performed because the OLE DB provider
'MSDASQL' was unable to begin a distributed transaction.
[OLE/DB provider returned message: [IBM][Client Access Express ODBC
Driver (32-bit)]Option type out of range.]
OLE DB error trace [OLE/DB Provider 'MSDASQL'
ITransactionJoin::JoinTransaction returned 0x8004d00a]
Can anyone help?
PMGBoy
On several occasion a bug in the ODBC driver causes all sorts of problem
in the client. Try using any third party software, such as WinSQL
(http://synametrics.com/winsql) and see if you get the same behavior.
This would eliminate the possibility of a buggy driver.
jeff.jones@.papermagic.com wrote:
> I am using an system ODBC created to access data on an AS/400.
> I can access the data fine, using the following query.
> SELECT F0101.* FROM CRPDTA.PILGRIM.CRPDTA.F0101 as F0101
> where the first CRPDTA is the DSN name, PILGRIM is the AS/400 catalog,
> the second CRPDTA is the SCHEMA, and F0101 is the file name.
> When I try to save this query as a view, I receive the following error.
> The operation could not be performed because the OLE DB provider
> 'MSDASQL' was unable to begin a distributed transaction.
> [OLE/DB provider returned message: [IBM][Client Access Express ODBC
> Driver (32-bit)]Option type out of range.]
> OLE DB error trace [OLE/DB Provider 'MSDASQL'
> ITransactionJoin::JoinTransaction returned 0x8004d00a]
> Can anyone help?
> PMGBoy
>

Microsoft OLE DB Provider for ODBC Drivers

I am using an system ODBC created to access data on an AS/400.
I can access the data fine, using the following query.
SELECT F0101.* FROM CRPDTA.PILGRIM.CRPDTA.F0101 as F0101
where the first CRPDTA is the DSN name, PILGRIM is the AS/400 catalog,
the second CRPDTA is the SCHEMA, and F0101 is the file name.
When I try to save this query as a view, I receive the following error.
The operation could not be performed because the OLE DB provider
'MSDASQL' was unable to begin a distributed transaction.
[OLE/DB provider returned message: [IBM][Client Access Express O
DBC
Driver (32-bit)]Option type out of range.]
OLE DB error trace [OLE/DB Provider 'MSDASQL'
ITransactionJoin::JoinTransaction returned 0x8004d00a]
Can anyone help?
PMGBoyOn several occasion a bug in the ODBC driver causes all sorts of problem
in the client. Try using any third party software, such as WinSQL
(http://synametrics.com/winsql) and see if you get the same behavior.
This would eliminate the possibility of a buggy driver.
jeff.jones@.papermagic.com wrote:
> I am using an system ODBC created to access data on an AS/400.
> I can access the data fine, using the following query.
> SELECT F0101.* FROM CRPDTA.PILGRIM.CRPDTA.F0101 as F0101
> where the first CRPDTA is the DSN name, PILGRIM is the AS/400 catalog,
> the second CRPDTA is the SCHEMA, and F0101 is the file name.
> When I try to save this query as a view, I receive the following error.
> The operation could not be performed because the OLE DB provider
> 'MSDASQL' was unable to begin a distributed transaction.
> [OLE/DB provider returned message: [IBM][Client Access Express
ODBC
> Driver (32-bit)]Option type out of range.]
> OLE DB error trace [OLE/DB Provider 'MSDASQL'
> ITransactionJoin::JoinTransaction returned 0x8004d00a]
> Can anyone help?
> PMGBoy
>sql

Monday, March 19, 2012

Microsoft Analysis Server 2005 and .NET 1.1

Hi,

Firstly, I had to post this query here since I did not find any other place relating to Microsoft SQL Analysis Server 2005 and that it is related to SQL server 2005.

I am using Microsoft SQL analysis server 2005 and .NET 1.1 for Asp.NET (C#)

I need to programmatically create Measures, Dimensions and Cubes using .Net 1.1 (C#) in an Asp.NET page, and then I need to access the measures, dimensions and cubes again from another Asp.Net page.

My querys are:

1. To create and manipulate the SQL Analysis server objects like Dimensions, Cubes what should I use? The documentation for Analysis server 2005 says we can use (Analysis Management Objects)AMO. but I am not sure if we can use it with .NET 1.1?

2. If AMO is possible, then what to use? There is one more technology we can use called as (Deciscion Suport Objects) DSO. but they are COM based and were for Analysis services 2000.

3. To query the data, what technology can I use? Microsoft says we can use ADOMD.NET. Microsoft also gives many other technologies that I think do similar work, like XMLA, ASSL.

Can somebody help me in this.

Also please do give me some links that have code samples for the same.

Thanks and Regards

Vijay R

Analysis service in SQL Server 2005 is on the calculus end of the relational model and Microsoft is compliant with all the Calculus algorithms. When I tested SQL Server 2005 in beta 2 there is a management studio for Analysis service if you don't have it installed I suggest you do so because you can get sample ADOMD.NET code from the templates. I dont think you can use DSO(decision support object) with your web application because your database must be Denormalized and the tables read only which was required in SQL Server 2000 because Microsoft had only two Calculus algorithms and one was flawed.

But SQL Server 2005 comes with something that let you strip the algebra and move to Calculus in one step called UDM(unified dimension modeling).
Try the links below for more info and the last link is the site of the person who created the Calculus end of the relational model. Hope this helps.

http://www.microsoft.com/sql/solutions/bi/default.mspx

http://www.mosha.com/msolap/yukon.htm

http://www.rkimball.com/

Microsoft Access Query converted to SQL

Here a query Microsoft Access Query That I would like to convert to SQL. What replace the Word "Last" in SQL

SELECT Contacts.FirstName,Last(Contacts.LastName) AS LastofLastName
FROM Contacts
GROUP BY Contacts.FirstName;

You can try a ORDER BY on lastname column with TOP 1 or Max(LastName).

SELECT Contacts.FirstName,Max(Contacts.LastName) AS LastofLastName
FROM Contacts
GROUP BY Contacts.FirstName

Or

SELECT TOP (1) Contacts.FirstName, Contacts.LastName AS LastofLastName
FROM Contacts
ORDER BY Contacts.LastName DESC

|||Thanks. It works fine on both.

Monday, March 12, 2012

Mgt Studio - Exclamation Point with a check mark?

Some of our workstations have Mgt Studio appearing with a check mark on the
exclamation point that executes a query window. Some do not.
What is the meaning of this icon?
Thanks!
Read about SET PARSEONLY. Btw, you can easily test this yourself by starting Profiler, press that
button and in the trace see what SQL is submitted. The button is meant for you to test your code for
syntax errors, without executing the SQL statements.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
"Steve Z" <SteveZ@.discussions.microsoft.com> wrote in message
news:C5DAEDAE-B87D-4354-B2F3-557FABABCB98@.microsoft.com...
> Some of our workstations have Mgt Studio appearing with a check mark on the
> exclamation point that executes a query window. Some do not.
> What is the meaning of this icon?
> Thanks!
|||I don't think you understand what I meant.
I know about the check mark that parses a query for errors - that's been
around since QA.
But on my Mgt Studio screen - the ! point icon has a very little hard-to-see
check mark on top of it - a workstation next to it does not have the icon
appearing like this.
"Tibor Karaszi" wrote:

> Read about SET PARSEONLY. Btw, you can easily test this yourself by starting Profiler, press that
> button and in the trace see what SQL is submitted. The button is meant for you to test your code for
> syntax errors, without executing the SQL statements.
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://sqlblog.com/blogs/tibor_karaszi
>
> "Steve Z" <SteveZ@.discussions.microsoft.com> wrote in message
> news:C5DAEDAE-B87D-4354-B2F3-557FABABCB98@.microsoft.com...
>
|||I don't think it's a checkmark, I just always thought it was a stray
artifact of a badly-resized icon. I've logged onto several machines to try
and find one that looks different, and they all look the same to me (both
direct login and over RDP). Can you show screen shots comparing the two?
Is it possible it's just a visual artifact issue, and not an actual icon
difference that is intentional?
Aaron Bertrand
SQL Server MVP
"Steve Z" <SteveZ@.discussions.microsoft.com> wrote in message
news:F6EF4C02-96DF-43F0-9F47-751F2F1D3B65@.microsoft.com...[vbcol=seagreen]
>I don't think you understand what I meant.
> I know about the check mark that parses a query for errors - that's been
> around since QA.
> But on my Mgt Studio screen - the ! point icon has a very little
> hard-to-see
> check mark on top of it - a workstation next to it does not have the icon
> appearing like this.
> "Tibor Karaszi" wrote:
|||Ahh, I see. Very hard indeed to see (a tiny green one, right?). I've never seen that before. Perhaps
a service pack thing?
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
"Steve Z" <SteveZ@.discussions.microsoft.com> wrote in message
news:F6EF4C02-96DF-43F0-9F47-751F2F1D3B65@.microsoft.com...[vbcol=seagreen]
>I don't think you understand what I meant.
> I know about the check mark that parses a query for errors - that's been
> around since QA.
> But on my Mgt Studio screen - the ! point icon has a very little hard-to-see
> check mark on top of it - a workstation next to it does not have the icon
> appearing like this.
> "Tibor Karaszi" wrote:
|||Well - I don't know if I can post images on this forum (is it possible?) -
but I did post the images on this forum if you want to go look at it.
http://www.vbforums.com/showthread.php?t=483415
"Aaron Bertrand [SQL Server MVP]" wrote:

> I don't think it's a checkmark, I just always thought it was a stray
> artifact of a badly-resized icon. I've logged onto several machines to try
> and find one that looks different, and they all look the same to me (both
> direct login and over RDP). Can you show screen shots comparing the two?
> Is it possible it's just a visual artifact issue, and not an actual icon
> difference that is intentional?
> --
> Aaron Bertrand
> SQL Server MVP
>
>
> "Steve Z" <SteveZ@.discussions.microsoft.com> wrote in message
> news:F6EF4C02-96DF-43F0-9F47-751F2F1D3B65@.microsoft.com...
>
>
|||Yes, I don't recall ever seeing it *without* the checkmark, and I can't find
a single instance of client tools that doesn't have it. As I said in my
other reply, I merely thought it was a badly generated icon with extra
pixels flailing about.
Aaron Bertrand
SQL Server MVP
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
message news:%232vcbR42HHA.5116@.TK2MSFTNGP04.phx.gbl...
> Ahh, I see. Very hard indeed to see (a tiny green one, right?). I've never
> seen that before. Perhaps a service pack thing?
|||Interesting. Did you check the build number for each SSMS?
OK, I fired up a virtual machine, which is RTM, and it didn't have the little green checkmark.
(Aaron, I do think it *is* a tiny tiny checkmark.)
SSMS build number on a machine where I *don't* have the checkmark: 9.00.1399.00. This is RTM
SSMS build number on a machine where I *don't* have the checkmark: 9.00.2047.00. This is sp1
SSMS build number on a machine where I *have* the checkmark: 9.00.3042.00. This is sp2.
So, it seems this wad added in sp2.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
"Steve Z" <SteveZ@.discussions.microsoft.com> wrote in message
news:37330604-00F8-405B-B437-33EAA6D1AC9E@.microsoft.com...[vbcol=seagreen]
> Well - I don't know if I can post images on this forum (is it possible?) -
> but I did post the images on this forum if you want to go look at it.
> http://www.vbforums.com/showthread.php?t=483415
> "Aaron Bertrand [SQL Server MVP]" wrote:

Mgt Studio - Exclamation Point with a check mark?

Some of our workstations have Mgt Studio appearing with a check mark on the
exclamation point that executes a query window. Some do not.
What is the meaning of this icon'
Thanks!Read about SET PARSEONLY. Btw, you can easily test this yourself by starting Profiler, press that
button and in the trace see what SQL is submitted. The button is meant for you to test your code for
syntax errors, without executing the SQL statements.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
"Steve Z" <SteveZ@.discussions.microsoft.com> wrote in message
news:C5DAEDAE-B87D-4354-B2F3-557FABABCB98@.microsoft.com...
> Some of our workstations have Mgt Studio appearing with a check mark on the
> exclamation point that executes a query window. Some do not.
> What is the meaning of this icon'
> Thanks!|||I don't think you understand what I meant.
I know about the check mark that parses a query for errors - that's been
around since QA.
But on my Mgt Studio screen - the ! point icon has a very little hard-to-see
check mark on top of it - a workstation next to it does not have the icon
appearing like this.
"Tibor Karaszi" wrote:
> Read about SET PARSEONLY. Btw, you can easily test this yourself by starting Profiler, press that
> button and in the trace see what SQL is submitted. The button is meant for you to test your code for
> syntax errors, without executing the SQL statements.
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://sqlblog.com/blogs/tibor_karaszi
>
> "Steve Z" <SteveZ@.discussions.microsoft.com> wrote in message
> news:C5DAEDAE-B87D-4354-B2F3-557FABABCB98@.microsoft.com...
> > Some of our workstations have Mgt Studio appearing with a check mark on the
> > exclamation point that executes a query window. Some do not.
> >
> > What is the meaning of this icon'
> >
> > Thanks!
>|||I don't think it's a checkmark, I just always thought it was a stray
artifact of a badly-resized icon. I've logged onto several machines to try
and find one that looks different, and they all look the same to me (both
direct login and over RDP). Can you show screen shots comparing the two?
Is it possible it's just a visual artifact issue, and not an actual icon
difference that is intentional?
--
Aaron Bertrand
SQL Server MVP
"Steve Z" <SteveZ@.discussions.microsoft.com> wrote in message
news:F6EF4C02-96DF-43F0-9F47-751F2F1D3B65@.microsoft.com...
>I don't think you understand what I meant.
> I know about the check mark that parses a query for errors - that's been
> around since QA.
> But on my Mgt Studio screen - the ! point icon has a very little
> hard-to-see
> check mark on top of it - a workstation next to it does not have the icon
> appearing like this.
> "Tibor Karaszi" wrote:
>> Read about SET PARSEONLY. Btw, you can easily test this yourself by
>> starting Profiler, press that
>> button and in the trace see what SQL is submitted. The button is meant
>> for you to test your code for
>> syntax errors, without executing the SQL statements.
>> --
>> Tibor Karaszi, SQL Server MVP
>> http://www.karaszi.com/sqlserver/default.asp
>> http://sqlblog.com/blogs/tibor_karaszi
>>
>> "Steve Z" <SteveZ@.discussions.microsoft.com> wrote in message
>> news:C5DAEDAE-B87D-4354-B2F3-557FABABCB98@.microsoft.com...
>> > Some of our workstations have Mgt Studio appearing with a check mark on
>> > the
>> > exclamation point that executes a query window. Some do not.
>> >
>> > What is the meaning of this icon'
>> >
>> > Thanks!
>>|||Ahh, I see. Very hard indeed to see (a tiny green one, right?). I've never seen that before. Perhaps
a service pack thing?
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
"Steve Z" <SteveZ@.discussions.microsoft.com> wrote in message
news:F6EF4C02-96DF-43F0-9F47-751F2F1D3B65@.microsoft.com...
>I don't think you understand what I meant.
> I know about the check mark that parses a query for errors - that's been
> around since QA.
> But on my Mgt Studio screen - the ! point icon has a very little hard-to-see
> check mark on top of it - a workstation next to it does not have the icon
> appearing like this.
> "Tibor Karaszi" wrote:
>> Read about SET PARSEONLY. Btw, you can easily test this yourself by starting Profiler, press that
>> button and in the trace see what SQL is submitted. The button is meant for you to test your code
>> for
>> syntax errors, without executing the SQL statements.
>> --
>> Tibor Karaszi, SQL Server MVP
>> http://www.karaszi.com/sqlserver/default.asp
>> http://sqlblog.com/blogs/tibor_karaszi
>>
>> "Steve Z" <SteveZ@.discussions.microsoft.com> wrote in message
>> news:C5DAEDAE-B87D-4354-B2F3-557FABABCB98@.microsoft.com...
>> > Some of our workstations have Mgt Studio appearing with a check mark on the
>> > exclamation point that executes a query window. Some do not.
>> >
>> > What is the meaning of this icon'
>> >
>> > Thanks!
>>|||Well - I don't know if I can post images on this forum (is it possible') -
but I did post the images on this forum if you want to go look at it.
http://www.vbforums.com/showthread.php?t=483415
"Aaron Bertrand [SQL Server MVP]" wrote:
> I don't think it's a checkmark, I just always thought it was a stray
> artifact of a badly-resized icon. I've logged onto several machines to try
> and find one that looks different, and they all look the same to me (both
> direct login and over RDP). Can you show screen shots comparing the two?
> Is it possible it's just a visual artifact issue, and not an actual icon
> difference that is intentional?
> --
> Aaron Bertrand
> SQL Server MVP
>
>
> "Steve Z" <SteveZ@.discussions.microsoft.com> wrote in message
> news:F6EF4C02-96DF-43F0-9F47-751F2F1D3B65@.microsoft.com...
> >I don't think you understand what I meant.
> >
> > I know about the check mark that parses a query for errors - that's been
> > around since QA.
> >
> > But on my Mgt Studio screen - the ! point icon has a very little
> > hard-to-see
> > check mark on top of it - a workstation next to it does not have the icon
> > appearing like this.
> >
> > "Tibor Karaszi" wrote:
> >
> >> Read about SET PARSEONLY. Btw, you can easily test this yourself by
> >> starting Profiler, press that
> >> button and in the trace see what SQL is submitted. The button is meant
> >> for you to test your code for
> >> syntax errors, without executing the SQL statements.
> >>
> >> --
> >> Tibor Karaszi, SQL Server MVP
> >> http://www.karaszi.com/sqlserver/default.asp
> >> http://sqlblog.com/blogs/tibor_karaszi
> >>
> >>
> >> "Steve Z" <SteveZ@.discussions.microsoft.com> wrote in message
> >> news:C5DAEDAE-B87D-4354-B2F3-557FABABCB98@.microsoft.com...
> >> > Some of our workstations have Mgt Studio appearing with a check mark on
> >> > the
> >> > exclamation point that executes a query window. Some do not.
> >> >
> >> > What is the meaning of this icon'
> >> >
> >> > Thanks!
> >>
> >>
>
>|||Yes, I don't recall ever seeing it *without* the checkmark, and I can't find
a single instance of client tools that doesn't have it. As I said in my
other reply, I merely thought it was a badly generated icon with extra
pixels flailing about.
--
Aaron Bertrand
SQL Server MVP
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
message news:%232vcbR42HHA.5116@.TK2MSFTNGP04.phx.gbl...
> Ahh, I see. Very hard indeed to see (a tiny green one, right?). I've never
> seen that before. Perhaps a service pack thing?|||Interesting. Did you check the build number for each SSMS?
OK, I fired up a virtual machine, which is RTM, and it didn't have the little green checkmark.
(Aaron, I do think it *is* a tiny tiny checkmark.)
SSMS build number on a machine where I *don't* have the checkmark: 9.00.1399.00. This is RTM
SSMS build number on a machine where I *don't* have the checkmark: 9.00.2047.00. This is sp1
SSMS build number on a machine where I *have* the checkmark: 9.00.3042.00. This is sp2.
So, it seems this wad added in sp2.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
"Steve Z" <SteveZ@.discussions.microsoft.com> wrote in message
news:37330604-00F8-405B-B437-33EAA6D1AC9E@.microsoft.com...
> Well - I don't know if I can post images on this forum (is it possible') -
> but I did post the images on this forum if you want to go look at it.
> http://www.vbforums.com/showthread.php?t=483415
> "Aaron Bertrand [SQL Server MVP]" wrote:
>> I don't think it's a checkmark, I just always thought it was a stray
>> artifact of a badly-resized icon. I've logged onto several machines to try
>> and find one that looks different, and they all look the same to me (both
>> direct login and over RDP). Can you show screen shots comparing the two?
>> Is it possible it's just a visual artifact issue, and not an actual icon
>> difference that is intentional?
>> --
>> Aaron Bertrand
>> SQL Server MVP
>>
>>
>> "Steve Z" <SteveZ@.discussions.microsoft.com> wrote in message
>> news:F6EF4C02-96DF-43F0-9F47-751F2F1D3B65@.microsoft.com...
>> >I don't think you understand what I meant.
>> >
>> > I know about the check mark that parses a query for errors - that's been
>> > around since QA.
>> >
>> > But on my Mgt Studio screen - the ! point icon has a very little
>> > hard-to-see
>> > check mark on top of it - a workstation next to it does not have the icon
>> > appearing like this.
>> >
>> > "Tibor Karaszi" wrote:
>> >
>> >> Read about SET PARSEONLY. Btw, you can easily test this yourself by
>> >> starting Profiler, press that
>> >> button and in the trace see what SQL is submitted. The button is meant
>> >> for you to test your code for
>> >> syntax errors, without executing the SQL statements.
>> >>
>> >> --
>> >> Tibor Karaszi, SQL Server MVP
>> >> http://www.karaszi.com/sqlserver/default.asp
>> >> http://sqlblog.com/blogs/tibor_karaszi
>> >>
>> >>
>> >> "Steve Z" <SteveZ@.discussions.microsoft.com> wrote in message
>> >> news:C5DAEDAE-B87D-4354-B2F3-557FABABCB98@.microsoft.com...
>> >> > Some of our workstations have Mgt Studio appearing with a check mark on
>> >> > the
>> >> > exclamation point that executes a query window. Some do not.
>> >> >
>> >> > What is the meaning of this icon'
>> >> >
>> >> > Thanks!
>> >>
>> >>
>>

Mgt Studio - Exclamation Point with a check mark?

Some of our workstations have Mgt Studio appearing with a check mark on the
exclamation point that executes a query window. Some do not.
What is the meaning of this icon'
Thanks!Read about SET PARSEONLY. Btw, you can easily test this yourself by starting
Profiler, press that
button and in the trace see what SQL is submitted. The button is meant for y
ou to test your code for
syntax errors, without executing the SQL statements.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
"Steve Z" <SteveZ@.discussions.microsoft.com> wrote in message
news:C5DAEDAE-B87D-4354-B2F3-557FABABCB98@.microsoft.com...
> Some of our workstations have Mgt Studio appearing with a check mark on th
e
> exclamation point that executes a query window. Some do not.
> What is the meaning of this icon'
> Thanks!|||I don't think you understand what I meant.
I know about the check mark that parses a query for errors - that's been
around since QA.
But on my Mgt Studio screen - the ! point icon has a very little hard-to-see
check mark on top of it - a workstation next to it does not have the icon
appearing like this.
"Tibor Karaszi" wrote:

> Read about SET PARSEONLY. Btw, you can easily test this yourself by starti
ng Profiler, press that
> button and in the trace see what SQL is submitted. The button is meant for
you to test your code for
> syntax errors, without executing the SQL statements.
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://sqlblog.com/blogs/tibor_karaszi
>
> "Steve Z" <SteveZ@.discussions.microsoft.com> wrote in message
> news:C5DAEDAE-B87D-4354-B2F3-557FABABCB98@.microsoft.com...
>|||I don't think it's a checkmark, I just always thought it was a stray
artifact of a badly-resized icon. I've logged onto several machines to try
and find one that looks different, and they all look the same to me (both
direct login and over RDP). Can you show screen shots comparing the two?
Is it possible it's just a visual artifact issue, and not an actual icon
difference that is intentional?
Aaron Bertrand
SQL Server MVP
"Steve Z" <SteveZ@.discussions.microsoft.com> wrote in message
news:F6EF4C02-96DF-43F0-9F47-751F2F1D3B65@.microsoft.com...[vbcol=seagreen]
>I don't think you understand what I meant.
> I know about the check mark that parses a query for errors - that's been
> around since QA.
> But on my Mgt Studio screen - the ! point icon has a very little
> hard-to-see
> check mark on top of it - a workstation next to it does not have the icon
> appearing like this.
> "Tibor Karaszi" wrote:
>|||Ahh, I see. Very hard indeed to see (a tiny green one, right?). I've never s
een that before. Perhaps
a service pack thing?
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
"Steve Z" <SteveZ@.discussions.microsoft.com> wrote in message
news:F6EF4C02-96DF-43F0-9F47-751F2F1D3B65@.microsoft.com...[vbcol=seagreen]
>I don't think you understand what I meant.
> I know about the check mark that parses a query for errors - that's been
> around since QA.
> But on my Mgt Studio screen - the ! point icon has a very little hard-to-s
ee
> check mark on top of it - a workstation next to it does not have the icon
> appearing like this.
> "Tibor Karaszi" wrote:
>|||Well - I don't know if I can post images on this forum (is it possible') -
but I did post the images on this forum if you want to go look at it.
http://www.vbforums.com/showthread.php?t=483415
"Aaron Bertrand [SQL Server MVP]" wrote:

> I don't think it's a checkmark, I just always thought it was a stray
> artifact of a badly-resized icon. I've logged onto several machines to tr
y
> and find one that looks different, and they all look the same to me (both
> direct login and over RDP). Can you show screen shots comparing the two?
> Is it possible it's just a visual artifact issue, and not an actual icon
> difference that is intentional?
> --
> Aaron Bertrand
> SQL Server MVP
>
>
> "Steve Z" <SteveZ@.discussions.microsoft.com> wrote in message
> news:F6EF4C02-96DF-43F0-9F47-751F2F1D3B65@.microsoft.com...
>
>|||Yes, I don't recall ever seeing it *without* the checkmark, and I can't find
a single instance of client tools that doesn't have it. As I said in my
other reply, I merely thought it was a badly generated icon with extra
pixels flailing about.
Aaron Bertrand
SQL Server MVP
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
message news:%232vcbR42HHA.5116@.TK2MSFTNGP04.phx.gbl...
> Ahh, I see. Very hard indeed to see (a tiny green one, right?). I've never
> seen that before. Perhaps a service pack thing?|||Interesting. Did you check the build number for each SSMS?
OK, I fired up a virtual machine, which is RTM, and it didn't have the littl
e green checkmark.
(Aaron, I do think it *is* a tiny tiny checkmark.)
SSMS build number on a machine where I *don't* have the checkmark: 9.00.1399
.00. This is RTM
SSMS build number on a machine where I *don't* have the checkmark: 9.00.2047
.00. This is sp1
SSMS build number on a machine where I *have* the checkmark: 9.00.3042.00. T
his is sp2.
So, it seems this wad added in sp2.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
"Steve Z" <SteveZ@.discussions.microsoft.com> wrote in message
news:37330604-00F8-405B-B437-33EAA6D1AC9E@.microsoft.com...[vbcol=seagreen]
> Well - I don't know if I can post images on this forum (is it possible')
-
> but I did post the images on this forum if you want to go look at it.
> http://www.vbforums.com/showthread.php?t=483415
> "Aaron Bertrand [SQL Server MVP]" wrote:
>

metrics?

Can anyone tell me how I can measure the metrics of
certain activities?
I need to see the difference in I/O between a query and
an index build.
TIA,
AdriaAdria,
possible ways:
1. you can use set statistics io on in query analyzer
2. you can use user profiler
3. you can use perfmon (or system monitor in win2k)
Quentin
"Adria" <a-carbo@.tamu.edu> wrote in message
news:b6ea01c4377b$32bf27f0$a001280a@.phx.gbl...
> Can anyone tell me how I can measure the metrics of
> certain activities?
> I need to see the difference in I/O between a query and
> an index build.
> TIA,
> Adria

metrics?

Can anyone tell me how I can measure the metrics of
certain activities?
I need to see the difference in I/O between a query and
an index build.
TIA,
Adria
Adria,
possible ways:
1. you can use set statistics io on in query analyzer
2. you can use user profiler
3. you can use perfmon (or system monitor in win2k)
Quentin
"Adria" <a-carbo@.tamu.edu> wrote in message
news:b6ea01c4377b$32bf27f0$a001280a@.phx.gbl...
> Can anyone tell me how I can measure the metrics of
> certain activities?
> I need to see the difference in I/O between a query and
> an index build.
> TIA,
> Adria

Friday, March 9, 2012

metrics?

Can anyone tell me how I can measure the metrics of
certain activities?
I need to see the difference in I/O between a query and
an index build.
TIA,
AdriaAdria,
possible ways:
1. you can use set statistics io on in query analyzer
2. you can use user profiler
3. you can use perfmon (or system monitor in win2k)
Quentin
"Adria" <a-carbo@.tamu.edu> wrote in message
news:b6ea01c4377b$32bf27f0$a001280a@.phx.gbl...
> Can anyone tell me how I can measure the metrics of
> certain activities?
> I need to see the difference in I/O between a query and
> an index build.
> TIA,
> Adria

Wednesday, March 7, 2012

Meta Data Help Needed[:(]

Hi Guys,

I have a DataBase in which I have several Tables.

What I want is an SP or Query which takes as its parameter the "tablename".

The Output Should be a having three fields only.

Field name, DataType Of the Field, Length of the DataType.

For Example

Suppose the StoredProcedure Name is "SP_GetTables"

if i have a table named "tbl_Users" with fields

UserName varchar(50)

UserPass varchar(20)

UserAge int

UserStatus bit

In my program side if I pass the parameter as "tbl_Users" to the StoredProcedure SP_Users,

I should get the O/P as

Field Name DataType Length

UserName varchar 50

UserPass varchar 20

UserAge int

UserStatus bit

Regards,

Naveen.

Here it is,


Createproc SP_GetTables(@.TableNameSysname)
as
Begin
Select
column_name [field name]
, data_type [datatype]
, character_maximum_length [length]
From
INFORMATION_SCHEMA.COLUMNS
Where
table_name= @.tablename
Orderby
ordinal_position
End

|||

HiManivannna.D.Sekaran,

Thanks a lot!!!

Is there a way by which I can pass the DataBase name too.

My requirement is like this.

I want an SP where i can pass DBName and Table Name as Parameters and that SP finds the DB and the table inside it.

The SP must reside in My DB too.

Regards,

Naveen

|||

Createproc SP_GetTables(@.TableNameSysname, @.databaseSysname)
as
Begin
Exec('Select
column_name [field name]
, data_type [datatype]
, character_maximum_length [length]
From
['+ @.database+'].INFORMATION_SCHEMA.COLUMNS
Where
table_name = '''+ @.tablename+'''
Order by
ordinal_position')
End

Monday, February 20, 2012

Message OFF

In the query analyzer when I run the command
create database TestingDb
I can see the messages
The CREATE DATABASE process is allocating 0.63 MB on disk 'TestingDb'.
The CREATE DATABASE process is allocating 0.49 MB on disk 'TestingDb_log'.
I want to hide the message, how can I do that?
Thanks
We can not turn off those messages in query analyzer or management studio.
Thanks
Hari
"Rogers" <naissani@.hotmail.com> wrote in message
news:OyZC18InHHA.4424@.TK2MSFTNGP03.phx.gbl...
> In the query analyzer when I run the command
> create database TestingDb
> I can see the messages
> The CREATE DATABASE process is allocating 0.63 MB on disk 'TestingDb'.
> The CREATE DATABASE process is allocating 0.49 MB on disk 'TestingDb_log'.
> I want to hide the message, how can I do that?
> Thanks
>