DataSource Controls :: Remove Specific Value In Sql?

Mar 2, 2010

how can i find the value in the field which contain "," and remove it in sql e.g:

the field is: 11,12,13
how can i find 12 and remove it becomes=> 11,13
if the field is 12,13,14==> 13,14
if the field is 9,10,11,12 ==> 9,10,11
if the field is 12 only ,then result is empty

View 4 Replies


Similar Messages:

Controls :: How To Remove Specific Word From String

May 7, 2015

Rs100 - Rs300

Rs5000 - Rs60000

I want to remove Rs how will be remove Rs using substring? 

View 1 Replies

Completely Remove ViewState For Specific Pages?

Mar 12, 2010

I have a site that features some pages which do not require any post-back functionality. They simply display static HTML and don't even have any associated code. However, since the Master Page has a <form runat="server"> tag which wraps all ContentPlaceHolders, the resulting HTML always contains the ViewState field, i.e:

<input
type="hidden"
id="__VIEWSTATE"
value="/wEPDwUKMjEwNDQyMTMxM2Rk0XhpfvawD3g+fsmZqmeRoPnb9kI="
/>

EDIT: I tried both variants of setting EnableViewState on page level with no luck at all:

<%@ Page Language="C#" EnableViewState="false" %>
<%@ Page Language="C#" EnableViewState="true" %>

I realize, that when decrypted, this value of the input field corresponds to the <form> tag which I cannot remove because it is on my master page. However, I would still like to remove the ViewState field for pages that only display static HTML. Is it possible?

View 6 Replies

JQuery :: How To Remove Every Specific Text In A Table

Sep 29, 2010

[Code]....

how to remove every

[Code]....

View 3 Replies

DataSource Controls :: How To Fetch Specific Value From Data Set

May 26, 2010

I am having dataset.xsd file which contain table-1 and thousands of record.The table contains rollno,name,mark and soon.If i give rollno means it automatically select name dfrom the table .How to perform this operation?

View 1 Replies

DataSource Controls :: How To Remove Duplicate Records

Jan 29, 2010

I am using visualstudio C# with Sql server. I want to delete previous duplicate values if exists while inserting new values into the table.

View 2 Replies

DataSource Controls :: How To Remove Characters From A Dataset

Feb 14, 2011

I'm trying to remove extraneous characters like quotes, commas, etc from my dataset. I get the fact in the standard way of doing things in your code behind you simply go

string data = data.replace(",",""); or something like this. However, a datasource doesn't seem to give me that capability. What can I do to make it do this? I'm importing data from an excel sheet into a gridview. The commas are goofing up my view. I'd like to replace any commas in the dataset with spaces. Here is the code I have.

[Code]....

View 3 Replies

DataSource Controls :: How To Delete Record After A Specific Time

Jan 24, 2011

I am working with asp.net 2008 and sql server 2005 . I get a situation where i have to delete data after 30 days. a suitable query how to do the same. I have go through different query but nothing going right for me.

View 2 Replies

DataSource Controls :: How To Create A DB Backup In A Specific Folder

Jun 11, 2010

I'm using SQL sever 2005 and 2008 expressHow Can I create a DB backup in a specific folder??I use Management Studio but I'd like to automatically create backup without use tools

View 5 Replies

DataSource Controls :: User Specific Connectionstrings And Linq?

Mar 25, 2010

We have a ASP.NET 3.5 application where we want each user to have their own database. Everyone uses the same web application, but the database their data is kept separate from all others. So every customer has his own database. All database structures are identical, so the only thing the application has to do is connect to the right one when the user logs in.

I envision that we look up a connectionstring to their data at the time they log in and set it globally for that session. With Linq, the connection is handled automatically though, in the background, based on the setting in the web.config file. Unlike SQL Server where you set it each time you use it, with Linq it is hidden in the .NET generated class files.

View 1 Replies

DataSource Controls :: Remove The Number 12 And Remain 11,13 In The Field?

Feb 25, 2010

I have a field that may or may not contain comma.

if the field contain some word and separated by comma

how can i remove specific word in the field.

e.g. the field contain --> 11,12,13

how can i remove the number 12 and remain 11,13 in the field?

View 5 Replies

DataSource Controls :: Remove Duplicate Row - Edit Remaining Row?

Feb 25, 2010

removing duplicate rows from datatable or (dataset) by columnd ID (unique). Below function is working but I would like to edit/adjust the remaing (former) duplicate row's value, not the ID value btw.

Example:

ID name sport
-------------------------------
356 John Football
357 Johny Hockey
357 Johny Hockey
358 mike Soccer

should be:

ID name sport
--------------------------------------------------------------
356 John Football
357 Johny newFoo Hockey
358 mike Soccer

Public Function RemoveDuplicateRows(ByVal dTable As DataTable, ByVal colName As String) As DataTable

Dim hTable As New Hashtable()
Dim duplicateList As New ArrayList()
For Each drow__1 As DataRow In dTable.Rows
If hTable.Contains(drow__1(colName)) Then
duplicateList.Add(drow__1)
Else
hTable.Add(drow__1(colName), String.Empty)
End If
Next
For Each dRow__2 As DataRow In duplicateList
dTable.Rows.Remove(dRow__2)
Next
Return dTable
End Function

View 5 Replies

DataSource Controls :: Remove / Hide Duplicate Value In Datatable?

Feb 23, 2010

how can i only display the name columne once in the repeater, when more than 1, then hidden the label
now my table are:

name col. age
mary 11
mary 16
Sam 18

now i would like to hidden the duplicate name as below:

name col age
mary 11
16
Sam 18

how can i manage the datatable to prevent duplicate name to bind to repeater.

View 2 Replies

DataSource Controls :: How To Remove Duplicate Date In Search

Jun 14, 2010

[Code].....

and user3 duplicate more time as the table can i remove duplicate data

View 4 Replies

Forms Data Controls :: Remove Either DataSource Or DataSourceID?

Nov 5, 2010

How do we remove either DataSource or DataSourceID from FormView2?

Code behind reads:

[Code]....

View 3 Replies

DataSource Controls :: Remove Uploaded Document From Database?

Jan 30, 2010

I have a Document name column with varbinary(max) type column in my table

first time when i upload document i am storing doc as a byte array

Dim fs As Stream = Me.fileupload1.PostedFile.InputStream
Dim br As New BinaryReader(fs)
Dim bytes As Byte() = br.ReadBytes(fs.Length)

in my application i have remove atttachmentDoc button, i want to remove uploaded doc from db

so when i pass like this to my storedprocedue

Dim obj As New cls1
Dim bData() As Byte = New Byte(0) {}
bData=nothing
With obj
Dim dt As DataTable = Read_Doc()
If dt.Rows.Count > 0 Then
If Not IsDBNull(dt.Rows(0)("Document")) Then
.Document = bData
.Document_extension = ""
.Remove_Attachment(Me.Selected_ID)
End If
End If
End With

i got error

dbAccess.executeQuery: Procedure or function 'SP_DML1' expects parameter '@Document', which was not supplied.

View 1 Replies

DataSource Controls :: Remove Sepcial Characters From The Column Value?

Feb 15, 2010

I have one requirement i.e i wanted to replace or remove all the special characters except alphanumeric in the column value

how to do ....

View 6 Replies

DataSource Controls :: Sql Query / Remove The Timepart In The GetDate ()?

May 17, 2010

whats wrong with this SQL.

select a.Del_Date,a.Deliverables,
b.Cost_Code, c.UserName, c.Email
from mtblDeliverables a
join mtblContract_New b on a.Cost_Code
= b.Cost_Code
Join mtblUser c on b.Proj_Lead
= c.UserName
where a.Del_Date
= DateAdd(dAY, 10,
GetDate ());

This will show me all records which has a Del_Date = GetDate()+10 days.My data in the SQL is stored in datetime format.When i execute this, no records are shown. Is this because of the time part in the GetDate(). how to remove the timepart in the GetDate ().

View 9 Replies

DataSource Controls :: Specific Error Messages In Try Catch Block

May 23, 2010

How/Can I Set the try, catch statment to catch a specific Error. For example i am getting the following error:

Exception Details: System.Data.SqlClient.SqlException: Incorrect syntax near '='., [SqlException (0x80131904): Incorrect syntax near '='.]

Basicly The = is part of my SQL string which points to a table that currently doesent exist. I want something like catch ex as SqlException (0x80131904) or catch ex as SqlException = "0x80131904" or even catch ex as System.Data.SqlClient.SqlException = "Incorrect syntax near '='." I just want something so i can put "table doesnt exist" in the error message without having to use:

catch ex as System.Data.SqlClient.SqlException

As i have other code on my page that could result in a different type of sqlExeption.

View 4 Replies

DataSource Controls :: Extract Specific Word In Sql If The Field Contain Comma?

Feb 24, 2010

how can i split the frist word in sql if the field contain ',' otherwise, only show the data value.

if the field is 'A,B,C'

I would like to select A as a result.

View 3 Replies

DataSource Controls :: How To Start At A Specific Record And Returning Only The Next 5 Records With T-SQL Command

May 11, 2010

How to start at a specific record and returning only the next 5 records with T-SQL command

[Code]....

That is my concatenated SQL statement but it obviously does not work because it only looks at the top 5 records in the entire table instead of what I intended which would be to look at the top 5 records starting with the record where PostNumber equals the value of lastPost. I have been searching for a T-SQL statement that will allow me to do this but I can't find one.

View 2 Replies

DataSource Controls :: Create .net Service - Delete Specific Records From The Database?

Jun 1, 2010

i am trying to create an asp.net service where it can delete specific records from the databas, this is by code so far:

View 1 Replies

DataSource Controls :: ObjectDataSource Doesn't Remove Previously Added Parameter

Oct 17, 2010

I use an objectdatasource programmatically to use a parameterless method when SearchWord variable is empty and a Search method with one parameter when SearchWord is not empty, the event I use is objectdatasource selecting so that I can adjust parameters conveniently, I have a problem here: I can add a new parameter and set its value but I can't remove a previously added parameter from objectdatasource selectparameters and an error raises because of this, this is the selecting method:

[Code]....

Both adding and removing the search parameter takes place in this method while adding works removing the added one Not works.

View 1 Replies

Data Controls :: Both DataSource And DataSourceID Are Defined On GridView1 - Remove One Definition

May 7, 2015

When i click for bug an aplication.

it's always show this a notification

{"Both DataSource and DataSourceID are defined on 'GridView1'.  Remove one definition."}

view on browser application

Line 33: Line 34: GridView1.DataSource = dtLine 35: GridView1.DataBind()Line 36: End SubLine 37:

This is an my vb code

 Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
If Not Me.IsPostBack Then
Me.BindGrid()
End If
End Sub
Private Sub BindGrid()

[Code] .....

View 1 Replies

DataSource Controls :: How To Write A Sql To Execute The File At Specific Time Sql Server Database

May 28, 2010

how can i write a sql to execute the file at specific time sql server database.

View 3 Replies







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