|
Hi there. You can fully qualify each table with the syntax database.schema.table. For example, to fully qualify the Categories table in the Northwind database, you can use Northwind.dbo.Categories .
|
|
|
|
|
How do you do that within the Server Explorer? Thanks.
|
|
|
|
|
Does it work to make sure "Show SQL Pane" is turned on, then type in the fully qualified name in the sql itself?
|
|
|
|
|
Anyone can teach me how to connect two or more pc sql server together in a local area network?
chung
|
|
|
|
|
Please put a little more effort into your question and I will try to answer...
What type of connection?
What is the expected use?
Is the a fault tolerance question?
Most important, what have you tried???
When people make you see red, be thankful your not colour blind.
|
|
|
|
|
Sorry, i m still new in sql server.And i also new to this forum.
i want to connect few pc sql server together so my system can run at few pc and share same database.
i have tried to do new sql server registration but it fail to connect other pc sql server. i use window authentication and then the other pc i try to connect together also use windows authentication.
chung
|
|
|
|
|
I hope I undrstand what you are trying to do, you have several PC's that you want to connect to an SQL server.
You want to connect to them at an application layer not through code in a project.
Is that correct???
If you just want to connect to an SQL server at the application layer...
Create a DSN entry on "Data Source ODBC" and use the "sa" user to test connectivity.
Create a System DSN follow the wizard and then press "Test Connection" see if this works.
Check it is not XP SP2 or a firewall configuration that is stopping you, check the web there are several sites that can walk you through this.
http://support.microsoft.com/kb/841251/[^]
See how you go.
When people make you see red, be thankful your not colour blind.
|
|
|
|
|
Hi,
The records of the DataSet were loaded from Web Service. I wanna save the records to MS SQL Server table. How can I do? I get a idea: Save the data to xml documents by WriteXml() method, and load the data from xml into SQL Server table. If I do like this , how can I load the xml's records into table? Thanks!
|
|
|
|
|
Are you looking for this
using System.Data.SqlClient;
public DataTable ReturnDataTbl(string XmlFile)
{
DataSet dset = new DataSet();
FileStream fstr = new FileStream(XmlFile, FileMode.Open, FileAccess.Read);
dset.readXml(fstr);
DataTable dtbl = dset.Tables[0];
fstr.Close();
dset.Dispose();
return dtbl;
}
Live Life King Size
Alomgir Miah
|
|
|
|
|
Hi
I have the below sub the reads a single row table and populates the results in a data grid. Some of the fields have numerical values to represent settings.
E.G.
SecurityLevel
1
1 may be admin, so how to I replace the 1 with admin before I populate my datagrid?
Dim Command1 As SqlCommand = New SqlCommand("SELECT [Name], Type, SecurityLevel, Version, CreatedDateTime, Driver, CabinetType, NetworkAddress, LoginFlag, DomainName, AuthenticationType, WebServerAddress FROM dbtab")
Command1.CommandType = CommandType.Text
Command1.Connection = SQLConnection1
myDataSet = New DataSet("myDataSet")
SQLAdapter1.SelectCommand = Command1
SQLAdapter1.Fill(myDataSet, "Document")
DataGrid2.SetDataBinding(myDataSet, "Document")
About 4 of the Columns in the above select statment have values that I would like to replace bases on a lookup list.
OK BIG point I CAN NOT make an intermediate table
Any thoughts
When people make you see red, be thankful your not colour blind.
|
|
|
|
|
Replace SecurityLevel in your Sql statement with a case statement structured as needed.
CASE
WHEN SecurityLevel = 1 THEN 'Administrator'
WHEN SecurityLevel = 2 THEN 'Supervisior'
ELSE 'User'
END As SecurityLevel,
|
|
|
|
|
http://groups.google.com/group/microsoft.public.dotnet.framework.aspnet.webcontrols/browse_thread/thread/e3de64786d1684a2/be32e7aefcb96da6?lnk=st&q=DataGrid+display+custom+value&rnum=1&hl=en#be32e7aefcb96da6
Live Life King Size
Alomgir Miah
|
|
|
|
|
hi buddies
Can anyone help me to get connected with the Oracle 8i through c#. i am using asp.net1.1 and
1. not able to see the "OracleClient" namespace after the "system.Data ".How can i get it.
2. if I want to get connected through Oledb. how can i do that.
Thanks in advance.Please someone help me fast. its urgent.
bye
nauty
|
|
|
|
|
nauty wrote: 1. not able to see the "OracleClient" namespace after the "system.Data ".How can i get it.
You need to add a refernece to System.Data.OracleClient to your assembly. (Right click on the project in the solution folder. Select Add Reference... and look in the .NET tab for it)
nauty wrote: 2. if I want to get connected through Oledb. how can i do that.
Use the classes in the System.Data.OleDb namespace.
ColinMackay.net
Scottish Developers are looking for speakers for user group sessions over the next few months. Do you want to know more?
|
|
|
|
|
So, "osql -L" dumps a list of SQL in the same subnet. What if I want to hide this instance? Is moving it out of the subnet my only option?
|
|
|
|
|
Hi,
Is it possible to combine the two statements below into one?
I want the company name and suppleir's name to list together alphabetically, and not list at the bottom of the supplier's list of names.
"SELECT SupplierID, LastName + ', ' + FirstName AS NameOrCompany, IsLocal FROM Suppliers WHERE IsLocal=false ORDER BY LastName"
"SELECT SupplierID, Company AS NameOrCompany, IsLocal FROM Suppliers WHERE IsLocal=true ORDER BY Company"
Thanks,
Ron
-- modified at 19:01 Monday 20th February, 2006
|
|
|
|
|
How about using a UNION statement for the two queries, then wrap them with an outer SELECT that performs the ordering?
SELECT SupplierID, NameOrCompany, IsLocal
FROM
(
SELECT SupplierID
, LastName + ', ' + FirstName AS NameOrCompany
, IsLocal
FROM Suppliers
WHERE IsLocal=false
UNION ALL
SELECT SupplierID
, Company AS NameOrCompany
, IsLocal
FROM Suppliers
WHERE IsLocal=true
) x
ORDER BY NameOrCompany
|
|
|
|
|
|
What am I doing wrong?
select username AS UserID, domainname AS Domain, dt AS Date from testtable
gives me:
UserID, Domain, Date
kt001, c_domain, 2/20/2006
kt001, p_domain, 2/15/2006
kt001, p_domain, 2/19/2006
which is normal.
SELECT username AS UserID, MAX(domainname) AS Domain, MAX(dt) AS Date
FROM testtable
GROUP BY username
gives me:
UserID, Domain, Date
kt001, p_domain, 2/20/2006
which i would want the domain of whatever the MAX date was... any clues?
|
|
|
|
|
I think you may want to handle this as a subquery - something like this:
Select a.username as User, b.domainname as Domain, a.MaxDT as Date
From
(
Select username, Max(dt) as MaxDT
From testtable
Group By username
) a INNER JOIN testtable b ON a.username=b.username AND a.MaxDT = b.dt
|
|
|
|
|
Hello,
I have a table such as;
(A and B are attribute names)
A B
- -
1 A
1 B
2 B
3 A
5 C
5 A
I would like a query that returns me each distinct group of B column with its A column values.
For instance;
1, 3, 5 > A
1, 2 > B
5 > C
and I would like to be able to do something on each distinct group.
(hope that I could be able to point my request)
Sarp
|
|
|
|
|
|
Hi,
I have the following table t
ID, M_ID, S_ID, Date
1 , 2 , 7 , 2005-05-06 13:45:56:000
2 , 2 , 7 , 2005-05-06 13:45:58:000
3 , 2 , 8 , 2005-05-06 13:46:56:000
4 , 2 , 9 , 2005-05-06 13:46:57:000
The only thing differing row 1 and 2 is the date.
How can i perform a "distinct select" on the 3 first columns (ID, M_ID, S_ID) i.e ignoring date.
The result i want is
ID, M_ID, S_ID, Date
1 , 2 , 7 , 2005-05-06 13:45:56:000
3 , 2 , 8 , 2005-05-06 13:46:56:000
4 , 2 , 9 , 2005-05-06 13:46:57:000
Niclas Ahlqvist
|
|
|
|
|
select ID, M_ID, S_ID, min(Date)
from t
group by ID, M_ID, S_ID
Chris Meech
I am Canadian. [heard in a local bar]
When I want privacy, I'll close the bathroom door. [Stan Shannon]
BAD DAY FOR: Friendly competition, as Ford Motor Co. declared the employee parking lot at its truck plant in Dearborn, Mich., off limits to vehicles built by rival companies. Workers have to drive a Ford to work, or park across the street. [CNNMoney.com]
Nice sig! [Tim Deveaux on Matt Newman's sig with a quote from me]
|
|
|
|
|
Hehe easy enough..
thanks..
nic
|
|
|
|
|