|
After your group by clause just add order by clause.
i.e. select........ group by...... order by ... desc
gauthee
|
|
|
|
|
see if i use order by edate desc then which one have the highest date that record only displaying Others are not displaying ,
Regards,
Magi
|
|
|
|
|
Magi,
When you use group by the result would always be groupwise so that might be the reason it is howing date only for that group.
An alernative - create a view and write your query using group by then on the view you can use the top keyword and retrieve your records!
select top n * from view_name orderby column_name
gauthee
|
|
|
|
|
Hi what to value want to give in the n place...,
Plz understand my situation...,
See in that stored procedure...,
And give ur ideas...,
In that stored procedure i cant say n like...,
In that place i want to show some value...,
But that also after dispaly the records only i will get...,
Regards,
Magi
|
|
|
|
|
You said there would be more than one record with the same empno and you wnat the latest one, is there a field to identify the latest record of the two records?
gauthee
|
|
|
|
|
Ya for same employee have more than one record, Same time i like to show other employee details also like that...,
If i use order by edate procedure then i am getting which employee have recent date record that one only displaying...,
Tahts the probs...,
Regards,
Magi
|
|
|
|
|
You have been told before not to use 'urgent' or 'help me' in your message titles.
_____________________________________________
Flea Market! It's just like...it's just like...A MINI-MALL!
|
|
|
|
|
Hey People
Had a funny question to ask.
Want to get a new server with 2 x quad core cpu.
Now sql server 2000 standard supports 4 cpu but will sql accept 2*quad=8 into cosideration or the actual hardware cpus which is 2 ???
|
|
|
|
|
Not sure. Have you looked around at Microsoft's site? I would imagine there are benefits to running SQL Server 2000 on a quad core.
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
AFAIK for all microsoft software when they refer to a CPU limit they mean each physical CPU, no matter how many cores each CPU has. This definatly applies to thier operating systems and I belive it applies to all of thier products.
Your best bet would be to give them a quick call and ask, that way you'll definatly know
|
|
|
|
|
From the SQL 2k5 licencing document download on Microsoft's SQL Server Licensing Page[^]
"Multicore processors, which consist of multiple processing execution units or “cores” on one chip, are seen as a promising way to boost computing power. Microsoft has been driving thought leadership in this area by charging the same amount per processor, regardless of how many cores are in the processor."
|
|
|
|
|
hi everyone
please give me hint how i can do following:
I have inserted data into database using textboxes and database gets updated. Each record contains 5 fields. When I submit data from textboxes I want next page appear and show data.
But wait ......... i need each record as below
Name: abc
address: def street
phone: 1234
email: a11111@gmail.com
above is one record.
I want to if i feed new data in form text boxes. This new page show block of data of each record (new at the top) as given above.
Please guide me how can i do that ... if any article in this regard on code project please mention.
Thank You.
destined to win
|
|
|
|
|
u can use addition field in to ue database "register_date_time"
and after every affected u have to reload ur data from ur db .
be carefull u must to use orderby command with desc parameter in ur sql command.
good luck
msma
|
|
|
|
|
Hi All,
Is it possible to convert SQL Server 2000 database file to Sql Server 2005 .mdf file. If it is possible then please tell me how to do it.
Thanx in Advance.
Regards,
Paramhans Dubey.
|
|
|
|
|
You should be able to attach the SQL 2000 database file to SQL 2005. Have you tried attaching it?
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
Yes, you can restore a SQL Server 2000 database backup to a SQL Server 2005 server. You simply use the normal Restore features - use Management Studio or the RESTORE DATABASE command.
The compatibility level for the database will be 80 (i.e. SQL Server 2000 compatible) by default. If you want to take full advantage of SQL Server 2005 features, you will need to use sp_dbcmptlevel to set the compatibility level to 90.
|
|
|
|
|
hi friends,
As I have mentioned earlier I m using SQL Server 2005 Express Edition, So I don't have Management Studio.
I tried following restore command :
"
Restoring SQL Server 2000 Database *.bak backup file to SQL Server 2005 Express Edition *.mdf file<br />
RESTORE filelistonly<br />
FROM disk = 'C:\Documents and Settings\Administrator\Desktop\ImageDB.bak' RESTORE DATABASE image<br />
FROM disk = 'C:\Documents and Settings\Administrator\Desktop\ImageDB.bak' WITH move 'ImageDB' TO 'C:\Documents and Settings\Administrator\My Documents\Visual Studio 2005\Projects\WindowsApplication1\WindowsApplication1\Image.mdf',<br />
move 'Image_log' TO 'C:\Documents and Settings\Administrator\My Documents\Visual Studio 2005\Projects\WindowsApplication1\WindowsApplication1\Image.ldf' "
But I am unable to find any mdf or ldf file in the directory "C:\Documents and Settings\Administrator\My Documents\Visual Studio 2005\Projects\WindowsApplication1\WindowsApplication1".
I also searched the directory ” C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data” but that was also of no use.
Regards,
Paramhans Dubey.
|
|
|
|
|
Hi everyone,
I'm designing a report which currently includes two tables: dataset1_datatable2 & dataset1_datatable4.
I need to make a very simple comparison between two fields from these two tables.
My goal is to change the background color of these fields if their values are identical. I know how to write an expression for fields which are on the same table, but I don't know how to compare fields which are on different tables (same dataset!).
If someone could post an example for such expression it will be great!
Thanks in advance!
|
|
|
|
|
Hi is it possible to connect to an oracle database using visual c# express edition? In the database explorer I click on the Add connection.. and there are only two choices: Microsoft Access Database File and Microsoft SQL Server Database File.
Can anyone help me with this?
cellardoor
|
|
|
|
|
cellardoor0716 wrote: Hi is it possible to connect to an oracle database using visual c# express edition?
Yes.
cellardoor0716 wrote: In the database explorer I click on the Add connection.. and there are only two choices: Microsoft Access Database File and Microsoft SQL Server Database File.
Never use this piece of crap. It only serves to reinforce bad habits.
cellardoor0716 wrote: Can anyone help me with this?
Look at the classes in the System.Data.OracleClient namespace[^] specifically OracleConnection[^] and OracleCommand[^]
Upcoming events:
* Glasgow: Mock Objects, SQL Server CLR Integration, Reporting Services, db4o, Dependency Injection with Spring ...
"I wouldn't say boo to a goose. I'm not a coward, I just realise that it would be largely pointless."
My website
|
|
|
|
|
Colin Angus Mackay wrote: Never use this piece of crap. It only serves to reinforce bad habits.
Well said, Colin
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
OS: XP Pro
IDE: VS2005
SQL Express 2005
IIS 5
I'm working with a "classic" asp site that is known to work when the site is on a remote server (that's running IIS6 and SQL Server 2005).
I've installed IIS5 and SQL Express 2005 on my development box because VS2005's internal server won't run classic asp pages (how stupid is that?).
I have IIS5 working, and a database created in SQL Express 2005 (using scripts that created the database on the working server), and I can even see it in Server Explorer pane in VS2005. However, when I try to browse a page that attempts a database connection, I get this error:
Microsoft OLE DB Provider for ODBC drivers (0x80004005)
[Microsoft][ODBC SQL Server Driver][DBNETLIB]SQL server does not exist or access denied
The SQL server service is running.
I can connect to the desired database in VS2005 (and can see it in the Server Explorer pane in the IDE).
For the server name, I've tried the machine name ("earth2") and 127.0.0.1 - neither one appears to affect the outcome.
What could I be doing wrong?
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
You are trying to connect with a machine name or IP address. By default the SQL Server doesn't permit TCP/IP connections. You have to go into the SQL Server Configuration thing (sorry, I don't have it installed on this machine, and I can't remember exactly what it is called) and allow TCP/IP connections.
Alternatively it might work by specifying the SQL Server as "(local)" (no quotes, but with brackets) which will use shared memory (at least in .NET, I don't know about classic ASP)
Upcoming events:
* Glasgow: Mock Objects, SQL Server CLR Integration, Reporting Services, db4o, Dependency Injection with Spring ...
"I wouldn't say boo to a goose. I'm not a coward, I just realise that it would be largely pointless."
My website
|
|
|
|
|
TCP/IP is turned on.
I'll try the local thing.
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
SQL Server 2005 Express Edition does not install as the default instance but as an instance named SQLEXPRESS . Use (local)\SQLEXPRESS as the Server name.
|
|
|
|