.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Split in SQL

Posted By:      Posted Date: September 15, 2010    Points: 0   Category :Sql Server
Hi all In my table,I have a value like below SNo   Name        Keys                    Sta     Result 1        Rajesh     4,5,8,10,13,16       y       n I want like this . 1        Rajesh     4                           y       n 1        Rajesh     5                          y       n 1        Rajesh     8                          y       n 1        Rajesh    10            

View Complete Post

More Related Resource Links

Using Conditional Split data Transfer in SSIS 2008

This article uses the Integration Services Conditional Split Data Transformation element to filter and transfer data from a set of flat text files to SQL Server database table. The concept can be easily extended to apply to any other source or destination such as Microsoft Excel. This scenario is useful in creating denormalized database tables in a reporting and analysis situation.

Split Name In SQL Server

One common task performed in database applications is given a full name, how can this be split into the first name and last name. In this article, three different methods are discussed to perform this task using three different functions in SQL Server. It is assumed in this article that the full name is just made up of one first name and one last name.

split with javascript



i have this garbache value %B463822546831472^MILIN JONE/OBAMA         ^1308226223780000731000000?;E?

now i wana slit with javascript and show on my aspx page like this(bold words)




How can i split with java script.plz help in this issue

Split URL/Path in Classic AND .net 2.0


I need to be able to get the different parts of the URI (and convert from/to relative page paths) in BOTH classic ASP and .Net 2.0 (VB).

For example, if I have "http://sitename.company.com/index.aspx?sec=fred&pag=dis&mode=1" OR "/index.aspx?sec=fred&pag=dis&mode=1"

IS there a function where I can pass in either string (assuming I'm on sitename.company.com) and get back an array with:

(0): sitename.company.com
(1): index.aspx
(2): sec=fred&pag=dis&mode=1

(Or, alternately, three different functions that would return the three parts?)


string.Split - not all characters allowed as separator



I am working on a site where I use the Split function on a string.

To make sure I used a separator character that I do not use anywhere in the data I selected the character '£'.

This worked fine in Firefox and Safari, but in IE8 I get an 'Index out of range' error, so apparently the '£' character is not handled correctly.

I changed the separator to ';', and then it works fine.



split one data column into many?


Hi, I've a database table contains survey questions and answers. But the problem is both 'question' and 'answer' are saved in the same column(like below).

SubmissionDate                                                          Submission

2010-02-15 14:53:59.657                     ***What's your pet's name?***  Lili ***Tell us about yourself*** I'm a teacher

2010-02-15 14:53:59.657                     ***What's your pet's name?***  Lucy ***Tell us about yourself*** I'm a five star cook

I'd like to use a simple datagrid to display the survey result, but I need to separate the submission column into multiple columns ('question' as column name, 'answer' as data)

the number of questions or questions being asked are different for each survey so they are not fixed. 

Is it even possible to get something like this below in a gridview? 


Web Deployment Projects wont split dll's



When i try to build my Web Application project using the Web Deployment Projects the dll's aren't splitting into seperate asemblys as i have set it to.

My output look like this:

------ Build started: Project: ClassLib, Configuration: Release Any CPU ------
ClassLib -> C:\Users\Heu\Desktop\SBCms_Release_1_0\ClassLib\bin\Release\ClassLib.dll
------ Skipped Build: Project: SBCms Website, Configuration: Release Any CPU ------
Project not selected to build for this solution configuration
------ Build started: Project: SBCms Website.vbproj_deploy, Configuration: Release Any CPU ------
if exist ".\TempBuildDir\" rd /s /q ".\TempBuildDir\"
C:\Windows\Microsoft.NET\Framework\v2.0.50727\aspnet_compiler.exe -v "/SBCms Website.vbproj" -p "C:\Users\Heu\Desktop\SBCms_Release_1_0\SBCms Website" -u -f .\TempBuildDir\
Running aspnet_merge.exe.
C:\Program Files\Microsoft SDKs\Windows\v6.0A\bin\aspnet_merge.exe .\TempBuildDir -prefix test_ -a -copyattrs
aspnet_merge : warning 1013: Cannot find any assemblies that can be merged in the application bin folder.
Successfully merged '.\TempBuildDir'.
if exist "C:\Users\Heu\Desktop\SBCms_Release_1_0\SBCms Website.vbproj_deploy\Release\" rd /s /q "C:\Users\Heu\Desktop\SBCms_Relea

How to split string?


I have a string that looks like this: pic1*pic2*pic3*

I want to take out every pic from the string like this:


I got the first pic but how do i get the other two?

Dim line as string = "pic1*pic2*pic3*"
Dim pic1 As String
Dim pic2 As String
Dim pic3 As String

pic1 = line.Substring(0, line.IndexOf("*"))
pic2 = ?
pic3 = ?

Split List into sub lists of List of size n

Hi all,   I've been playing around for a little bit trying to find the best way of taking a List<double> of variable size and splitting it in to sub-lists of  size n. So maybe a method stub like   public List<List<double>> splitData(int width,List<double> data) { <br/> }<br/> The problem is i cant get my head around how to iterate through the parameter "data" properly when the data.count is not exactly divisible by the parameter "width". I have been trying for loops but i think i need to switch to do whiles.   I'm not massively familiar with LINQ but could anyone advise if LINQ would provide an alternative way of doing it?   Any help much appreciated   John

Split string using Regex with escape sequences

What is the regex to split a string using the delimiter ';', but not split on '\;' ? Backslash would be my escape character in my split string, so finding '\;' would not split, but '\\;' would split. For example I want a regex that would split the following:     "aaa;bb;cccc\;dd\;eee\\;ff\\;ggg\\\;hhh" into the following string array:     aaa     bb     ccc\;dd\;eee\\     ff\\     ggg\\\;hhh   Thanks!   -Sylvain

regex split implementation

hi I have created a function to implement the regex.split in sql. Here's my code: private static IEnumerable<IndexedValue<T>> ToIndexedValue<T>(IEnumerable<T> list) { int idx = 1; foreach (T value in list) yield return new IndexedValue<T>(++idx, value); } private struct IndexedValue<T> { public int Index; public T Value; public IndexedValue(int index, T value) { Index = index; Value = value; } } [SqlFunction(FillRowMethodName = "FillSplit", TableDefinition = "[ID] int, [Value] nvarchar(max)")] public static IEnumerable RegexSplit(SqlString input, SqlString pattern) { if (input.IsNull) input = String.Empty; if (pattern.IsNull) pattern = String.Empty; try { return ToIndexedValue<string>(Regex.Split(input.Value, pattern.Value, Options)); } catch { throw; } } public static void FillSplit(object obj, out int id, out SqlString value) { IndexedValue<string> iv = (IndexedValue<string>)obj; id = iv.Index; value = iv.Value; } However when i try it i get id values but empty text values. Can someone help?

split a column into multiple columns

Hi i have a column with the following values from my source FILENAME ComplianceStatus_ER_06022010.xml ComplianceStatus_AZER_07052010.xml ComplianceStatus_GEL_06022010.xml ComplianceStatus_AFF_05022010.xml ComplianceStatus_Good_2010.xml   I want to split the date into different columns as follows using ssis   FILENAME                            CLIENT      DATE ComplianceStatus_ER_06022010.xml    ER          06022010 ComplianceStatus_AZER_07052010.xml  AZER        07052010 ComplianceStatus_GEL_06022010.xml   GEL         06022010 ComplianceStatus_AFF_05022010.xml   AFF         05022010 ComplianceStatus_Good_2010.xml      Good        2010  

SSAS Calendar Week commencing with split at month

Hi all, Wonder if someone can help. Our CFO wants to see a cube calendar that shows week commencing but stops at the end of month. For example if the dates are Monday  28th   Tuesday  29th   Wednesday 30th   Thursday 1st    Friday  2nd Saturday 3rd Sunday   4th So for this example the week commencing is the 28th of Month 1 and Thursday is week commencing 1st of the next. I am having a problem seeing how I can do this. If I add the weeks to a standard calendar I get the week commencing 28th which includes the 7 days, naturally. I cannot help feeling I am missing something obvious. Cheers

Split Data into chunks?

Hi,I am retrieving data using sqlreader like 60k records. After retrieving I need to split those records into N parts. I need to use those chunks of data in WorkFlows 4.0So can any one help me out to split up the data into parts?

How to split the string value ?

 Hi I  have a string value ie) = '1001010' I want to split one word by one word. like  as 1 0 0 1 0 please guide me.  

html tag split in VB.NET

Could you please give me some good code which can remove the all html tag? for the example<b>boy</b><font color=green>green color</font> <a href="ddd.htm" >my page</a>I need to remove all html tag and print the result in new line. The out put will be.boygreen colormy page BR,
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend