Showing posts with label helloi. Show all posts
Showing posts with label helloi. Show all posts

Thursday, March 22, 2012

Conect to more instance of SQL SERVER 2005

Hello
I have problems to connect me at more than an instance in SQl SERVER 2005,
someone knows what can be?
I can′t see the other instance.
Thank
Cristián Carrasco G.
You need to be more specific about the problem or behavior. What tool are you
using to make the connections? Exactly, what do you mean by 'can't see the
other instance'?
Have you tried to connect to the instance using osql.exe or sqlcmd.exe? Note
that not seeing an instance in a dropdown list is not necessarily a
server-side problem or a connectivity problem, but often an artifact of that
dropdown list.
Linchi
"sqlextreme" wrote:

> Hello
> I have problems to connect me at more than an instance in SQl SERVER 2005,
> someone knows what can be?
> I can′t see the other instance.
> Thank
> Cristián Carrasco G.
|||Hello Linchi
I am trying to connect me using SQL Sever Management Studio, this is the
error message:
TITLE: Connect to Server
ADDITIONAL INFORMATION:
An error has occurred while establishing a connection to the server. When
connecting to SQL Server 2005, this failure may be caused by the fact that
under the default settings SQL Server does not allow remote connections.
(provider: TCP Provider, error: 0 - No se ha podido establecer conexión ya
que el equipo de destino ha denegado activamente dicha conexión.) (Microsoft
SQL Server, Error: 10061)
For help, click:
[url]http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&EvtSrc=MSSQLS erver&EvtID=10061&LinkId=20476[/url]
"Linchi Shea" wrote:
[vbcol=seagreen]
> You need to be more specific about the problem or behavior. What tool are you
> using to make the connections? Exactly, what do you mean by 'can't see the
> other instance'?
> Have you tried to connect to the instance using osql.exe or sqlcmd.exe? Note
> that not seeing an instance in a dropdown list is not necessarily a
> server-side problem or a connectivity problem, but often an artifact of that
> dropdown list.
> Linchi
> "sqlextreme" wrote:

Conect to more instance of SQL SERVER 2005

Hello
I have problems to connect me at more than an instance in SQl SERVER 2005,
someone knows what can be?
I can′t see the other instance.
Thank
Cristián Carrasco G.You need to be more specific about the problem or behavior. What tool are yo
u
using to make the connections? Exactly, what do you mean by 'can't see the
other instance'?
Have you tried to connect to the instance using osql.exe or sqlcmd.exe? Note
that not seeing an instance in a dropdown list is not necessarily a
server-side problem or a connectivity problem, but often an artifact of that
dropdown list.
Linchi
"sqlextreme" wrote:

> Hello
> I have problems to connect me at more than an instance in SQl SERVER 2005,
> someone knows what can be?
> I can′t see the other instance.
> Thank
> Cristián Carrasco G.|||Hello Linchi
I am trying to connect me using SQL Sever Management Studio, this is the
error message:
TITLE: Connect to Server
ADDITIONAL INFORMATION:
An error has occurred while establishing a connection to the server. When
connecting to SQL Server 2005, this failure may be caused by the fact that
under the default settings SQL Server does not allow remote connections.
(provider: TCP Provider, error: 0 - No se ha podido establecer conexión ya
que el equipo de destino ha denegado activamente dicha conexión.) (Microsof
t
SQL Server, Error: 10061)
For help, click:
http://go.microsoft.com/fwlink?Prod...61&LinkId=20476
"Linchi Shea" wrote:
[vbcol=seagreen]
> You need to be more specific about the problem or behavior. What tool are
you
> using to make the connections? Exactly, what do you mean by 'can't see the
> other instance'?
> Have you tried to connect to the instance using osql.exe or sqlcmd.exe? No
te
> that not seeing an instance in a dropdown list is not necessarily a
> server-side problem or a connectivity problem, but often an artifact of th
at
> dropdown list.
> Linchi
> "sqlextreme" wrote:
>

Sunday, March 11, 2012

Conditional query criteria in Access 2003 with SQL Server BE

Hello:
I just upsized an Access 2003 application to a SQL Server 2000 back end.
There is a query that worked fine before the upsize, but does not work now.
The purpose of the query is to give me a list of employees that are
scheduled to work today. The employee master row has 7 checkboxes for the
days of the week.
Here is the SQL for the query. Can someone tell me how to make this work
with the SQL Server BE?
SELECT EmployeeQry.EmpID, EmployeeQry.EmpLast, EmployeeQry.EmpFirst,
EmployeeQry.EmpSSN, EmployeeQry.EmpDept, EmployeeQry.Monday,
EmployeeQry.Tuesday, EmployeeQry.Wednesday, EmployeeQry.Thursday,
EmployeeQry.Friday, EmployeeQry.Saturday, EmployeeQry.Sunday
FROM EmployeeQry
WHERE (((EmployeeQry.Monday)=IIf(Format(Date(),"dddd")=' Monday',True))) OR
(((EmployeeQry.Tuesday)=IIf(Format(Date(),"dddd")= 'Tuesday',True))) OR
(((EmployeeQry.Wednesday)=IIf(Format(Date(),"dddd" )='Wednesday',True))) OR
(((EmployeeQry.Thursday)=IIf(Format(Date(),"dddd") ='Thursday',True))) OR
(((EmployeeQry.Friday)=IIf(Format(Date(),"dddd")=' Friday',True))) OR
(((EmployeeQry.Saturday)=IIf(Format(Date(),"dddd") ='Saturday',True))) OR
(((EmployeeQry.Sunday)=IIf(Format(Date(),"dddd")=' Sunday',True)));
Thanks
Steve
John:
Thanks for the reply. Sorry ... the query returns no rows, when in fact
there are many for each day of the week. I tried your suggestions ...
comments under each suggestion.
Steve
"John Spencer" wrote:

> I would try:
> Adding to the IIF statement.
> (((EmployeeQry.Tuesday)=IIf(Format(Date(),"dddd")= 'Tuesday',True,False)))
>
I tried this with no difference

> Or even simpler, drop the IIF statement
> EmployeeQry.Tuesday= (Format(Date(),"dddd")='Tuesday')
>
This returned all rows of the table.

> IF that still fails then try reversing the logic of the test. Just in
> case SQL server is storing the data as 1 (True) and 0 (False).
> EmployeeQry.Tuesday =IIf(Format(Date(),"dddd")<>'Tuesday',False, True)
>
Didn't work either.

> By the way "..., but does not work now." is not very descriptive of the
> problem. Does that mean, you get the wrong results, no results, an
> error, different results than expected at times, a syntax error or ...?
> Please try to be a bit more specific in describing the problem.
> '================================================= ===
> John Spencer
> Access MVP 2002-2005, 2007
> Center for Health Program Development and Management
> University of Maryland Baltimore County
> '================================================= ===
>
> Steve Happ wrote:
>
|||What type is EmployeeQry.Monday on SQL Server?
It could be as John alluded to that
for SQL Server
True = 1
False = 0
for Access
True = -1
False = 0
I might misunderstand, but you try "1"
instead of "True"
WHERE (((EmployeeQry.Monday)=IIf(Format(Date(),"dddd")=' Monday',1,0))) OR
"Steve Happ" wrote:
> I just upsized an Access 2003 application to a SQL Server 2000 back end.
> There is a query that worked fine before the upsize, but does not work
> now.
> The purpose of the query is to give me a list of employees that are
> scheduled to work today. The employee master row has 7 checkboxes for the
> days of the week.
> Here is the SQL for the query. Can someone tell me how to make this work
> with the SQL Server BE?
> SELECT EmployeeQry.EmpID, EmployeeQry.EmpLast, EmployeeQry.EmpFirst,
> EmployeeQry.EmpSSN, EmployeeQry.EmpDept, EmployeeQry.Monday,
> EmployeeQry.Tuesday, EmployeeQry.Wednesday, EmployeeQry.Thursday,
> EmployeeQry.Friday, EmployeeQry.Saturday, EmployeeQry.Sunday
> FROM EmployeeQry
> WHERE (((EmployeeQry.Monday)=IIf(Format(Date(),"dddd")=' Monday',True))) OR
> (((EmployeeQry.Tuesday)=IIf(Format(Date(),"dddd")= 'Tuesday',True))) OR
> (((EmployeeQry.Wednesday)=IIf(Format(Date(),"dddd" )='Wednesday',True))) OR
> (((EmployeeQry.Thursday)=IIf(Format(Date(),"dddd") ='Thursday',True))) OR
> (((EmployeeQry.Friday)=IIf(Format(Date(),"dddd")=' Friday',True))) OR
> (((EmployeeQry.Saturday)=IIf(Format(Date(),"dddd") ='Saturday',True))) OR
> (((EmployeeQry.Sunday)=IIf(Format(Date(),"dddd")=' Sunday',True)));
>
> Thanks
> Steve
|||or
WHERE (((EmployeeQry.Monday)=IIf(Format(Date(),"dddd")=' Monday',1,Null))) OR
the point being that if Monday = "True"
on SQL, then its value is 1
which will never be equal to Access "True"
which is equal to -1
"Gary Walter" wrote:
> What type is EmployeeQry.Monday on SQL Server?
> It could be as John alluded to that
> for SQL Server
> True = 1
> False = 0
> for Access
> True = -1
> False = 0
> I might misunderstand, but you try "1"
> instead of "True"
> WHERE (((EmployeeQry.Monday)=IIf(Format(Date(),"dddd")=' Monday',1,0))) OR
>
> "Steve Happ" wrote:
>