I'll have to agree with Glenton here. Doing this kind of historical trend analysis and predictive modeling would be excruciatingly painful in Excel. Let me explain. Creating the functions would be very easy in Excel, however, the program would run slower and slower with each refresh and each report.
I would recommend using any free RDBMS available online. You have express/free versions of Oracle, MySql, MS SQL, and DB2 readily...
User Profile
Collapse
-
Rob,
Do you have both the Windows Azure Compute Emulator and the Windows Azure Storage Emulator installed? if you're missing either check these links:
http://msdn.microsoft.com/en-us/library/gg432983.aspx
http://msdn.microsoft.com/en-us/library/gg432968.aspx
There's also a "how to configure" article here:
http://sqlblog.com/blogs/buck_woody/...re-emulators-o...Leave a comment:
-
At least you're able to get started in some capacity(Single User). Let's start debugging!
1. Although the SQL server appears to be failing silently, there are probably several error logs pointing to the failure. Check the SQL Server Logs as well as the Windows application/services logs. A lot of events may have been logged on your system since the last error. Before reviewing the error logs, repeat the steps you followed to the point...Leave a comment:
-
In the error message you receive in your email, which XXX_USER is the [User] we are INSERTING INTO QUESTIONARIO1? lOGIN_USER, AUTH_USER or REMOTE_USER?
What is your DB COLLATION?Code:AUTH_TYPE = Forms AUTH_USER = BL0210 AUTH_PASSWORD = LOGON_USER = REMOTE_USER = BL0210
Also, in your application code. You have the line:
...Code:n = CInt(ExecuteScalar(Me.ConnString,
Leave a comment:
-
@maheshwag
It looks like you posted the functions to bridge gpl's code to your solution(COALES CE and ISNULL).
Is this question answered?
What was the script for your final solution?Leave a comment:
-
@ADezii
Sorry, I did definitely pointed the tie-beak question at you instead of OP.Leave a comment:
-
@Rabbit
I agree. (That's why I asked about tie-break rules)
But it doesn't seem to be part of ADezii's requirement.Leave a comment:
-
There are only two scenarios in which we want to COUNT the records "above" the current row for T1. When the time is less than the current row. and when the time is equal to the current row but the ID is less than T1 row.
Here's the corrected code:
...Code:SELECT T1.Time, ((SELECT Count(*) FROM resultsdata WHERE resultsdata.Time < T1.Time OR (resultsdata.Time=T1.Time AND resultsdata.ID
Leave a comment:
-
@ADezii
Do you have a rule that explains why one runner should be ranked above another if they have the same time?
In any case this might be your solution (look at the overallPosition field):
...Code:SELECT T1.firstname, T1.surname, T1.Time, ((SELECT Count(*) FROM resultsdata WHERE resultsdata.Time < T1.Time OR (resultsdata.ID=T1.ID OR resultsdata.ID<T1.ID) )) AS OverallPosition, T1.gender, ((SELECT
Leave a comment:
-
You can usually make use of RANK BY to generate these kinds of sequential numbers.
Try this:
...Code:DECLARE @resultsdata TABLE( [ID] [int] NOT NULL, [firstname] [nvarchar](255) NULL, [surname] [nvarchar](255) NULL, [Time] [nvarchar](255) NULL, [OverallPosition] [nvarchar](255) NULL, [gender] [nvarchar](255) NULL, [GenderPosition] [nvarchar](255) NULL, [Category] [nvarchar](255) NULL,
Last edited by Jerry Winston; Feb 4 '11, 06:45 AM. Reason: I'm posting code in the wrong section because I'm up too late/early on a Friday.Leave a comment:
-
I don't know if this is an improvement but here's a different way to look at class organization:
CourseTable: name of class, course code, Description("Ma th for DB's", MATH, "Database math")
CourseSectionTa ble: course section information (like your details table) meeting times, locations instructors ect.
There's alot of detail associated with large course management systems(like at colleges...Leave a comment:
-
I agree, that's the wrong output but what does your SQL statement look like? It's going to be tough to figure out the problem with your query without the query.
However, I did notice you have something funky going on with the single quote marks around your "text" and "city" string literals. Try deleting the single quotes and reapplying them. It looks like you picked up some odd characters by copy/pasting.Leave a comment:
-
Ok. There are a few ways to do this. It sounds like you want the difference of two averages. Because you omitted the comparison of weeks 2 and 3, I think you want the average of an arbitrary pair of weeks NOT the average over a two week interval. I'll give you two solutions. One iterative method using a CURSOR and another using a predefined pair Table.
The cursor method:
...Code:DECLARE @baseTable TABLE([month] int, [week] int, price
Leave a comment:
-
I'm not sure I understand your requirement or perhaps your reason for distributing so much of your logic into many,separate ad-hoc SQL queries.
The easiest solution is to wrap the good ol' TRY...CATCH block in a single stored procedure. eg:
...Code:CREATE PROCEDURE sp_addIfNew(@userVar VARCHAR(32)) AS BEGIN BEGIN TRY INSERT INTO QUESTIONARIO1([USER]) VALUES (@userVar) END TRY BEGIN CATCH
Leave a comment:
-
Notice the blank space characters in you primary key name "University PK". SQL is expecting a single name. You could add an under score like :
or enclose the key name in brackets:Code:ALTER TABLE UNIVERSITY ADD CONSTRAINT UNIVERSITY_PK PRIMARY KEY(U_PK);
Also, take a look at stepterr's syntax. I think you don't intend CONSTRAINT to be...Code:ALTER TABLE UNIVERSITY ADD CONSTRAINT [UNIVERSITY PK] PRIMARY KEY(U_PK);
Leave a comment:
-
Jerry Winston replied to I have an sql stored procedure that gives an error when executed in Management Studioin ASP .NETI don't know if this is a typo here or in your executing code, but I think you've mislabled a field somewhere in your code.
is not a valid parameter. howeverCode:@Cont[B][U]r[/U][/B]actStateCode
is a parameter.Code:@ContactStateCode
Leave a comment:
-
It looks like you're coding in VB.NET. If you are use two " marks to insert a single " inside of quotes.
Also, add a break point at the top line and inspect your data objects while your code is running.Code:"SELECT CADD_File_Name,Drawing_Number,Drawing_Title FROM Drawing_Log WHERE CADD_File_Name LIKE ""C1130*"" "
Leave a comment:
-
-
Your ad hoc sql
Evaluates to:Code:"SELECT CADD_File_Name, Drawing_Number, Drawing_Title FROM Drawing_Log" & " WHERE CADD_File_Name LIKE '" & CaddFile & "'"
The problem is your like statement is missing the underscore or wildcard character '%'. I think you want your...Code:SELECT CADD_File_Name, Drawing_Number, Drawing_Title FROM Drawing_Log WHERE CADD_File_Name LIKE 'someFileName'
Leave a comment:
No activity results to display
Show More
Leave a comment: