Viewing 15 posts - 331 through 345 (of 1,253 total)
Jeff Moden (3/24/2009)
Chirag (3/23/2009)
Jeffselect substring('1230-544',number,1)
from number where number <= len('1230-544')
and substring('1230-544',number,1) like '[%0-9%]'
Also, your query doesn't put it all back together like the op wanted and you don't...
March 25, 2009 at 12:13 am
Actually Mohit is right. The best way is to have a decrypted copy of the code.
March 24, 2009 at 11:59 pm
Pls post the whole query, table structure and some sample data.
March 24, 2009 at 11:54 pm
Jeff
I mistook this (1230-544,15C5487,132DE78) for a single value rather than 3 values that they are. I assume the op wanted to process one value.
Using a number table would be...
March 23, 2009 at 11:56 pm
check these out
http://www.sqlservercentral.com/scripts/SQLInsider+Scripts/30622/
http://www.sqlservercentral.com/Forums/Topic668995-146-1.aspx
March 23, 2009 at 11:43 pm
Have a look at this
declare @str varchar(100)
select @str = '1230-544,15C5487,132DE78'
;With Breakdown as
(
Select
SubString(@Str,1,1)[Chr],
1[Idx]
Union All
Select
SubString(@Str,Idx+1,1),
Idx+1
from Breakdown
where (Idx+1)<=Len(@Str)
)
select chr from Breakdown where isnumeric(chr) = 1
Edit:- This will return ',' and '-'....
March 23, 2009 at 2:34 am
Look up the EXISTS clause.
IF EXISTS (your query here)
BEGIN
Do something
END
March 20, 2009 at 12:42 am
Pls give more details.
March 20, 2009 at 12:40 am
In BOL under Creating Indexes (Database Engine) section its mentioned that there can be 249 non clustered indexes per table.
But In BOL under Create table sections its...
March 20, 2009 at 12:38 am
Edit:- I posted a query which was not correct. I have removed that query. I could not delete this post.
March 18, 2009 at 3:05 am
Hi
Lonekat_id inserted into personal table must be existing in lonekat table.
March 18, 2009 at 2:19 am
As Chris pointed out the rule needs to be mentioned to eliminate the row but still here goes.....
select *,'A' from samm where noo <> all (select noo from #sammM)
UNION
select...
March 17, 2009 at 6:57 am
You need some identifier value to tell which records are from which table. It could be a column or a static value.
Ex: SELECT *,'A' FROM samm
union
SELECT *,'B' FROM sammM...
March 17, 2009 at 2:55 am
You can use openrowset or opendatasource to export data to excel. If the data set is large its better to use bcp.
Example of bcp - xp_cmdshell 'bcp "select col1,xol2 from...
March 16, 2009 at 5:41 am
Viewing 15 posts - 331 through 345 (of 1,253 total)