|
Nitin.Jen wrote: Wat is meaning of IDENTITY(1,1)....??
Seriously?
I put "IDENTITY(1,1)" into google and I got back this as my first hit![^]
|
|
|
|
|
U can insert any extension in the DB .you need to use the data type as image
If U Get Errors U Will Learn
If U Don't Get Errors U Have Learnt
|
|
|
|
|
Nitin.Jen wrote: Can we create Database of Music Files using SQL Server 2000.
Yes. It is pretty easy.
Nitin.Jen wrote: please give an example
Nope.
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
Hi,
How can i insert data saved in Excel file on Clientside into database on Serverside.
thanks,
|
|
|
|
|
In Enterprise Manager select:
Tools, Data Transformation Services, Import Data...
The wizard will guide you through the import.
Regards
Guy
You always pass failure on the way to success.
|
|
|
|
|
Thanks for your reply!
But my meaning is how to implement it in program based on B/S arch.
|
|
|
|
|
You could create a DTS package to read the excel file into a table.
The package could then be run from a job or stored procedure each time data from the spreadsheet needed to be imported.
Eric.W wrote: B/S arch
Can you explain to me what this is please?
Regards
Guy
You always pass failure on the way to success.
|
|
|
|
|
thank you again ,you are very nice.
its meaning is browser/server architecture.
|
|
|
|
|
How can I get the text of create table sql when I know the table name?
Is there any view I can query for?
for example
I create a table T in oracle database.
Can I get the text of its create table sql through oracle view?
"create table T (sno number(3,0) primary key);"
Many thanks.
|
|
|
|
|
Open query analyzer.
Press F8 if the object browser is not present.
Select your database and then right click on the appropriate table.
Cursor over Script Object To New Window As then select Create.
Regards
Guy
You always pass failure on the way to success.
|
|
|
|
|
My apologize. My meaning is to get it by command line,not by the ORACLE console.
Do you have any way in resolving it?
|
|
|
|
|
Hi,
i have a table of employee details where i have empno, name, salary.
i need to select the salary from the table in the descending order. the condition here is that I should not use order by clause.
If U Get Errors U Will Learn
If U Don't Get Errors U Have Learnt
|
|
|
|
|
Are you trying to do this in an inline query.
what is your actual requirement.
Regards
KP
|
|
|
|
|
u can use inline query . but my constraint is not to use order by clause
If U Get Errors U Will Learn
If U Don't Get Errors U Have Learnt
|
|
|
|
|
I could never see any reason for ever not using an order by clause to sort the output of a query.
The only other alternative I can think of is by setting the salary to be the primary key on a clustered index and see if that works.
This would of course be very bad design methodology as the empno field would make better sense as the primary key.
I would be more than happy to be proved wrong and am interested in what solution you come to.
Regards
Guy
You always pass failure on the way to success.
|
|
|
|
|
Try something like this:
<br />
CREATE TABLE #MyTempTable (salary decimal(28,12))<br />
INSERT INTO #MyTempTable <br />
SELECT salary FROM employeedetails<br />
GROUP BY salary <br />
<br />
CREATE INDEX salary <br />
ON #MyTempTable (salary DESC)<br />
<br />
SELECT * FROM #MyTempTable<br />
Regards
Guy
You always pass failure on the way to success.
modified on Friday, December 28, 2007 6:15:09 AM
|
|
|
|
|
Thanks Guy....
It sounds good.and this was the one i guessed....
If U Get Errors U Will Learn
If U Don't Get Errors U Have Learnt
|
|
|
|
|
This sounds very suspiciously like homework to me. We don't actually do your homework for you, so you'd better let us know what you've tried beforehand.
|
|
|
|
|
for (...) {
s.Format("%s",toInsert);
pConn.Execute(...);
}
Sometimes toInsert contains single quotation mark(s), how to do deal with it efficiently?
Thanks very much.
|
|
|
|
|
followait wrote: Sometimes toInsert contains single quotation mark(s), how to do deal with it efficiently?
Use parameterized query
|
|
|
|
|
Could give me some more guide?
pCmd->CommandText=_bstr_t(L"INSERT INTO tmp(id,a,b,c) "
L"VALUES(?,?,?,?)");
Like this, how to go on?
Thanks.
modified on Thursday, December 27, 2007 8:22:18 AM
|
|
|
|
|
followait wrote: pCmd->CommandText=_bstr_t(L"INSERT INTO tmp(id,a,b,c) "
L"VALUES(?,?,?,?)");
In VC I don't know. C# it could be
INSERT INTO tmp(id,a,b,c) VALUES(@id,@a,@b,@c)
CommandObject.Parameters.Add(@id,value);
CommandObject.Parameters.Add(@a,value);
CommandObject.Parameters.Add(@b,value);
CommandObject.Parameters.Add(@c,value);
|
|
|
|
|
"select * from (select username,designation, count(*) as points from (select username,designation from messages union all select username,designation from replies) group by username,designation) order by points desc"
this query works fine with MS Access but not with SQL Server.
Through this query I am listing most active members of forum by counting no. of message and replies. Members are 2 types- Students & Professionals
PLZ.... Help..
|
|
|
|
|
hope you are getting error message at group by clause
if so, try this
select * <br />
from (select username,designation, count(*) as points <br />
from (select username,designation <br />
from messages <br />
union all <br />
select username,designation <br />
from replies<br />
)t1 <br />
group by username,designation<br />
)t2<br />
order by points desc
Regards
KP
|
|
|
|
|
Thanks a lot it worked for me..
I rated u 5
This is 4 u

|
|
|
|