Showing posts with label analyzer. Show all posts
Showing posts with label analyzer. Show all posts

Friday, March 9, 2012

How to read windows registry thru query ?

Hi
How can I access the windows registry entries from MSSQL Server query analyzer. I am looking for some stored procedures. Are there any system stored procedures ?
ThxExtended procedure xp_regread
USE Master
EXEC xp_regread 'HKEY_LOCAL_MACHINE',
'SOFTWARE\Microsoft\MSSQLServer\Setup',
'SQLPath'

Friday, February 24, 2012

how to quote the tabel?

Hi,
I have table name like 'xyz\abc1234.test' in SQL Query Analyzer. xyz
is the network name.
If I put select * from xyz\abc1234.test, it will give me an error msg.
What shall I do?
Thanks a lot!
Michael
On Apr 12, 10:09 am, "Michael" <michae...@.gmail.com> wrote:
> Hi,
> I have table name like 'xyz\abc1234.test' in SQL Query Analyzer. xyz
> is the network name.
> If I put select * from xyz\abc1234.test, it will give me an error msg.
> What shall I do?
> Thanks a lot!
> Michael
don't x-post
use brackets
select * from [xyz\abc1234].test
Denis the SQL Menace
http://sqlservercode.blogspot.com/
|||On Apr 12, 10:09 am, "Michael" <michae...@.gmail.com> wrote:
> Hi,
> I have table name like 'xyz\abc1234.test' in SQL Query Analyzer. xyz
> is the network name.
> If I put select * from xyz\abc1234.test, it will give me an error msg.
> What shall I do?
> Thanks a lot!
> Michael
try select * from [xyz\abc1234.test]

how to quote the tabel?

Hi,
I have table name like 'xyz\abc1234.test' in SQL Query Analyzer. xyz
is the network name.
If I put select * from xyz\abc1234.test, it will give me an error msg.
What shall I do?
Thanks a lot!
MichaelOn Apr 12, 10:09 am, "Michael" <michae...@.gmail.com> wrote:
> Hi,
> I have table name like 'xyz\abc1234.test' in SQL Query Analyzer. xyz
> is the network name.
> If I put select * from xyz\abc1234.test, it will give me an error msg.
> What shall I do?
> Thanks a lot!
> Michael
don't x-post
use brackets
select * from [xyz\abc1234].test
Denis the SQL Menace
http://sqlservercode.blogspot.com/|||On Apr 12, 10:09 am, "Michael" <michae...@.gmail.com> wrote:
> Hi,
> I have table name like 'xyz\abc1234.test' in SQL Query Analyzer. xyz
> is the network name.
> If I put select * from xyz\abc1234.test, it will give me an error msg.
> What shall I do?
> Thanks a lot!
> Michael
try select * from [xyz\abc1234.test]

how to quote the tabel?

Hi,
I have table name like 'xyz\abc1234.test' in SQL Query Analyzer. xyz
is the network name.
If I put select * from xyz\abc1234.test, it will give me an error msg.
What shall I do?
Thanks a lot!
MichaelOn Apr 12, 10:09 am, "Michael" <michae...@.gmail.com> wrote:
> Hi,
> I have table name like 'xyz\abc1234.test' in SQL Query Analyzer. xyz
> is the network name.
> If I put select * from xyz\abc1234.test, it will give me an error msg.
> What shall I do?
> Thanks a lot!
> Michael
don't x-post
use brackets
select * from [xyz\abc1234].test
Denis the SQL Menace
http://sqlservercode.blogspot.com/|||On Apr 12, 10:09 am, "Michael" <michae...@.gmail.com> wrote:
> Hi,
> I have table name like 'xyz\abc1234.test' in SQL Query Analyzer. xyz
> is the network name.
> If I put select * from xyz\abc1234.test, it will give me an error msg.
> What shall I do?
> Thanks a lot!
> Michael
try select * from [xyz\abc1234.test]

Sunday, February 19, 2012

How to query master table in Query Analyzer?

In Enterprise Manager, I executed:
select id from sysindexes where (name ='customers')
and I've got the ID of the table.
In query analyzer, I executed:
use master; select id from sysindexes where (name ='customers')
and I don't have the value.
What is the right way to query the sysindexes from Query Anal?
Thanks.
light_wt wrote:
> In Enterprise Manager, I executed:
> select id from sysindexes where (name ='customers')
> and I've got the ID of the table.
> In query analyzer, I executed:
> use master; select id from sysindexes where (name ='customers')
> and I don't have the value.
> What is the right way to query the sysindexes from Query Anal?
> Thanks.
Sysindexes is a system table that resides in all databases. From QA use
the correct database first and then query sysindexes.
David G.
|||Thanks, David.
There is "use master;".
|||Which is exactly what you should remove.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"light_wt" <lightwt@.discussions.microsoft.com> wrote in message
news:FC3636CE-9987-4E38-8E32-230E78F85584@.microsoft.com...
> Thanks, David.
> There is "use master;".
|||light_wt wrote:
> Thanks, David.
> There is "use master;".
As Tibor said, remove that line. The Sysindexes you want to query is not
in the master database (unless you are installing user tables there).
Use the correct database first... which is not Master.
David G.

How to query master table in Query Analyzer?

In Enterprise Manager, I executed:
select id from sysindexes where (name ='customers')
and I've got the ID of the table.
In query analyzer, I executed:
use master; select id from sysindexes where (name ='customers')
and I don't have the value.
What is the right way to query the sysindexes from Query Anal?
Thanks.light_wt wrote:
> In Enterprise Manager, I executed:
> select id from sysindexes where (name ='customers')
> and I've got the ID of the table.
> In query analyzer, I executed:
> use master; select id from sysindexes where (name ='customers')
> and I don't have the value.
> What is the right way to query the sysindexes from Query Anal?
> Thanks.
Sysindexes is a system table that resides in all databases. From QA use
the correct database first and then query sysindexes.
--
David G.|||Thanks, David.
There is "use master;".|||Which is exactly what you should remove.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"light_wt" <lightwt@.discussions.microsoft.com> wrote in message
news:FC3636CE-9987-4E38-8E32-230E78F85584@.microsoft.com...
> Thanks, David.
> There is "use master;".|||light_wt wrote:
> Thanks, David.
> There is "use master;".
As Tibor said, remove that line. The Sysindexes you want to query is not
in the master database (unless you are installing user tables there).
Use the correct database first... which is not Master.
--
David G.

How to query master table in Query Analyzer?

In Enterprise Manager, I executed:
select id from sysindexes where (name ='customers')
and I've got the ID of the table.
In query analyzer, I executed:
use master; select id from sysindexes where (name ='customers')
and I don't have the value.
What is the right way to query the sysindexes from Query Anal?
Thanks.light_wt wrote:
> In Enterprise Manager, I executed:
> select id from sysindexes where (name ='customers')
> and I've got the ID of the table.
> In query analyzer, I executed:
> use master; select id from sysindexes where (name ='customers')
> and I don't have the value.
> What is the right way to query the sysindexes from Query Anal?
> Thanks.
Sysindexes is a system table that resides in all databases. From QA use
the correct database first and then query sysindexes.
David G.|||Thanks, David.
There is "use master;".|||Which is exactly what you should remove.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"light_wt" <lightwt@.discussions.microsoft.com> wrote in message
news:FC3636CE-9987-4E38-8E32-230E78F85584@.microsoft.com...
> Thanks, David.
> There is "use master;".|||light_wt wrote:
> Thanks, David.
> There is "use master;".
As Tibor said, remove that line. The Sysindexes you want to query is not
in the master database (unless you are installing user tables there).
Use the correct database first... which is not Master.
David G.