DataSource Controls :: Find The Biggest Two Numbers Out Of Three

Mar 30, 2010

I have to write a stored procedure to get the biggest two values out of three in three different columns in the same table.

I have a table , for instance,

total marks1 - column1 ( eg values - 1000)

total marks2 - column 2 (eg values - 500)

total marks3 - column 3 (eg values - 800)

i have to get (return the value) 1000 and 800.

View 6 Replies


Similar Messages:

DataSource Controls :: Excluding Zero Numbers From The Query?

Jan 4, 2010

Is there any way, I can exclude the whole row if one particular column has zero in it. I have this query

select first_name, last_name , employee_num, cubeNumber, extension

from tblData left join tblfacility
ON tblData.employee_num = tblfacilit.employee_num
left join tblextension ext
on tblData.extension = ext.extension

tablExtension has phone number extension in it. If we don't know someones phone extension, we put zero for their extension, now there are tons of people who have zero extension.when I run this query, it returns same name lot of times with different cubeNumber so I get

Fisrt_name last_name employeenum cubeNumbae extension

a ax 1 12 0
a ax 1 13 0
a ax 1 14 0
b bx 2 12 0
b bx 2 13 0
b bx 2 14 0

Both emploee a and employee b extensions are zero in above case. I want both a and b to be displayed only once .Right now it is displaying them so many times with all the cubesNumber that have extension zero.

View 8 Replies

DataSource Controls :: Unique Numbers For Pulling Data?

Feb 3, 2010

I currently designed a school result portal. If the students want to view their result, they input their student school number in a text box to search out their result. But this is not secured because anybody can look up any students result if you have the number which is even written on their school uniform for identification.

I have being trying to secure this result by trying to generate or code special numbers that the students will input with their school number. The special numbers will be random numbers and may be from 10 and above, it might even contain letters. How do
I code this. I believe this is the best asp.net forum. I want the students to be inputing this special unique numbers and their student numbers so that there result will be avaliable to them.

View 2 Replies

DataSource Controls :: UDF Or Procedure To Get Records For Transposed Numbers?

Mar 8, 2010

I am looking for a function or procedure in sql server which assists me in figuring out the records which is having Transposed numbers. E.g one record is having invoice number as 1234 and another record is having invoice number as 2134(this is the definition for transposed records for me). My another problem is that the length of invoice number is not known. It can be from 1 character to 15 characters or more than that.

View 2 Replies

DataSource Controls :: VS 2005 - Can't Find The 'Advanced Properties' For The XSD File - Can't Find The 'Custom Tool'?

Jan 29, 2010

I am trying to create strogly typed datasets for my project. When I right click on the xsd file that I need to generate a strongly typed dataset for I can't find the 'Advanced' properties as described in the below article (almost half way down)[URL]As I do not see the Advanced properties option I can't find the 'Custom Tool' property/option to set its value to 'MSDatasetGenerator'. Do I have to install some kind of patch on my VS 2005?

View 5 Replies

DataSource Controls :: Maximum Numbers Of Records Handled By SQL SERVER

May 12, 2010

I want to know the Maximum numbers of records Handled by SQL SERVER???

View 2 Replies

DataSource Controls :: Insert Sequential Numbers Into A Primary Key Column Using A Script?

Jan 29, 2010

I need to insert multiple records using a script.

My table is

Region
(
ID int,
Name varchar(50),
Description varchar(51)
)

One thing I can use is to retrieve the max(ID) from region and store it in a variable and increment the variable sequentially and insert. But, if any other user inserts a record while I am executing this script then max(id) might clash with the id inserted with other user causing my script to fail.

Is there any other option to insert record sequentially base on the highest number in the table.

View 3 Replies

MVC :: What Is The Biggest Advantage In Comparison With Webform

Jul 25, 2010

I hate webform that no matter what action is done with a client side page(such as clicking a dropdownlist to only see the Items), it cause a postback&re-rendering of the whole page and all of the page events is raised( page_init,page_load....complete....).

We know that the server side .cs page shoudnt have to go through all the events and many methods(such as "IsPostback",viewstate), in fact,it just have to do only one thing:get data from DB for the dropdownlist and show it to us, other part of the page just doesnt have to change.

We may achieve this effect using Ajax, but the key is I dont wanna raise too many useless event .

seems MVC can handle such a problem, one action of browser side is replied by exactly one method,and time isnot waste by raise event...

Is this the biggest advantage of MVC?

View 5 Replies

Biggest Advantage To Using MVC Versus Web Forms

Sep 22, 2010

Possible Duplicate:

MVC versus WebForms

What are some of the advantages of using one over the other?

View 2 Replies

Strings Clarification - Biggest Character Using Ascii Values?

Mar 22, 2010

i have i doubt. any body clarify this doubts. Find biggest character in a string. using ascii values.

View 3 Replies

How To Make A UI With A Panel Of Numbers / Highlighted Numbers

Feb 15, 2011

I would like to to make a UI with a panel of numbers, and when hovered above one of them ten the number becomes larger. something like that:

[URL]

I want that when I press a numbers it shows it's value in some other textbox. In which .NET technology is it possible to do it? Windows Forms? WPF? other?

View 6 Replies

DataSource Controls :: Find The Five Last Records?

Feb 19, 2010

How can I find the 5 last records ?

CREATE PROC [dbo].[SP_NEWS_SELECT]
(
@NB_NEWS int,
@ID_NEWS int,
@DT_PUBLICATION datetime
)
AS
SELECT TOP @NB_NEWS *
FROM [REP_CLI].[S_ETATS].[T_NEWS]
ORDER BY [DT_PUBLICATION] ASC

This does not work

View 4 Replies

DataSource Controls :: Could Not Find Stored Procedure?

Jun 17, 2010

I created a database on SQL Server 2005 developer edition with MS SQL Server Mangement Studio Express. Now I created code that accessess a stored procedure named 'pS_TableData'. However I have one problem the code raises an exception "Could not find stored procedure 'pS_TableData 'Letters''."the code looks like this:

[Code]....

Note I am using (for now) the same connection that I used to create my database so in essence my web site is the administrator. I tried a simple SELECT from a table with the same connection and it raised no exceptions!When I run EXECUTE ps_TableData 'Letters' in SSMS it has no . I also tried EXECUTE ps_TableData 'Letters' as the command paramated for SqlCommand but it had the same effect

View 1 Replies

DataSource Controls :: Best Way To Find Out If Record Exists?

May 14, 2010

best Way to find out if record exists?

[Code]....


View 2 Replies

DataSource Controls :: Find Particular Date Is Sunday Or Not?

Jun 12, 2010

how to find particular date is Sunday or not? in sql 2000

View 3 Replies

DataSource Controls :: Cannot Find The Object 'AspNet_SqlCachePollingStoredProcedure'?

Jan 22, 2010

I have a Windows 2003 test server hosting an asp.net 2.0 application and Sql Server 2005 running as Sql Server 2000(80).During a recent a security review we decided that it wasn't such a hot idea to use sql authentication with an sysadm user as the database user for the asp.net application. Having done a bit of reading (http://msdn.microsoft.com/en-us/library/ms998258.aspx#pagguidelines0001_dataaccess) I decided to use a lower privilege database user account and windows authentication.Starting from scratch I created a new custom service account (http://msdn.microsoft.com/en-us/library/ms998297.aspx) and assigned this to the process identity for the application pool.I then created a new database login and user for this account. I added the db_datareader and db_datawriter roles to this user and I also granted EXECUTE permissions for user defined stored procedure and functions. However when I started the application I got this error 'User does not have permission to perform this action.Cannot find the object 'AspNet_SqlCachePollingStoredProcedure', because it does not exist or you do not have permission.' - after a quick hunt I found thishttp://forums.asp.net/p/1487216/3493362.aspx and followed the advice herehttp://msdn.microsoft.com/en-us/library/system.web.caching.sqlcachedependencyadmin.aspx and granted the user CREATE TABLE and CREATE PROCEDURE permissions.Still no joy - after digging around and looking at sql profiler I found what I believe to be the offending piece of sql:

/* Create notification table */
...sql
/* Create polling SP */
..more sql
..finally
GRANT EXECUTE ON dbo.AspNet_SqlCachePollingStoredProcedure to aspnet_ChangeNotification_ReceiveNotificationsOnlyAccess

My understanding is that to issue 'GRANT EXECUTE' the user must db_owner or db_secadmin. Indeed it all works fine if I give the service account user login the db_owner role.This sql is caused by: SqlCacheDependencyAdmin.EnableNotifications(ConnectionString), this is called once and once only by the application start event.Is there a work around for this? I would like to use the lower privilege account as per best practice but this issue is making it tricky.

View 4 Replies

DataSource Controls :: Could Not Find Any Links About Data?

Feb 10, 2010

I think that type of data types is really smart.and hope some can help me with something more.I could not find any links about it.Right now, I can only make a getdata (), which shows all data:

[code]...

View 1 Replies

DataSource Controls :: Find A Table Row With 2 Columns?

Apr 2, 2010

I have created a table in my SQL database that has a primary column (Title) and another column named Callsign. How can I access the table row that has a certain title and Callsign using C# in a web page event handler?

View 7 Replies

DataSource Controls :: Where To Find The Northwind Database And Add To Sqldatabase

Jan 12, 2010

i need the northwind databse. i dont have it in the database where i can find it and who to add it to my database in sql server so can i c it in the combo box off the database

View 1 Replies

DataSource Controls :: How To Find Stored Procedure From Which This Is Called

May 19, 2010

There is one sp(1) which is called from another sp(2)How can I find from which sp it is called.

View 2 Replies

DataSource Controls :: Sql Server Compact Edition - How To Find / Use It

Jul 9, 2010

I have come accross a scott's blog today;

http://weblogs.asp.net/scottgu/archive/2010/06/30/new-embedded-database-support-with-asp-net.aspx

what is exactly Sql server compact edition? it says that I do not need a sql server to store my databases if I use that in my bin folder? so I can use my mdf databases in app_data folder. is that true?

View 2 Replies

DataSource Controls :: Could Not Find Stored Procedure Dbo.sp_UpdateContentById

May 21, 2010

I have ported over the website to my localhost running windows 7, I got the Could not find stored procedure 'dbo.aspnet_CheckSchemaVersion'. before so I ran the aspnet_regsql.exe and fixed it after the error I fixed I was able to login into the CMS however when I try to save content it gives me :-

Could not find stored procedure 'dbo.sp_UpdateContentById'. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.Data.SqlClient.SqlException: Could not find stored procedure 'dbo.sp_UpdateContentById'. Source Error:

[Code]....

Line 73: public int sp_UpdateContentById([Parameter(Name="ContentId", DbType="Int")] System.Nullable<int> contentId, [Parameter(Name="Content", DbType="VarChar(MAX)")] string content)Line 74: {Line 75: IExecuteResult result = this.ExecuteMethodCall(this, ((MethodInfo)(MethodInfo.GetCurrentMethod())), contentId, content);Line 76: return ((int)(result.ReturnValue));Line 77: }
Source File: c:IQTECHPROApp_CodeCkEditor.designer.cs Line: 75

View 1 Replies

DataSource Controls :: Using Linq To Find Associated Timestamps From Database

Jun 4, 2010

I have to following Linq query, where I look for some different timestamps in an DB:

[Code]....

My problem is that I would like to filter the query, to only return entries, where OutOfOrderStart and OutOfOurderEnd is from the same row. How can I accomplish this?

View 1 Replies

DataSource Controls :: Extension Method To Find String Or Boolean?

Apr 6, 2010

i need to find, string or boolean from database..

that is, i have a table i need to check that is string or boolean? to assigne other vairable?

using some extensions methods?

View 3 Replies

DataSource Controls ::to Find The Tableadapeter To Add Data To Database Table?

Feb 27, 2010

where can i find the tableadapeter to add data to my database table? and is that the best way or there a easier way... i have a csv file that i would like to add to my data table but i don't know how?

View 1 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved