SQL Server :: Want To Set @Serial Column Result Based On MyDate Cloumn How To Do That

Mar 2, 2011

i have the folllowing Query , and i want to do some thing like this, but i dont know if my query is right or wrong .DECLARE @Serial varchar(50)

select MyDate,MyName,@serial
from Names
where @Serial in
( if(MyDate>'10-10-2011') select '393939'))

as u Noticed i want to Set @Serial Column Result Based On MyDate Cloumn how i can do that?

View 8 Replies


Similar Messages:

C# - Add A Serial Number As The First Column In A GridView?

Jan 22, 2011

I have a Grid View . It has two bound columns. I need to have a Serial Number column as the first column.

View 2 Replies

SQL Server :: Shift Serial No After Deletion?

Nov 20, 2010

I have an sql table in which i have two columns enq_no and enq_serial.

for a particular enq_no, enq_serial should get incremented by one starting from 1.

What is the best approach to achieve this?

another issue is that after deletion enq_serial should get decremented by one.

How can i get this?

Is after delete trigger could be a good option?

If so? how can i get this with after delete trigger?

View 4 Replies

SQL Server :: Select Query Based On Two Fileds With Different Column

Dec 21, 2010

This is my Table structure:-Table1

Field1 Field2 Age

Dean Chen 20

Janel Wast 25

ann Miller 20


I used this select statement

select Field1+' - '+Filed2 from Table1

and i binded this in dropdownlist

now on selecting dropdownlist i need to show age in label. so how would be my select statement... to show age base on Filed1 and Filed2

View 6 Replies

SQL Server :: Transpose A Column In To Rows Based On Special Character

Dec 29, 2010

i have table a with fourcolumns and more which need not be considered i would like the fourth column which has a special charcater ^ within it to act as row seperator such tht the values of 1,2,3 are comon for ALL THE ROWS BASED ON THE SPECIAL CHARACTER.

View 3 Replies

C# - Cache Whole Result Set Or Based On User?

May 17, 2010

In my web application i have statistics which shown for each user separately ie. posts made , posts made today , articles started by and so on...

Each user has his own special statistics.

What is more flexible and "right" to work with one huge DataTable in Cache with whole data from all users and then loop thought DataTable to find certain user data or to cache each user ie. cacheObj + userID...

View 1 Replies

Data Controls :: Change Value Of GridView BoundField Column Based On Value From Another Column

May 7, 2015

I am using item template and eval function in the gridview to display the records. Can I add a coulmn which is not in the table?

I have to add some columns which is not in the table and assign the values from code behind to that particular column

View 1 Replies

Forms Data Controls :: Customize A Cloumn In List View Control?

Jan 30, 2011

How can I customize a cloumn in List view control and make it invisible in the page load event

View 8 Replies

Web Forms :: How To Validate A Gridview Column Based On Another Checkbox Column

Apr 6, 2010

I have a gridview which displays following columns:

TaskID, TaskDescription, IsComplete, DateOfCompletion

Now what I want to achieve is, when user clicks IsComplete checkbox, she must enter the date of completion. So, I want a validation (client side) on DateOfCompletion if the checkbox is selected (checked). And, I also want to use Validator Callout Extender
if possible.

How can I achieve this?

View 2 Replies

Web Forms :: How To Show Result Set Based On Dropdownlist Selection

Aug 3, 2010

I have one asp.net dropdownlist which consist A,B values. If user Select A in dropdownlist i need to bind this query to Gridview. Select FirstSelection from Tablname else Select SecondSelection from Tablename. How to do so..?

View 7 Replies

SQL Reporting :: Display Records Based On Result Of Function?

Aug 12, 2010

I have the following code in my sql report:

[Code]....

What I want to do is display only those records where where sFileName does not exist.

View 2 Replies

JQuery :: Highlight A Different Element Based On The Result Of A Validator?

Feb 4, 2011

Im trying to highlight a different element based on the result of a validator.

My form looks like this in structure:

LABEL TEXTBOX VALIDATION CONTROL

When the validation control becomes invalid, I also want the label to change colour.

There are examples of code on the MS website - here is a javascript sample:

[Code]....

isValid always defaults to false and therefore always displays red.

View 2 Replies

Data Controls :: Search Date Based On DdMMyyyy And Show Result In GridView?

Dec 5, 2013

I am stored date in "smalldatetime" datatype as in databse.How can i particular textbox entered date(dd-mm-yyyy) used to fetch the row information from databse and shown in a gridview.

View 1 Replies

C# - Addition Of Two Columns Display Its Result In Third Column Of Gridview?

Jan 5, 2011

Rate AnodeRate TotalRate
100 100 200

txtrate,txtanoderate n txttatalrate are added in ItemTemplate of gridview.

rate field is in database table while anoderate n totalrate not in database table ,also totalrate is readonly so that user can see only its addition,this addition will b passed to txtrate field n wil get bind that value in database. also i took

<asp:HiddenField ID="hdnTotalRt" runat="server" /> as it is readonly..

sample code:

enter code here
<asp:TemplateField HeaderText="Standard Rate">
<ItemTemplate>
<asp:TextBox ID="txtRate" runat="server" BorderWidth="0.5pt" Text='<%# Bind("rate") %>' BorderColor="green" BackColor="#ffffcc" Width="40px"></asp:TextBox>

[Code]....

It is showing me error as The name "txtRate"does not exist in d current context

View 1 Replies

Programmatically Interact With IIS So That It Changes Where Virtual Directory For A Test System Points To Based Result Of Build?

Mar 29, 2011

I have a C# program used to build and deploy a suite of websites.

I would like to programatically interact with IIS so that it changes where the virtual directory for a test system points to based the result of the build.

View 4 Replies

Multiple Single-result Sql Server Stored Procedures Or Single Multple-result Stored Procedure?

Aug 9, 2010

Background: I use stored procedures exclusively for an ASP.NET application. I am using a DataReader to load a dataset object.

View 4 Replies

DataSource Controls :: SQl Query - Generate Another  Computed Column That Will Contail The Result Of GrandTotal/Total?

Jun 30, 2010

How do i generate another computed column that will contail the result of GrandTotal/Total,


where GrandTotal is another value comes from computed column and the Total would be the sum of the Total within SchedularID.

And thats what i have done so far: [Code]....

View 3 Replies

Forms Data Controls :: Sum The Values Of The P_price Column And View The Result On A Label Located On The Same Page?

May 25, 2010

i got a Gridview which is bound and draws its values from a DataTable.

My question is how can i sum the values of the p_price column and view the result on a label located on the same page?

View 2 Replies

Change Text Of Text Objects Based On Formula Result In Crystal Report

Sep 3, 2010

I want to change text of text object in crystal report (.rpt file). The datasource for the report is a datatable which consists of a column named sale, if it is '0' then I want to display the text of text object as 'sale' and if it is '1' then I want to display the text of text object as 'lease'. how to add formula and based upon the result of formula I have to change the text of text object being displayed.

View 1 Replies

Setting The Column Size Based On The Max Column Size In The Table?

Jul 13, 2010

I want to set the coulms size of all the columns in the table in the DB based on the maximum width/size of one of those columns of that particular table That is if I have three columns Name(nvarchar 50), Address(nvarchar 70) and Description(nvarchar 100), then I want Name and Address to also be nvarchar 100, can anyone give me the code for the same in VB.

View 1 Replies

Is It Possible To Use A Serial Port Like Session In C#

Jun 17, 2010

I am using serial port communication in my asp.net webform application...

[code]....

This method works when i send i single message... But when want to send sms in bulk opening and closing port everytime is not a good idea... So my question is it possible to use a serial port like session in c#?... When i open a port i want it to be open for 1 hour and then if my time expires i want to close the port and open it the next time...

View 1 Replies

VS 2005 - Serial Communication Between PLC And C#

Feb 4, 2012

I am working on a project where I have to design a front end(on C#) and have to display the data coming from PLC.

1. What name space I have to used.
2. What function I have to used for Serial communication.
3. What .dll file I have to add in my project.

View 10 Replies

Change Color Of Row Based On Value Of A Column In The Row?

Jan 19, 2011

I have an sqldatasource that loads, data from my server and puts it in a datagrid.

I have a Column named clnumber that has, the numbers 1,2,3

What I want is that each row have a different color depending on which number is in that datarow column

THIS IS THE CODE I USED

[code]....

View 4 Replies

How To Create Serial Auto Number

Feb 4, 2011

I want to make the number for sales orders as an example:

SO/2011/001
(for
sales order
first)
SO/2011/002
(for
sales order
second)

View 6 Replies

DataSource Controls :: How To Get The Serial Number

Jun 7, 2010

How can I get the serial number when you add a new row in the table Add time in order to add the number in the second table

I mean I want in same the sqlcommand to insert and get the value of ( serial )..

View 3 Replies







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