I have recently purchased a server (HP ProLiant DL380, 8GB Ram, SAS hard drives, dual quad core xeon processors, etc.) and vmware esx.
I have only really ever used vmware on "desktop" machines, so I am not sure if there are any gotcha's that I am not aware of. That is, I have created a guest...
The easiest way to do this is to use the datepart function to group by.
Select count(*)
from table
group by datepart(wk, datefield)
The default week is Sunday to Saturday, but you can change it with SET DATEFIRST.
The indexed view is not so important, but does anyone know of a more efficient way of getting these results?
I can't think that hitting the table 2 times to get one result set is the optimal way of getting these results.
Any help is appreciated.
I've got a table that has multiple records for a given Person (i.e., each Person has many offices, and each office has a phone number). I want to be able to flatten the records into one row for each Person.
Sample data:
DECLARE @test TABLE(PersonID1 varchar(10), PersonID2 varchar(10)...
For anyone that's interested, the only solution I found was to use the regular pivot syntax for each item, and then join the resulting tables together at the end to get the correct values.
i.e., Create a pivot table with the phone numbers, and insert the results into a temp table. Then create a...
Bit of new development that I'm having trouble with.
I need something similar to the above, but using multiple pivot items.
i.e.:
DECLARE @test TABLE(id varchar(10), name varchar(10), OfficePhone varchar(20), OfficeAddress varchar(20))
insert into @test values ('c10xx2', 'joe'...
In the SQLDataSource, make sure the OldValuesParameterFormatString="original_{0}"
This will allow you to use the @original_<fieldname> syntax.
This behavior was by default in beta1 of .NET 2.0, I believe, but you have to explicity set the oldvalues format now.
Alternatively, if you changed...
I've found this website (http://www.systemnetmail.com/) to be particularly helpful when dealing with emailing in ASP.NET.
Particularly, http://www.systemnetmail.com/faq/4.4.aspx, although it is for 2.0 only, unfortunately.
The only problem that I've come across in using this technique to embed...
If all you want to do is to force a redirect to an https site is to include the following code:
protected void Page_Load(Object sender, EventArgs e)
{
if (Request.ServerVariables["SERVER_PORT"] == "80")
{
string strSecureURL;
strSecureURL = "https://"...
Hmm...I'm using SQL Server 2005 (sorry, should have specified that). I thought 2005, with varchar(max) meant that the size limit of the variable was much, much larger than 8000 characters.
Is this not true?
I'm using the split function mentioned in the FAQ (http://www.tek-tips.com/faqs.cfm?fid=5207), and it's been working great for me. I pass in a delimited string, and it converts it to a table format.
However, recently I needed to use it to pass in a very long string, and it has stopped working...
Having an odd problem with an enum I'm working with:
public enum EnumTest
{
Value1 = 1,
Value2 = 2,
Value3 = 3
}
int i = 2;
EnumTest val = (EnumTest)i
Result: Value3
It seems when I cast an integer to the enum type, it is casting it by index, not by value.
I want to be able to...
I've got a class library that I use as the data access component of a web application in .NET 2.0.
I'm having trouble getting the connectionString information from the file, though.
When I hard code the connectionString into a string, it works fine.
When I try to get the value from the config...
Interesting...never knew about sp_MakeWebTask and sp_RunWebTask.
Still, I would strongly recommend that you look into something more robust.
The best place to start would be to take a look at the .NET quickstarts: http://asp.net/QuickStart/aspnet/Default.aspx, in particular, the data access...
Bit of a stupid question, really, but most of the examples I've found through searching don't really do what I need.
I have two tables that are joined (person and person details).
When I pass in a person ID to get all the info on that person, multiple records are returned. I want to flatten...
But that's mostly my problem: the WSDL contract generated when using a complex type is not very helpful to clients on the other end.
The dataset (and the XMLDocument, I've tried both) create a WSDL that does not contain any information on the actual structure of the response; i.e., it creates a...
This seems like a pretty straight forward question, but I can't seem to find any concrete info when I search.
I have a web service that I'd like to use to return an XML document to my clients.
I have to take into account that non-.NET clients may be consuming the service as well, so I can't...
Ah, okay.
Are there reserved return values? I was reading something online that suggested that the return value will default to 0 if the stored procedure executes without errors. That is, the return value will have a value even if you don't explicitly return a value in the sproc.
Is that...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.