Showing posts with label cant. Show all posts
Showing posts with label cant. Show all posts

Wednesday, March 28, 2012

Please help i can't connect....

Hi
I'm loged on Workstation as a user EUR\zzzz1 and i use different user
EUR\abc123 to map a drive on remote server SERVER2, SERVER2 is a domain
controler . It works.
On SERVER2 i have SQL Server 2000 with mixed mode authentication.
I have a user abc123 added in Active directory on SERVER2:
SERVER2\abc123. The same user is added in Sql Server with rights etc.
When i lounch Query Analyzer on my Workstation and select Sql
Authentication to use EUR\abc123 user i got message "[Microsoft][ODBC
SQL Server Driver][SQL Server]Login failed for user 'EUR\abc123'"
Why i have no access to sql server ?
regards
m
Hi
You must not use SQL Authentication, as it is a domain account, you need to
select NT Authentication when connecting.
Regards
Mike Epprecht, Microsoft SQL Server MVP
Zurich, Switzerland
IM: mike@.epprecht.net
MVP Program: http://www.microsoft.com/mvp
Blog: http://www.msmvps.com/epprecht/
"marta" <grupy_d@.go2.pl> wrote in message
news:1127985222.430902.144700@.o13g2000cwo.googlegr oups.com...
> Hi
> I'm loged on Workstation as a user EUR\zzzz1 and i use different user
> EUR\abc123 to map a drive on remote server SERVER2, SERVER2 is a domain
> controler . It works.
> On SERVER2 i have SQL Server 2000 with mixed mode authentication.
> I have a user abc123 added in Active directory on SERVER2:
> SERVER2\abc123. The same user is added in Sql Server with rights etc.
> When i lounch Query Analyzer on my Workstation and select Sql
> Authentication to use EUR\abc123 user i got message "[Microsoft][ODBC
> SQL Server Driver][SQL Server]Login failed for user 'EUR\abc123'"
> Why i have no access to sql server ?
>
> regards
> m
>
|||Ok now i use windows NT Authentication and i can log in but this way
i'm connected to SERVER2 with user EUR\zzzz1 not abc123... I need to
connect using user abc123. How to do that ?
M.
|||Hi Marta
If EUR\abc123 has been added to the server as a login, you will need SQL
authentication to connect as that login. Are you sure you're using the
right password?
HTH
Kalen Delaney, SQL Server MVP
www.solidqualitylearning.com
"marta" <grupy_d@.go2.pl> wrote in message
news:1127989262.660929.186550@.o13g2000cwo.googlegr oups.com...
> Ok now i use windows NT Authentication and i can log in but this way
> i'm connected to SERVER2 with user EUR\zzzz1 not abc123... I need to
> connect using user abc123. How to do that ?
> M.
>
|||Of course i can map a drive using that pass.
The problem is : how to connect to sql server on remote server with
windows authentication, when i am logged on local workstation with
different user.
M
|||You could probably use "Run As" (right-click the shortcut/executable,
and choose "Run as..." from the menu) to run Query Analyzer under the
context of another user, and therefore be able to pass that security
ticket to the SQL Server when you use Windows Authentication. Runas.exe
can also be called from the command line w/ switches. I believe this
functionality is only available from the right-click menu on Windows
2003 and XP - 2000 contains the command line version.
Good luck,
Tony Sebion
"marta" <grupy_d@.go2.pl> wrote in message
news:1128002474.807122.247970@.g14g2000cwa.googlegr oups.com:

> Of course i can map a drive using that pass.
> The problem is : how to connect to sql server on remote server with
> windows authentication, when i am logged on local workstation with
> different user.
> M
|||you can always connect to the ipc share of remote user with the login/pw of
the user you want
NET USE \\REMOTEPUTER\IPC$ /USER:MYUSERNAME "MYPASSWORD"
now event hough your are logged on as user LOCALUSER...any connection to
remote puter will be as MYUSERNAME
get it ?
"marta" <grupy_d@.go2.pl> wrote in message
news:1128002474.807122.247970@.g14g2000cwa.googlegr oups.com...
> Of course i can map a drive using that pass.
> The problem is : how to connect to sql server on remote server with
> windows authentication, when i am logged on local workstation with
> different user.
> M
>
sql

Please help i can't connect....

Hi
I'm loged on Workstation as a user EUR\zzzz1 and i use different user
EUR\abc123 to map a drive on remote server SERVER2, SERVER2 is a domain
controler . It works.
On SERVER2 i have SQL Server 2000 with mixed mode authentication.
I have a user abc123 added in Active directory on SERVER2:
SERVER2\abc123. The same user is added in Sql Server with rights etc.
When i lounch Query Analyzer on my Workstation and select Sql
Authentication to use EUR\abc123 user i got message "[Microsoft][ODB
C
SQL Server Driver][SQL Server]Login failed for user 'EUR\abc123'"
Why i have no access to sql server ?
regards
mHi
You must not use SQL Authentication, as it is a domain account, you need to
select NT Authentication when connecting.
Regards
--
Mike Epprecht, Microsoft SQL Server MVP
Zurich, Switzerland
IM: mike@.epprecht.net
MVP Program: http://www.microsoft.com/mvp
Blog: http://www.msmvps.com/epprecht/
"marta" <grupy_d@.go2.pl> wrote in message
news:1127985222.430902.144700@.o13g2000cwo.googlegroups.com...
> Hi
> I'm loged on Workstation as a user EUR\zzzz1 and i use different user
> EUR\abc123 to map a drive on remote server SERVER2, SERVER2 is a domain
> controler . It works.
> On SERVER2 i have SQL Server 2000 with mixed mode authentication.
> I have a user abc123 added in Active directory on SERVER2:
> SERVER2\abc123. The same user is added in Sql Server with rights etc.
> When i lounch Query Analyzer on my Workstation and select Sql
> Authentication to use EUR\abc123 user i got message "[Microsoft][O
DBC
> SQL Server Driver][SQL Server]Login failed for user 'EUR\abc123'"
> Why i have no access to sql server ?
>
> regards
> m
>|||Ok now i use windows NT Authentication and i can log in but this way
i'm connected to SERVER2 with user EUR\zzzz1 not abc123... I need to
connect using user abc123. How to do that ?
M.|||Hi Marta
If EUR\abc123 has been added to the server as a login, you will need SQL
authentication to connect as that login. Are you sure you're using the
right password?
HTH
Kalen Delaney, SQL Server MVP
www.solidqualitylearning.com
"marta" <grupy_d@.go2.pl> wrote in message
news:1127989262.660929.186550@.o13g2000cwo.googlegroups.com...
> Ok now i use windows NT Authentication and i can log in but this way
> i'm connected to SERVER2 with user EUR\zzzz1 not abc123... I need to
> connect using user abc123. How to do that ?
> M.
>|||Of course i can map a drive using that pass.
The problem is : how to connect to sql server on remote server with
windows authentication, when i am logged on local workstation with
different user.
M|||You could probably use "Run As" (right-click the shortcut/executable,
and choose "Run as..." from the menu) to run Query Analyzer under the
context of another user, and therefore be able to pass that security
ticket to the SQL Server when you use Windows Authentication. Runas.exe
can also be called from the command line w/ switches. I believe this
functionality is only available from the right-click menu on Windows
2003 and XP - 2000 contains the command line version.
Good luck,
Tony Sebion
"marta" <grupy_d@.go2.pl> wrote in message
news:1128002474.807122.247970@.g14g2000cwa.googlegroups.com:

> Of course i can map a drive using that pass.
> The problem is : how to connect to sql server on remote server with
> windows authentication, when i am logged on local workstation with
> different user.
> M|||you can always connect to the ipc share of remote user with the login/pw of
the user you want
NET USE \\REMOTEPUTER\IPC$ /USER:MYUSERNAME "MYPASSWORD"
now event hough your are logged on as user LOCALUSER...any connection to
remote puter will be as MYUSERNAME
get it ?
"marta" <grupy_d@.go2.pl> wrote in message
news:1128002474.807122.247970@.g14g2000cwa.googlegroups.com...
> Of course i can map a drive using that pass.
> The problem is : how to connect to sql server on remote server with
> windows authentication, when i am logged on local workstation with
> different user.
> M
>

Please Help ... Can't Figure This One Out

Greetings,
I need to write a SQL stored procedure to accomplish the following and I'm
not having any luck. So that I don't confuse anyone too much, I'll leave out
the code I'm trying and just explain what I'm trying to do.
Start with
Table: sequenceOrder
orderNumber totalUnits
101 26
102 11
103 9
104 8
105 16
I have a VB.NET program that will be passing in two parameters, one is
workDays (number of work days during a given w) and the other is
dailyUnits (maximum number units to be made during each wday).
I need a running total, by record line, for the totalUnits. If the running
total is less than dailyUnits, then I need to add the current value for that
work day. If the running total is greater than dailyUnits, then I need to
add 1 to the current value for that work day. Also, I need to number the
orders within that workDay.
Using the sample table above and having workDays = 3 and dailyUnits = 30 the
output table would like this:
Finish with
Table: sequenceOrder
orderNumber totalUnits workDay sequenceOrder
101 26 1 1
102 11 2 1
103 9 2 2
104 8 2 3
105 16 3 1
106 12 3 2
Is this possible, if so how do I get this done?
Thanks for all the help,
James Walker, Jr."James Walker" <walker@.modernfold.com> wrote in message
news:%232sOjRBgGHA.2188@.TK2MSFTNGP04.phx.gbl...
> Greetings,
> I need to write a SQL stored procedure to accomplish the following and I'm
> not having any luck. So that I don't confuse anyone too much, I'll leave
> out the code I'm trying and just explain what I'm trying to do.
> Start with
> Table: sequenceOrder
> orderNumber totalUnits
> 101 26
> 102 11
> 103 9
> 104 8
> 105 16
> I have a VB.NET program that will be passing in two parameters, one is
> workDays (number of work days during a given w) and the other is
> dailyUnits (maximum number units to be made during each wday).
> I need a running total, by record line, for the totalUnits. If the running
> total is less than dailyUnits, then I need to add the current value for
> that work day. If the running total is greater than dailyUnits, then I
> need to add 1 to the current value for that work day. Also, I need to
> number the orders within that workDay.
> Using the sample table above and having workDays = 3 and dailyUnits = 30
> the output table would like this:
> Finish with
> Table: sequenceOrder
> orderNumber totalUnits workDay sequenceOrder
> 101 26 1 1
> 102 11 2 1
> 103 9 2 2
> 104 8 2 3
> 105 16 3 1
> 106 12 3 2
> Is this possible, if so how do I get this done?
>
Ok, this is a fun one. Here's a simple solution, using intiger division of
the running total by the number of hours per day. But I worry that the
assignment of orders to days is too "dumb". I have a suspicion that there's
a better solution somewhere that would sequence the work to fill up the days
and minimize idle time.
create table Orders
(
OrderNumber int primary key,
TotalUnits int not null
)
insert into Orders(orderNumber,TotalUnits)
select 101,26
union all select 102,11
union all select 103,9
union all select 104,8
union all select 105,16
go
declare @.days int,
@.dailyUnits int
set @.days = 3
set @.DailyUnits = 30;
with UpcomingOrders(OrderNumber,TotalUnits,Ru
nningTotal) as
(
select OrderNumber, TotalUnits,
(select sum(TotalUnits) from Orders where OrderNumber <= o.OrderNumber)
RunningTotal
from Orders o
)
select
Ordernumber,
TotalUnits,
1+RunningTotal/@.DailyUnits WorkDay,
row_number() over (partition by RunningTotal/@.DailyUnits order by
OrderNumber) SequenceOrder
from UpcomingOrders
where 1+RunningTotal/@.DailyUnits <= @.days
David|||David,
Thanks for the reply. It works great. Also, "filling up idle time" is in the
next phase. As in my example, the first day has 4 more units it could make,
so I will need to search down the records where the totalUnits is <= 4 and
then move that order up for the w.
James Walker, Jr.
"David Browne" <davidbaxterbrowne no potted meat@.hotmail.com> wrote in
message news:%23JMsfHCgGHA.452@.TK2MSFTNGP02.phx.gbl...
> "James Walker" <walker@.modernfold.com> wrote in message
> news:%232sOjRBgGHA.2188@.TK2MSFTNGP04.phx.gbl...
> Ok, this is a fun one. Here's a simple solution, using intiger division
> of the running total by the number of hours per day. But I worry that the
> assignment of orders to days is too "dumb". I have a suspicion that
> there's a better solution somewhere that would sequence the work to fill
> up the days and minimize idle time.
>
> create table Orders
> (
> OrderNumber int primary key,
> TotalUnits int not null
> )
> insert into Orders(orderNumber,TotalUnits)
> select 101,26
> union all select 102,11
> union all select 103,9
> union all select 104,8
> union all select 105,16
> go
> declare @.days int,
> @.dailyUnits int
> set @.days = 3
> set @.DailyUnits = 30;
>
> with UpcomingOrders(OrderNumber,TotalUnits,Ru
nningTotal) as
> (
> select OrderNumber, TotalUnits,
> (select sum(TotalUnits) from Orders where OrderNumber <= o.OrderNumber)
> RunningTotal
> from Orders o
> )
> select
> Ordernumber,
> TotalUnits,
> 1+RunningTotal/@.DailyUnits WorkDay,
> row_number() over (partition by RunningTotal/@.DailyUnits order by
> OrderNumber) SequenceOrder
> from UpcomingOrders
> where 1+RunningTotal/@.DailyUnits <= @.days
>
> David
>

Monday, March 26, 2012

Please help -- So stuck now -- Cant connect to sql from external source

Hi all,

I am having real problems allowing a client to connect to sql 2000
through enterprise manager.. I have tried all sorts but to no avail:

From our local network all works fine.. Using the adsl line.. Even if
i try and connect to the external IP and use login details..(As
opposed to connecting local and using windows accounts) I can ping and
telnet the server and port.

The server is behind a firewall so i opened up port 1433 and port
1434(? is it needed).. To replicate the client i took the same laptop
home that i use to connect in the office.. However using the exact
same config on my dial up at home i can ping the server but cannot
telnet onto port 1433.. I think that this is the vital missing step
but do not know hpw to resolve it..

Any ideas anyone

Cheers
Antanthonykallay@.hotmail.com (Anthony) wrote in message news:<77112a1e.0309040245.6d426db9@.posting.google.com>...
> Hi all,
> I am having real problems allowing a client to connect to sql 2000
> through enterprise manager.. I have tried all sorts but to no avail:
> From our local network all works fine.. Using the adsl line.. Even if
> i try and connect to the external IP and use login details..(As
> opposed to connecting local and using windows accounts) I can ping and
> telnet the server and port.
> The server is behind a firewall so i opened up port 1433 and port
> 1434(? is it needed).. To replicate the client i took the same laptop
> home that i use to connect in the office.. However using the exact
> same config on my dial up at home i can ping the server but cannot
> telnet onto port 1433.. I think that this is the vital missing step
> but do not know hpw to resolve it..
> Any ideas anyone
> Cheers
> Ant

This KB article explains what firewall configuration is required:

http://support.microsoft.com/defaul...kb;en-us;287932

Simon

Wednesday, March 21, 2012

Please can someone point out whats wrong with my code

Hi,

I have code on a page to update one table and insert info into another, but I cant make it work. I am new to coding and i think there are many mistakes. Please can someone pick out a few that need to be changed for the page to work.

Code:

private bool ExecuteUpdate(int quantity)
{
SqlConnection con = new SqlConnection();
con.ConnectionString = "ConnectionString";

con.Open();

SqlCommand command = new SqlCommand();
command.Connection = con;
TextBox TextBox1 = (TextBox)FormView1.FindControl("TextBox1");
Label labname = (Label)FormView1.FindControl("Label3");
Label labid = (Label)FormView1.FindControl("Label13");

command.CommandText = "UPDATE Items SET Quantityavailable WHERE productID='@.productID' = " + TextBox1.Text +

command.ExecuteNonQuery();
return true;
con.Close();
}

private bool ExecuteInsert(String quantity)
{
SqlConnection con = new SqlConnection();
con.ConnectionString = "ConnectionString";

con.Open();

SqlCommand command = new SqlCommand();
command.Connection = con;
TextBox TextBox1 = (TextBox)FormView1.FindControl("TextBox1");
Label labname = (Label)FormView1.FindControl("Label3");
Label labid = (Label)FormView1.FindControl("Label13");

command.CommandText = "INSERT Transactions SET Usersname = @.UserName" +
"; INSERT Transactions SET Itemid WHERE productID='@.productID' = @.productID; INSERT Transactions SET itemname = @.Itemsname" +
"; INSERT Transactions SET Date WHERE productID='@.productID' = " + DateTime.Now.ToString() +
"; INSERT Transactions SET Qty WHERE productID='@.productID' = " + TextBox1.Text;
command.Parameters.Add("@.UserName", System.Web.HttpContext.Current.User.Identity.Name);
command.Parameters.Add("@.Itemsname", labname.Text);
command.Parameters.Add("@.productID", labid.Text);
command.ExecuteNonQuery();
return true;
con.Close();
}

protected void Button2_Click(object sender, EventArgs e)
{
TextBox TextBox1 = FormView1.FindControl("TextBox1") as TextBox;
ExecuteUpdate(Int32.Parse(TextBox1.Text) );
ExecuteInsert(Int32.Parse);
}

Current error message is:

The best overloaded method match for 'detailproview.ExecuteInsert(string)' has some invalid arguments

to

Line 74: ExecuteInsert(Int32.Parse);
 
Thanks if someone can help!
Jon 

Hi,

The best way for you to see why it is not working is to debug your code and check the values in the object using Immediate window or pointing the mounse on the objects after value is assigned.

Maybe you are not getting the id that you are using in the WHERE lause of your update statement. Make sure you are getting valid id and that it exists in database.

Finally you are calling return true before closing the connection, first close the connection than return a value.

|||


Int32.Parse is a method and you need to pass in an argument to it, the one string which you want to conevrt to an int, like you are doing it here:

ExecuteUpdate(Int32.Parse(TextBox1.Text) );

Hope this helps,

Vivek

|||

Hi,

Thanks both great to help me iron out bugs.

I will put up a new post with the latest set of error messages!

Cheers

Jon

Playing with database mirroring

I started to play with mirroring with a fresh SQLServer 2005 but I can't get
it to work. This is the scenario:
server1.mydomain - Primary - Hosts "MyDatabase" - Primary Windows 2003
domain controller
server2.mydomain - Future mirror - Secondary Windows 2003 domain controller
server2.mydomain/secondary - a secondary instance for the witness (I don't
have a third machine to test)
1) I backup MyDatabase with SQL Management Studio (SMS).
2) I restore the database from the file (backup.bak) into server2 with
NORECOVERY (SMS shows "Recovering...")
3) From server1 I use the "Configure Security Wizard" to create endpoints in
ports 6000 for server1, 6000 for server2, 6001 for server2/secondary.
Endpoints are succesfully created.
4) All three servers use the same accout (MYDOMAIN\Administrator), used to
create the endpoints.
5) Then in SMS I click "Start Mirroring" and, after 10 sec. aprox, I get an
error "TCP://server1.mydomain.com:6000" could not be reached".
6) In server2, SMS now shows "In recovery" for Mydatabase, but mirroring is
not working. If I click "Start Mirroring" in server1 again, I get a "Neither
the partner nor the witness server instance for database MyDatabase is
available"
What is the problem? From Server1 I tried telneting server2:6000, and
server2:6001 and both connections are accepted. I also tried setting
encryption on/off but I can't fix the errors.
Any ideas? Thanks a lot!
Check the Surface Area configuration and make sure that each instance has
remote connections enabled.
Mike
Mentor
Solid Quality Learning
http://www.solidqualitylearning.com
"Kirsten" <noreply@.nospam.com> wrote in message
news:OXsjAkVFGHA.2036@.TK2MSFTNGP14.phx.gbl...
>I started to play with mirroring with a fresh SQLServer 2005 but I can't
>get it to work. This is the scenario:
> server1.mydomain - Primary - Hosts "MyDatabase" - Primary Windows 2003
> domain controller
> server2.mydomain - Future mirror - Secondary Windows 2003 domain
> controller
> server2.mydomain/secondary - a secondary instance for the witness (I don't
> have a third machine to test)
> 1) I backup MyDatabase with SQL Management Studio (SMS).
> 2) I restore the database from the file (backup.bak) into server2 with
> NORECOVERY (SMS shows "Recovering...")
> 3) From server1 I use the "Configure Security Wizard" to create endpoints
> in ports 6000 for server1, 6000 for server2, 6001 for server2/secondary.
> Endpoints are succesfully created.
> 4) All three servers use the same accout (MYDOMAIN\Administrator), used to
> create the endpoints.
> 5) Then in SMS I click "Start Mirroring" and, after 10 sec. aprox, I get
> an error "TCP://server1.mydomain.com:6000" could not be reached".
> 6) In server2, SMS now shows "In recovery" for Mydatabase, but mirroring
> is not working. If I click "Start Mirroring" in server1 again, I get a
> "Neither the partner nor the witness server instance for database
> MyDatabase is available"
> What is the problem? From Server1 I tried telneting server2:6000, and
> server2:6001 and both connections are accepted. I also tried setting
> encryption on/off but I can't fix the errors.
> Any ideas? Thanks a lot!
>
|||Remote connections are enabled. Other ideas?
Thanks a lot.
"Michael Hotek" <mike@.solidqualitylearning.com> wrote in message
news:%23N5dhRWFGHA.3920@.TK2MSFTNGP09.phx.gbl...[vbcol=seagreen]
> Check the Surface Area configuration and make sure that each instance has
> remote connections enabled.
> --
> Mike
> Mentor
> Solid Quality Learning
> http://www.solidqualitylearning.com
>
> "Kirsten" <noreply@.nospam.com> wrote in message
> news:OXsjAkVFGHA.2036@.TK2MSFTNGP14.phx.gbl...
don't[vbcol=seagreen]
endpoints[vbcol=seagreen]
to
>
|||Done. Something was wrong with DNS. I tried with TCP://192.168.0.xxx
instead of name and it worked.
Cheers.
"Kirsten" <email@.emailnospam.com> escribi en el mensaje
news:u4H4zBYFGHA.1676@.TK2MSFTNGP09.phx.gbl...
> Remote connections are enabled. Other ideas?
> Thanks a lot.
> "Michael Hotek" <mike@.solidqualitylearning.com> wrote in message
> news:%23N5dhRWFGHA.3920@.TK2MSFTNGP09.phx.gbl...
> don't
> endpoints
> to
>
sql

Monday, February 20, 2012

Pivot Query or Cross Tab queries

I can't seem to figure out how to create a cross tab or pivot query on data.
If I was writing the SQL in Access I would write it like
TRANSFORM SUM(DTL.Amount) AS Amount
SELECT
STC.ClientID
, STC.Client
, STC.SS_ID
, STC.Region
, STC.[Sales Director]
, STC.[Product Consultant]
, STC.CCC
FROM (SELECT
STC.DW_SELLER_ID AS ClientID
, STC.SELLER_NAME AS Client
, STC.SS_ID
, STC.TEAM_ACQ_NAME AS Region
, STC.ACCOUNT_MANAGER_NAME AS [Sales Director]
, STC.[Product Consultant]
, CTC.CLIENT_CENTRIC_CATEGORY_DSCR AS CCC
FROM dbo.tSeller_Team_Current AS STC
LEFT JOIN OPENQUERY(SSOT_DWDB,
'SELECT DW_CLIENT_ID, CLIENT_CENTRIC_CATEGORY_DSCR
FROM DW.DW_SALES_CLIENT_TEAM_CURR') AS CTC
ON STC.DW_SELLER_ID = CTC.DW_CLIENT_ID
WHERE STC.Channel='RF'
AND STC.SELLER_ACTIVATION_DATE Is Not Null
AND SELLER_CLOSED_DATE Is Null) AS STC
LEFT JOIN dbo.tCRC_Details AS DTL
ON STC.ClientID=DTL.ClientID
GROUP BY
STC.ClientID
, STC.Client
, STC.SS_ID
, STC.Region
, STC.[Sales Director]
, STC.[Product Consultant]
, STC.CCC
PIVOT DTL.[Description]
How could I write the query so it works in a View?
Thanks in advance.
Mark
I don't believe you can do crosstab queries within SQL Server like you can
in Access
"MChrist" <MChrist@.discussions.microsoft.com> wrote in message
news:C5FE6FA4-8AB9-49DE-BA7F-1BD0F226B01A@.microsoft.com...
>I can't seem to figure out how to create a cross tab or pivot query on
>data.
> If I was writing the SQL in Access I would write it like
> TRANSFORM SUM(DTL.Amount) AS Amount
> SELECT
> STC.ClientID
> , STC.Client
> , STC.SS_ID
> , STC.Region
> , STC.[Sales Director]
> , STC.[Product Consultant]
> , STC.CCC
> FROM (SELECT
> STC.DW_SELLER_ID AS ClientID
> , STC.SELLER_NAME AS Client
> , STC.SS_ID
> , STC.TEAM_ACQ_NAME AS Region
> , STC.ACCOUNT_MANAGER_NAME AS [Sales Director]
> , STC.[Product Consultant]
> , CTC.CLIENT_CENTRIC_CATEGORY_DSCR AS CCC
> FROM dbo.tSeller_Team_Current AS STC
> LEFT JOIN OPENQUERY(SSOT_DWDB,
> 'SELECT DW_CLIENT_ID, CLIENT_CENTRIC_CATEGORY_DSCR
> FROM DW.DW_SALES_CLIENT_TEAM_CURR') AS CTC
> ON STC.DW_SELLER_ID = CTC.DW_CLIENT_ID
> WHERE STC.Channel='RF'
> AND STC.SELLER_ACTIVATION_DATE Is Not Null
> AND SELLER_CLOSED_DATE Is Null) AS STC
> LEFT JOIN dbo.tCRC_Details AS DTL
> ON STC.ClientID=DTL.ClientID
> GROUP BY
> STC.ClientID
> , STC.Client
> , STC.SS_ID
> , STC.Region
> , STC.[Sales Director]
> , STC.[Product Consultant]
> , STC.CCC
> PIVOT DTL.[Description]
> How could I write the query so it works in a View?
> Thanks in advance.
> Mark
>
|||Thanks for your response Al. After scoping books and the help for several
hours that's the conclusion I came to also. Strange how the little baby
brother can do something that big brother can't. But that's as consistent as
the use of functions and naming conventions across MS software.
Have a great weekend.
Mark
"Al Newbie" wrote:

> I don't believe you can do crosstab queries within SQL Server like you can
> in Access
> "MChrist" <MChrist@.discussions.microsoft.com> wrote in message
> news:C5FE6FA4-8AB9-49DE-BA7F-1BD0F226B01A@.microsoft.com...
>
>