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


Similar Messages:

SQL Reporting :: Extract Specific Data In The Field Which Contains Special Character [sql]

Jan 24, 2010

I have field_1, the data format store in the field is about "Mary, Amy, Billy, Ma" how can i extract the record that the field_1 has Mary.

I can't use the like'%Mary%' because it can extract 'Ma' too.

I would like to extract exactly Mary. or can i split the field_1 by ',' in sql?

View 1 Replies

Controls :: How To Extract Particular Word Or Sentence From Text File

Sep 17, 2013

How to extract word from the text file

example, in the below text file i wan to extract  -  Total Charges                     

Previous Balance (see back for details)                                    
$196.82 Credits                         
$4.97                   Taxes, Governmental Surcharges & Fees                                           $5.85                                                                      Total Current Charges                                       $196.36                                                                   ALP-Account                                                                     
Total Charges Due by August 16, 2013            $196.36             

View 1 Replies

How To Search Every Word Separated By Comma In Textbox

May 31, 2010

I have text box ...If i type in textbox like

"C,C++,ASP.net,4-5Years" then every word should be checked by database whether that name exits or not in table field of the database..It should be check separately of every word ..It just like Search engin...How can i do in asp.net

View 1 Replies

How To Extract These Details From A Word Document

Dec 14, 2010

is there a way to extract these details from a word document? because there are many resume formats,finding the name itself would be a huge problem.

View 4 Replies

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

Forms Data Controls :: Extract Value From Template Field To Use In Update Query

Jan 3, 2011

I put a dropdownlist in a template field with 4 choices with the values of each to a,b,c,d and when i run the update query i need it to pull from that selected row,and read the value selected in that field. I tried this:

@choice = SelectedRow.Cells[9].Text.ToString() but it didnt work

how can i extract data from a dropdownlist thats inside a template field and use in a update query?

View 8 Replies

Data Controls :: Extract And Display Time In Label From DateTime Field

Jan 29, 2014

My work is done properly all good with this query

View 1 Replies

How To Extract Specific Pages In Pdf Using Itextsharp

Dec 6, 2010

How to extract specific pages in pdf using itextsharp?Suppose i have 16 pages of pdf i want to extract page number 2,8,16 from that 16pages.

View 1 Replies

Web Forms :: Extract Specific Portion Of A String Using Substring?

Apr 28, 2010

How to extract specific portion of a string using substring? I have strings

100 - abc - jewellery
20 - def - stationary

I only want the portion between to dashes. (abc,def)

View 6 Replies

DataSource Controls :: How To Convert String (comma Separated) To Int

Mar 1, 2010

I'm having a asp.net listbox on the front end webform with multiple selection, after user selecting multiple items, i'm capturing the DataKeyValue of listbox(which is amenity_id of bigint) and looping all the selected items to a string with comma sepearated values. For example if user selects first 4 options, my output string will be like this (1,2,3,4) and i'm passing this as a string type to my data access layer and then to my below stored proc. I'm geting this error while inserting.. i know that my data type is of bigint and i'm trying to insert string type. i need to convert the string type to INT type and insert data. below are my stored procs:

[Code]....

This is where i'm splitting the comma seperated values and inserting them into table.

View 7 Replies

DataSource Controls :: Use WHERE In With Comma-separated String Of Integers?

Feb 7, 2011

Been Googling about this for a couple of hours but haven't hit on the solution yet. This is an ASP.NET 3.5 app connecting to an MS SQL 2008 backend. The app uses a strongly typed dataset with ad hoc queries in table adapters. The object data source on the markup page will have one parameter that will accept a string of comma separated IDs. I need to feed that list of IDs to the WHERE clause in a query to pull each of the specified records. This is trimmed down version of the query:

[Code]....

View 2 Replies

DataSource Controls :: How To Extract First 3 Digits From A DropDownMenu

Apr 21, 2010

I have a web form where there are couple of DDL's; DDL1 and DDL2 respectively. I want the DDL2 to be populated based on what option is selected in DDL1. Also I just want to extract the first three digits of the value selected in DDL1 and use it in the WHERE clause of the SQL query used to generate DDL2.

My prob is that I am not able to extract the first three digits out of DDL1 to be compared to another field from the DB in the WHERE clause of the SQL query for DDL2.

Here is my code for DDL2

[Code]....

View 15 Replies

DataSource Controls :: How To Extract Specified Data From The Column

Apr 9, 2010

i have a data column which contains data in the folowing format :

12345-ABC-1234
1234-AB-123
123-A-12

how can i retrive columns based on the characters between the hyphens

e.g. only those columns which contain AB between hyphens(-)..

View 2 Replies

DataSource Controls :: How To Create A Comma-delimited Column For Each Datarow (SQL)?

Feb 3, 2010

[Code]....

View 8 Replies

DataSource Controls :: How To Create A Comma Separated Format Files

May 27, 2010

I have a .dat file that I want to upload to SQL server, the file is comma separated. A fmt file can be created for fixed format file, howeverthis one will be a comma separated. How can I create that file?

View 4 Replies

DataSource Controls :: Split Recods If Column Contains Comma Else Display As It Is?

May 31, 2010

I have table that's contains 2 columns Name and IDs (VarChar(10)) values are stored as

Name IDs

Test1 Test2 1

Test2, Test3 2
Test3 Test4 3
Mohd Farooq 1,2,5

My requirement is to display as below
Name IDs
Test1 Test2 1
Test2, Test3 2
Test3 Test4 3
Mohd Farooq 1
Mohd Farooq 2
Mohd Farooq 5

View 7 Replies

DataSource Controls :: Extract Selected Data From Column?

Apr 15, 2010

i hve a data column containing data in this format...

1234-ab-1234
123-xy-123
12-ab-12
123-xy-123
1234-a-1234
12-s-1234
1234-xy-1234

how can i extract data between hyphens (ab, xy, a, s).. i need to extract distinct data only...

View 4 Replies

DataSource Controls :: Extract Numerical Digits From A String?

Mar 18, 2010

I need to extract numerical digits from a string using sql in a select statement

"Customer is eligible for Balance Billing with $10 credit on the next bill. Fixed monthly Balance Billing amount is $141.38. Offer is valid till the end of March 31, 2010."

I need ot extract 141.38 from teh above text.The length of the decimal can vary

View 5 Replies

SQL Server :: Looking For Comma Delimited List In A Field

Nov 11, 2010

How can I return a comma delimited list of codes for each client, to a temp field in the results of a select statement in a stored procedure?

Is it posible to get a comma delimited list into a temp field of a temp table?

I have a table tblCodes that has the following fields ClientID, CodeID

I have a table tblCodeLookup that has the following fields CodeID, CodeDecription

I need to get a temp table with two fields ClientID and a field that holds a comma delimited list of CodeDescriptions for each clientID. Maybe the tmp fiel would be named ClientsCodes Select clientID, ClientsCodes

View 6 Replies

SQL Server :: Extract Part Of The Field?

Nov 3, 2010

One of the fields in a table stores a long article. I just want to extract the beginnig part of it; could be any portion of it, like first one or two or three paragraphs. The vb code shows below:

Imports System.Data.SqlClient

Partial Class _Default
Inherits System.Web.UI.Page
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Try

[Code]....

I really don't want the whole article displaying in the literalBrief. A few paragraphs from that article would be good enough. Is it possible to achieve that? At SQL level, or in VB coding, something like substring function?

View 10 Replies

How To Pick Specific Field Besides Primarykey Field Through HQL Query

Oct 24, 2010

how to pick a specific field (besides Primarykey field ) through HQL query ???

View 5 Replies

DataSource Controls :: Importing A Comma Separated File And Escaping Apostrophes?

May 28, 2010

I am importing a comma seperated, single quote delimited file based off of client specifications. The only problem is now the client is sending apostophes in the file and is throwing off the single quote delimiter.

For Example:

'FirstName','LastName'
'John','O'Grady'

I need to figure out somehow to escape or replace that character before it goes into my OLE dataset import and then handle it before it hits my SQL table. Here is my current process flow:

Save the file to the App_Data using a FileUpload control Build a schema.ini for the ' delimeter Import into a dataset using Microsoft Jet OLE Use a for loop to pick out the fields that I need and build an insert into SQL I was trying to replace the ' with an underscore but then ended up replacing the whole file instead of just the one in the name.

View 3 Replies

DataSource Controls :: Uniquely Extract Tables From Database Schema?

Jun 11, 2010

I am looking for a fast way (either by script or Query statements) that would enable me uniquely extract some tables from my database schema.

The tables I wish to extract have some unique columns like x and y coordinate columns and i want to extract only the tables that have these coulmns in them.

My database schema is very large with 100s of tables that i cant just go through the tables one by one.

View 4 Replies

SQL Server :: Delete Comma From Table Field Values?

Jan 7, 2011

I have a table in which there is one column named "Address1"

Now in this column all the data in this displaying as follow:-

sector-2, Guj,676
Sector-4,AHD,8989

Now i want to modify all the data in this column,

if there is any "," comma found in the data,

it should delete that comma from the data?

View 2 Replies







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