Showing posts with label exist. Show all posts
Showing posts with label exist. Show all posts

Tuesday, March 27, 2012

Can I GROUP BY aggregate Function (Like SUM)

Hello,
I column that calculated at run time in insert , can i gruop by this column,the new one that not exist yetyes, with a derived table, but why would you want to?

please show an example, using sample data to illustrate|||this is my case:

i have a table with a column datetime (I use to record time of calls) , i want to create table that hold data for each hour, so i round the column and want to group by this column in the same time|||you can round a datetime? please show your query|||This is the Query of round datetime

DATEADD(Hour, DATEDIFF(Hour, 0, cdrCallDate), 0)

You can change [hour] to day , minutes , second , etc...|||yes, you can GROUP BY that expression :)

and you cannot use second, it causes an overflow

:)|||thanks man for this information

Sunday, February 12, 2012

Can .net 1.1 work with SQL SERVER 2005 ?

What should I do if I want my asp.net 1.1 work with sql server 2005

I get wrong message :SQL Server does not exist or access denied

Well, you don't need to change any code.. there is no different of working against a SQL 2005, it's the same way as working against SQL server 2000 etc.

If you have some problem to connect to the SQL Server 2005, just check your connection string if it's correct. For example if you provide the right user name and password etc. The connection string for connecting to a SQL Server 2000 and SQL Server 2005 is the same..

|||

Hi,

Yes of course it can work with .Net 1.1. Please make sure that the connection string is correct. If you are using SqlExpress the instance name of the SQL 2005 is MachineName\SQLEXPRESS.

|||

Yes it is work in my boxdev, but id does not work in my web hosting.

I try it in my hosting to set using 2.0 and work fine, but when I use 1.1 it is like the server does not existed. The server name using IP etc xxx.xxx.xxx.xxx. And it work fine too when I used in remote connection using sql server management studio.

So what make this 1.1 can not fine or denied access to sql server. You know I 'm have used right connection string.

|||

I have check that the hosting use sql server 2005 express. Is there a problem when using 1.1 with 2005 express ? Because it is just fine in 2005 developer ?

|||

Hi,

You may try this KB article:http://support.microsoft.com/kb/928319/en-us It indicates the main causes of the problem and provide some solutions for you to refer.

Hopt that helps. Thanks.