Showing posts with label select. Show all posts
Showing posts with label select. Show all posts

Sunday, March 11, 2012

cannot login to SQLExpress 2005 help please!!

I just installed SQL express couple of days ago.

Then I tried using SQL Management Express Studio CTP. I select

SQL Authetication, key in the correct password but

it says "A connection was succesfully established with the server, but then an error occurred during the login process. (provider: Shared Memory Provider, error:0 - No process is on the other end of the pipe). (Microsoft Sql Error: 233)

When i tried windows authetication, it say cannot initialise SSPI package.

I went to download the windows fix after reading this article

http://www.pcreview.co.uk/forums/thread-1714474-2.php

since google on SSPI has no useful results.... I will be grateful if microsoft people fix this bug with SQL Server 2005 express cos newbies will not be able to understand what

SSPI means.... and failure to install and use an easy software like MS SQL Server will lead to people running to Mysql . sighed.

Cannot load the DLL xpweb70.dll


Hi all
Have you ever used [Web assistant Wizard] in Sql server to create a web page from a predefined [Select] statement or Stored procedure??
when i want to do so and when i complete the Wizard i encounter with the following Error message :

--------
Microsoft SQL-DMO (ODBC SQLState: 42000)
--------
Error 22272: Cannot load the DLL xpweb70.dll, or one of the DLLs it references. Reason: 126(error not found).
--------
OK
--------

Could anyone help me please?
Kind Regards.

Hi ZarrinPour,

I suppose you are using sql2000. Some other users have also encountered this problem and raised it up. Solution is try to install the lasted service package. More informaton you can refer to

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=336312&SiteID=1

orhttp://www.devnewsgroups.net/group/microsoft.public.sqlserver.xml/topic5089.aspx

thanks

This response contains a reference to a third party World Wide Web site. Microsoft is providing this information as a convenience to you. Microsoft does not control these sites and has not tested any software or information found on these sites; therefore, Microsoft cannot make any representations regarding the quality, safety, or suitability of any software or information found there. There are inherent dangers in the use of any software found on the Internet, and Microsoft cautions you to make sure that you completely understand the risk before retrieving any software from the Internet.

Thursday, March 8, 2012

cannot list tables or other objects

Sometimes, when a try to list tables or view (or access Management, etc) Enterprise Manager hungs up.
Using SELECT * FROM SYSOBECTS also freezes the process. But the SQLServer is operational for data updates and retrieves.
Anyone?
thanx!SYSOBJECTS along with SYSINDEXES, SYSPROTECTS, SYSDEPENDS, SYSCOLUMNS, and SYSCOMMENTS are the most frequently used system objects in every user database. You should ALWAYS use (NOLOCK) when attempting to directly retrieve data from those tables.|||You might also want to use the information_schema views rather than looking up directly in the tables. They're more typing but if this is part of a script/procedure having a lifetime that might span generations of SQL Server, this is safer. The system tables can change; the views will be kept stable.

Sunday, February 19, 2012

Cannot get to work a sentence with NULL results

Hi, Ive the following SELECT with a WHERE clause which throws a
result with no NULLs for B.idPersonal.
How do I get all A.idPersonal=B.idPersonal though B.idPersonal=Null?
SELECT C.Descripcion as TipoCF, B.Nombre, B.Apellido, E.Descripcion as
Provincia, D.Partido, D.Localidad, D.Direccion, A.idCF,
A.ComputadoraTipo, A.Marca, A.Modelo, A.Serie, B.Nombre, B.Apellido,
A.MonitorPulgadas
FROM tblCFComputadora A, tblPersonal B, tblCFTipo C, tblCentroFisico
D, tblProvincia E
WHERE A.idcf=D.idCF and D.idTipoCF=C.idTipoCF and
D.idProvincia=E.idProvincia and A.idPersonal=B.idPersonal
Thanks in advance,
Marcelo.
Posted using the http://www.dbforumz.com interface, at author's request
Articles individually checked for conformance to usenet standards
Topic URL: http://www.dbforumz.com/work-senten...rm.php?p=914207and (A.idPersonal=B.idPersonal or B.idPersonal is Null)
Perayu
"techuser" <UseLinkToEmail@.www.dbforumz.com> wrote in message
news:914207_259b395c0125f92ac3ae99415898
94ed@.dbforumz.com...
> Hi, I've the following SELECT with a WHERE clause which throws a
> result with no NULLs for B.idPersonal.
> How do I get all A.idPersonal=B.idPersonal though B.idPersonal=Null?
> SELECT C.Descripcion as TipoCF, B.Nombre, B.Apellido, E.Descripcion as
> Provincia, D.Partido, D.Localidad, D.Direccion, A.idCF,
> A.ComputadoraTipo, A.Marca, A.Modelo, A.Serie, B.Nombre, B.Apellido,
> A.MonitorPulgadas
> FROM tblCFComputadora A, tblPersonal B, tblCFTipo C, tblCentroFisico
> D, tblProvincia E
> WHERE A.idcf=D.idCF and D.idTipoCF=C.idTipoCF and
> D.idProvincia=E.idProvincia and A.idPersonal=B.idPersonal
> Thanks in advance,
> Marcelo.
> --
> Posted using the http://www.dbforumz.com interface, at author's request
> Articles individually checked for conformance to usenet standards
> Topic URL:
> http://www.dbforumz.com/work-senten...pict265873.html
> Visit Topic URL to contact author (reg. req'd). Report abuse:
> http://www.dbforumz.com/eform.php?p=914207|||techuser wrote:
> Hi, Ive the following SELECT with a WHERE clause which throws a
> result with no NULLs for B.idPersonal.
> How do I get all A.idPersonal=B.idPersonal though B.idPersonal=Null?
> SELECT C.Descripcion as TipoCF, B.Nombre, B.Apellido, E.Descripcion as
> Provincia, D.Partido, D.Localidad, D.Direccion, A.idCF,
> A.ComputadoraTipo, A.Marca, A.Modelo, A.Serie, B.Nombre, B.Apellido,
> A.MonitorPulgadas
> FROM tblCFComputadora A, tblPersonal B, tblCFTipo C, tblCentroFisico
> D, tblProvincia E
> WHERE A.idcf=D.idCF and D.idTipoCF=C.idTipoCF and
> D.idProvincia=E.idProvincia and A.idPersonal=B.idPersonal
> Thanks in advance,
> Marcelo.
Are you saying that you are joining two tables together on a column that
can contain nulls in both tables? If that's the case, you can't. NULL is
never equal to anything, including null. However, you can use a union to
get the results you want.
create table #nulltest (col1 int)
insert into #nulltest values (1)
insert into #nulltest values (2)
insert into #nulltest values (3)
insert into #nulltest values (null)
select * from #nulltest a inner join #nulltest b on a.col1 = b.col1
col1 col1
-- --
1 1
2 2
3 3
select * from #nulltest a inner join #nulltest b on a.col1 = b.col1
UNION ALL
select * from #nulltest a inner join #nulltest b on a.col1 is null and
b.col1 is null
col1 col1
-- --
1 1
2 2
3 3
NULL NULL
drop table #nulltest
David Gugick
Quest Software
www.imceda.com
www.quest.com|||A natural way would be to use explicit joins, rather than the deprecated
"from <table_list> where" syntax, and specify inner and/or outer joins as
appropriate.
However, you could try simply adding another condition:
SELECT C.Descripcion as TipoCF, B.Nombre, B.Apellido, E.Descripcion as
Provincia, D.Partido, D.Localidad, D.Direccion, A.idCF,
A.ComputadoraTipo, A.Marca, A.Modelo, A.Serie, B.Nombre, B.Apellido,
A.MonitorPulgadas
FROM tblCFComputadora A, tblPersonal B, tblCFTipo C, tblCentroFisico
D, tblProvincia E
WHERE A.idcf=D.idCF and D.idTipoCF=C.idTipoCF and
D.idProvincia=E.idProvincia and (A.idPersonal=B.idPersonal or B.idPersonal
is null)
Test, re-test, double-test, and then - just to make sure - test again! :)
ML

Thursday, February 16, 2012

Cannot get serverproperty

Using SQL2k. When I run the command below in query analyzer I get 3 columns
of info. However, when I run the same SELECT from code I get nothing. Can
anyone help? Thanks.
SELECT SERVERPROPERTY('productversion') As SQLVersion,
SERVERPROPERTY('productlevel') As ProdLevel, SERVERPROPERTY('edition') As
SQLEdition
p.s. I want to display this on a VB form. All other commands using my
connection run fine.
DavidDavid Chase (dlchase@.lifetimeinc.com) writes:
> Using SQL2k. When I run the command below in query analyzer I get 3
> columns of info. However, when I run the same SELECT from code I get
> nothing. Can anyone help? Thanks.
> SELECT SERVERPROPERTY('productversion') As SQLVersion,
> SERVERPROPERTY('productlevel') As ProdLevel, SERVERPROPERTY('edition') As
> SQLEdition
> p.s. I want to display this on a VB form. All other commands using my
> connection run fine.
It would certainly help if you posted your VB code, as it's likely
that's where the problem is.
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pr...oads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodin...ions/books.mspx|||Here is the code.
Set cn = New ADODB.Connection
cn.Open gstrSQLConString
Set rs1 = New ADODB.Recordset
Set rs1 = cn.Execute(strSQL)
strSQL = "SELECT SERVERPROPERTY('productversion') As SQLVersion," & _
" SERVERPROPERTY('productlevel') As ProdLevel," & _
" SERVERPROPERTY('edition') As SQLEdition"
Set rs1 = cn.Execute(strSQL)
If Not rs1.EOF Then
Me.txtCoAddress = CStr(rs1("SQLVersion"))
End If
David
p.s. Just above this code is an identical recordset retrieval that works
perfect.
"Erland Sommarskog" <esquel@.sommarskog.se> wrote in message
news:Xns97AA6601BD26Yazorman@.127.0.0.1...
> David Chase (dlchase@.lifetimeinc.com) writes:
> It would certainly help if you posted your VB code, as it's likely
> that's where the problem is.
>
> --
> Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
> Books Online for SQL Server 2005 at
> http://www.microsoft.com/technet/pr...oads/books.mspx
> Books Online for SQL Server 2000 at
> http://www.microsoft.com/sql/prodin...ions/books.mspx|||David Chase (dlchase@.lifetimeinc.com) writes:
> Here is the code.
> Set cn = New ADODB.Connection
> cn.Open gstrSQLConString
> Set rs1 = New ADODB.Recordset
> Set rs1 = cn.Execute(strSQL)
> strSQL = "SELECT SERVERPROPERTY('productversion') As SQLVersion," & _
> " SERVERPROPERTY('productlevel') As ProdLevel," & _
> " SERVERPROPERTY('edition') As SQLEdition"
> Set rs1 = cn.Execute(strSQL)
> If Not rs1.EOF Then
> Me.txtCoAddress = CStr(rs1("SQLVersion"))
> End If
> David
> p.s. Just above this code is an identical recordset retrieval that works
> perfect.
Apparently, there is more to it. I tried your code in the attached
VB form, and it seemed to work fine.
Which version of ADO do you use?
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pr...oads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodin...ions/books.mspx

Friday, February 10, 2012

Cannot find select stored procedure wizard in SQL 2000

I was using the SQL 2000 stored procedure wizard to create stored
procedures. I can create insert, delete and update SPs however I am
not able to create the select SP. The wizard does not offer the option
of selecting "select" type SP. thank you for your replys

comprajHi

Select is not supported through the CREATE PROCEDURE wizard. Try using Query
Analyser and the CREATE PROCEDURE statement described in books online.

http://msdn.microsoft.com/library/d...create_4hk5.asp

If you require select statements for a given table you can right click the
table in object browser and script the select statement to a new window.

John

"compraj" <rajeshgambhir@.hotmail.com> wrote in message
news:b3cb283a.0310220207.12c76283@.posting.google.c om...
> I was using the SQL 2000 stored procedure wizard to create stored
> procedures. I can create insert, delete and update SPs however I am
> not able to create the select SP. The wizard does not offer the option
> of selecting "select" type SP. thank you for your replys
> compraj