Viewing 15 posts - 211 through 225 (of 283 total)
I got it thanks!!
Create Function [dbo].[Splited_Values]
(
@CommaSeparatedString varchar(8000)
)
RETURNS @Table Table ( startid int,ID int)
Begin
Declare @TempStr varchar(8000),@tempval int=1
Set @TempStr = @CommaSeparatedString + ','
While Len(@TempStr) > 0
Begin
Insert Into @Table Select @tempval,SubString(@TempStr,1,CharIndex(',',@TempStr)-1)
Set...
January 2, 2013 at 6:28 am
hi,
declare @input varchar(1000)='1,1,5,5,6,2'
start, difference
1,1
2,1
3,5
8,5
13,6
19,2
Go
declare @input varchar(1000)='5,3,2'
start, difference
1,5
6,3
9,2
January 2, 2013 at 5:37 am
Ensure that SQL server service A/c has permission to access that file, logins should have access to that folder.
Thanks!
January 2, 2013 at 4:11 am
I got the Solution
Go
CREATE TABLE TEMP (id int ,C1 INT, C2 INT, C3 INT,C4 INT,C5 INT, C6 INT)
Go
INSERT INTO TEMP (id,C1,C3,C5) VALUES (1,2,3,5)
INSERT INTO TEMP (id,C1,C3,C5) VALUES (1,6,7,8)
Select * from...
December 28, 2012 at 12:05 am
Your are exactly right it is a meta data kind f thing only from meta data i will be getting this information,but there is no hard-cord rule like thing...
December 27, 2012 at 5:36 am
This is the situation
I need to create tables dynamically on run time the schema of the table will be given by customer and same time he will give the...
December 26, 2012 at 11:18 pm
These data hold the data of that customer related details which will be joined with some basic tables.There are some master tables are there and need to join with upcoming...
December 26, 2012 at 10:12 am
SQL Server can only be installed on a Microsoft Operating system, so you'd have to create a virtual environment in Linux running , say Windows XP, and then install SQL...
November 21, 2012 at 11:54 pm
you can get the time by running this query also
Select name,crdate from sys.sysdatabases where name='tempdb'
November 14, 2012 at 12:21 am
ChrisM@Work (11/6/2012)
DECLARE@MyInput VARCHAR(8000),
@MyOutput VARCHAR(8000)
SELECT
@MyInput = '101011123',
@MyOutput = ''
;WITH MyTable (startid, Length) AS (
SELECT 1,1 UNION ALL
SELECT 2,1 UNION ALL
SELECT 3,1 UNION ALL
SELECT 4,2 UNION ALL
SELECT...
November 6, 2012 at 5:43 am
How many different record layouts would you like to handle automatically?
i am having some 80 columns
And, no... this actually isn't a pivot problem. It's simply a...
November 5, 2012 at 11:45 pm
No, i am looking alternate method for pivot.
i have used another way like
DECLARE @input varchar(4000);
DECLARE @sql NVARCHAR(MAX)
select @input='101011123'
SELECT @sql = ISNULL(@SQL+N','+CHAR(10),'') +
...
November 5, 2012 at 5:38 am
Say i'm having a string like this '101011123'
i need to split the sting based on my statid & endid
startid, endid
1,1
2,1
3,1
4,2
6,3
which needs to split something like
1,1---->1 starting position...
November 4, 2012 at 10:21 pm
Viewing 15 posts - 211 through 225 (of 283 total)