Hi
Can someone help me with the following select query as it doesn't seem to bring anything back in the Query Analyzer. I've tried two different methods, but get nothing.
1st Method
USE EmployerEngagement
SELECT On_Stop
FROM tblEmployer
WHERE On_Stop = NULL AND Emp_ID IN
(SELECT Emp_ID
FROM tblWP_Details
WHERE Record_ID IN
(SELECT Record_ID
FROM tblVetting
WHERE Next_Vett_Date < GETDATE()))
2nd Method
USE EmployerEngagement
SELECT On_Stop
FROM tblEmployer INNER JOIN tblWP_Details
ON tblEmployer.Emp_ID = tblWP_Details.Emp_ID INNER JOIN dbo.tblVetting
ON tblWP_Details.Record_ID = tblVetting.Record_ID
WHERE tblEmployer.On_Stop = NULL
AND tblVetting.Next_Vett_Date < GETDATE()
Thankssee "SET ANSI_NULLS" in books online...
change "where ... = NULL" to "where ... IS NULL"
and see how you get on..
HTH,
Bill|||Thanks, I was just about to reply to say I've figured it out.
I just realised that the field in question had a default value of 0 not Null. :rolleyes:|||but did you get Bill's point about = Null. Nothing equals Null because Null is not a value. it is unknown or the abscence of value. So unless you play with the SQL Server settings, anytime you search for
SELECT * FROM MyTable WHERE MyField = Null
you will always get 0 rows.
Showing posts with label analyzer. Show all posts
Showing posts with label analyzer. Show all posts
Friday, March 23, 2012
Friday, February 24, 2012
Help with linked servers
Hello,
I have two servers db1 and db2. I have created a linked server in db2 to
point to db1. It works great from the server db2 via query analyzer. I can
do a select * from db1.dbname.dbo.tablename. However I get the message
"Server: Msg 18452, Level 14, State 1, Line 1
Login failed for user '(null)'. Reason: Not associated with a trusted SQL
Server connection."
when I try the run the same query from a XP Pro box which is not hosting one
of the db servers. The dbservers are running w2k3 and it's sql2k. Thanks in
advance.
JakeYou do not have Kerberos delegation configured properly. Check out the
following KB article for the details.
http://support.microsoft.com/default.aspx?scid=kb;en-us;319723
Sincerely,
Anthony Thomas
"Jake" <rondican@.hotmail.com> wrote in message
news:OUSaF$2yEHA.3908@.TK2MSFTNGP12.phx.gbl...
> Hello,
> I have two servers db1 and db2. I have created a linked server in db2
to
> point to db1. It works great from the server db2 via query analyzer. I can
> do a select * from db1.dbname.dbo.tablename. However I get the message
> "Server: Msg 18452, Level 14, State 1, Line 1
> Login failed for user '(null)'. Reason: Not associated with a trusted SQL
> Server connection."
> when I try the run the same query from a XP Pro box which is not hosting
one
> of the db servers. The dbservers are running w2k3 and it's sql2k. Thanks
in
> advance.
> Jake
>
I have two servers db1 and db2. I have created a linked server in db2 to
point to db1. It works great from the server db2 via query analyzer. I can
do a select * from db1.dbname.dbo.tablename. However I get the message
"Server: Msg 18452, Level 14, State 1, Line 1
Login failed for user '(null)'. Reason: Not associated with a trusted SQL
Server connection."
when I try the run the same query from a XP Pro box which is not hosting one
of the db servers. The dbservers are running w2k3 and it's sql2k. Thanks in
advance.
JakeYou do not have Kerberos delegation configured properly. Check out the
following KB article for the details.
http://support.microsoft.com/default.aspx?scid=kb;en-us;319723
Sincerely,
Anthony Thomas
"Jake" <rondican@.hotmail.com> wrote in message
news:OUSaF$2yEHA.3908@.TK2MSFTNGP12.phx.gbl...
> Hello,
> I have two servers db1 and db2. I have created a linked server in db2
to
> point to db1. It works great from the server db2 via query analyzer. I can
> do a select * from db1.dbname.dbo.tablename. However I get the message
> "Server: Msg 18452, Level 14, State 1, Line 1
> Login failed for user '(null)'. Reason: Not associated with a trusted SQL
> Server connection."
> when I try the run the same query from a XP Pro box which is not hosting
one
> of the db servers. The dbservers are running w2k3 and it's sql2k. Thanks
in
> advance.
> Jake
>
Help with linked servers
Hello,
I have two servers db1 and db2. I have created a linked server in db2 to
point to db1. It works great from the server db2 via query analyzer. I can
do a select * from db1.dbname.dbo.tablename. However I get the message
"Server: Msg 18452, Level 14, State 1, Line 1
Login failed for user '(null)'. Reason: Not associated with a trusted SQL
Server connection."
when I try the run the same query from a XP Pro box which is not hosting one
of the db servers. The dbservers are running w2k3 and it's sql2k. Thanks in
advance.
Jake
You do not have Kerberos delegation configured properly. Check out the
following KB article for the details.
http://support.microsoft.com/default...b;en-us;319723
Sincerely,
Anthony Thomas
"Jake" <rondican@.hotmail.com> wrote in message
news:OUSaF$2yEHA.3908@.TK2MSFTNGP12.phx.gbl...
> Hello,
> I have two servers db1 and db2. I have created a linked server in db2
to
> point to db1. It works great from the server db2 via query analyzer. I can
> do a select * from db1.dbname.dbo.tablename. However I get the message
> "Server: Msg 18452, Level 14, State 1, Line 1
> Login failed for user '(null)'. Reason: Not associated with a trusted SQL
> Server connection."
> when I try the run the same query from a XP Pro box which is not hosting
one
> of the db servers. The dbservers are running w2k3 and it's sql2k. Thanks
in
> advance.
> Jake
>
I have two servers db1 and db2. I have created a linked server in db2 to
point to db1. It works great from the server db2 via query analyzer. I can
do a select * from db1.dbname.dbo.tablename. However I get the message
"Server: Msg 18452, Level 14, State 1, Line 1
Login failed for user '(null)'. Reason: Not associated with a trusted SQL
Server connection."
when I try the run the same query from a XP Pro box which is not hosting one
of the db servers. The dbservers are running w2k3 and it's sql2k. Thanks in
advance.
Jake
You do not have Kerberos delegation configured properly. Check out the
following KB article for the details.
http://support.microsoft.com/default...b;en-us;319723
Sincerely,
Anthony Thomas
"Jake" <rondican@.hotmail.com> wrote in message
news:OUSaF$2yEHA.3908@.TK2MSFTNGP12.phx.gbl...
> Hello,
> I have two servers db1 and db2. I have created a linked server in db2
to
> point to db1. It works great from the server db2 via query analyzer. I can
> do a select * from db1.dbname.dbo.tablename. However I get the message
> "Server: Msg 18452, Level 14, State 1, Line 1
> Login failed for user '(null)'. Reason: Not associated with a trusted SQL
> Server connection."
> when I try the run the same query from a XP Pro box which is not hosting
one
> of the db servers. The dbservers are running w2k3 and it's sql2k. Thanks
in
> advance.
> Jake
>
Help with linked servers
Hello,
I have two servers db1 and db2. I have created a linked server in DB2 to
point to db1. It works great from the server DB2 via query analyzer. I can
do a select * from db1.dbname.dbo.tablename. However I get the message
"Server: Msg 18452, Level 14, State 1, Line 1
Login failed for user '(null)'. Reason: Not associated with a trusted SQL
Server connection."
when I try the run the same query from a XP Pro box which is not hosting one
of the db servers. The dbservers are running w2k3 and it's sql2k. Thanks in
advance.
JakeYou do not have Kerberos delegation configured properly. Check out the
following KB article for the details.
http://support.microsoft.com/defaul...kb;en-us;319723
Sincerely,
Anthony Thomas
"Jake" <rondican@.hotmail.com> wrote in message
news:OUSaF$2yEHA.3908@.TK2MSFTNGP12.phx.gbl...
> Hello,
> I have two servers db1 and db2. I have created a linked server in db2
to
> point to db1. It works great from the server DB2 via query analyzer. I can
> do a select * from db1.dbname.dbo.tablename. However I get the message
> "Server: Msg 18452, Level 14, State 1, Line 1
> Login failed for user '(null)'. Reason: Not associated with a trusted SQL
> Server connection."
> when I try the run the same query from a XP Pro box which is not hosting
one
> of the db servers. The dbservers are running w2k3 and it's sql2k. Thanks
in
> advance.
> Jake
>
I have two servers db1 and db2. I have created a linked server in DB2 to
point to db1. It works great from the server DB2 via query analyzer. I can
do a select * from db1.dbname.dbo.tablename. However I get the message
"Server: Msg 18452, Level 14, State 1, Line 1
Login failed for user '(null)'. Reason: Not associated with a trusted SQL
Server connection."
when I try the run the same query from a XP Pro box which is not hosting one
of the db servers. The dbservers are running w2k3 and it's sql2k. Thanks in
advance.
JakeYou do not have Kerberos delegation configured properly. Check out the
following KB article for the details.
http://support.microsoft.com/defaul...kb;en-us;319723
Sincerely,
Anthony Thomas
"Jake" <rondican@.hotmail.com> wrote in message
news:OUSaF$2yEHA.3908@.TK2MSFTNGP12.phx.gbl...
> Hello,
> I have two servers db1 and db2. I have created a linked server in db2
to
> point to db1. It works great from the server DB2 via query analyzer. I can
> do a select * from db1.dbname.dbo.tablename. However I get the message
> "Server: Msg 18452, Level 14, State 1, Line 1
> Login failed for user '(null)'. Reason: Not associated with a trusted SQL
> Server connection."
> when I try the run the same query from a XP Pro box which is not hosting
one
> of the db servers. The dbservers are running w2k3 and it's sql2k. Thanks
in
> advance.
> Jake
>
Subscribe to:
Posts (Atom)