|
thank you!!! i try it...
|
|
|
|
|
declare @a varchar(500)
set @a = '1,2,3,4'
how to generate output for all the combinations of input @a like 1,2,3,4 ; 1,2,4,3 ; 1,3,2,4 ; 1,3,4,2 ; 1,4,2,3 ; 1,4,3,2 ; 2,1,3,4; 2,1,4,3 ; 2,3,1,4...
All the numbers will be in series like for 10 digits.. 1,2,3,4,5,6,7,8,9,10.
i require all the combinations to be generated. the series i found like in the input if last (N) and last-1 (N-1) digits are interchanged, in series 1,2,3,4, second sequence wil be 1,2,4,3 ( interchange last two digits). next 1,3,2,4(N-3 digit is incremented and missing numbers 2,4 are placed).Next sequence wil be 1,3,4,2 ( interchange last two digits).. it could give all the combinations.
Could some one help me in providing solution for this. while i am using sql server 2005.
thanks in advance,
rpp
|
|
|
|
|
I do not have an answer in T-SQL or SQL but here[^] is a link to a C# recursive algorithm that you might find useful.
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
Ew, recursion is not necessary for this, but I agree that SQL isn't the right tool.
|
|
|
|
|
but my requirement is, i need to work on sql server 2005 only.
|
|
|
|
|
Hi All
How can i use Stored Procedure?I am using MySql and ODBC.in the code i am create table andinsert the data.It's take too much time.So i want to do through Stored Procedure.Plz help me
|
|
|
|
|
|
I know about sp_who and sp-who2 procedures, but how can I detect orphaned connections/processes?
You will agree that LastBatch information should be ignored in most cases.
I am trying to make a services which logs some statistical data about connecting to sql server and killing orphaned connections would be a nice feature.
I use Sql Server 2005 Express.
|
|
|
|
|
I've been asked to create a database for my department, using a template from another business unit. I'm good with HTML, MS Access, and SQL, but the current system is asp-based and I've never played with that before. Am I headed for trouble? What kind of transfer of learning should I expect?
My software administrators don't have anything on their list of "standard applications" for this, so I'll have to request them to purchase something new. What do you all recommend?
|
|
|
|
|
If you are starting from scratch, you should look at using Visual Studio 2008 and develop your web based app as a ASP.NET applicaiton.
Get your feet wet, then dive in head first.
|
|
|
|
|
I agree with David on the part of getting yourself VS2008 if you do not already have it.
Bomb_shell wrote: Am I headed for trouble?
Not necessarily so. It will be a valuable learning experience for you and feel free to ask any additional questions you have
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
"Not only do you continue to babble nonsense, you can't even correctly remember the nonsense you babbled just minutes ago." - Rob Graham
|
|
|
|
|
How to attached oracle Database in any other Computer?
|
|
|
|
|
Ok this one is going to take a little telepathy, you probably have 1 of 2 requirements, connect to an Oracle database from another client, check out connectionstrings.com or possibly attach an Oracle database to another Oracle server, read the Oracle documentation.
You really need to be clearer and more explicit with your questions.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Mycroft Holmes wrote: be clearer and more explicit with your questions
I agree. It was so unclear, only assumptions could be made due to it being so vague.
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
"Not only do you continue to babble nonsense, you can't even correctly remember the nonsense you babbled just minutes ago." - Rob Graham
|
|
|
|
|
Hi All
I am using MySQL.Simply i create a table through this command.
create table Pic(picture blob);
insert pic(picture) values('C:\sample.bmp');
one row affected.
select * from pic;
Picture
BLOB
There is no picture show.How can i show picture.
Plz help me
|
|
|
|
|
Have you read the doco on inserting pictures into MySQL? I would think that you just inserted the string 'C:\sample.bmp' into a binary field.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
yes you are right.If i am wrong then plz help me how to insert picture.
Plz help me
|
|
|
|
|
|
how to send report mail from sql server 2008..
plz help me...
|
|
|
|
|
You have now had two hours to do this...
Google[^]
Save your thanks.
I don't speak Idiot - please talk slowly and clearly
I don't know what all the fuss is about with America getting it's first black president. Zimbabwe's had one for years and he's sh*t. - Percy Drake , Shrewsbury
Driven to the arms of Heineken by the wife
|
|
|
|
|
hi all,
in my application, i use MSSQL express 2005 as backend. when i create backup file from one server (say A) and restore it on same server (A), then it works well. but if i restore the Backup file of Server A to another server (say B), then it give error as following
"The Backup set Holds a backup of a database other than the existing 'DatabaseName' database. RESTORE DATABASE is terminating abnormally."
on both server instance name and database name is same
please suggest how can i resolve this error
|
|
|
|
|
before taking backup check some point
1.where the mdf file located(is there any folder which is contain .mdf)
2.when u r creating .bkp file always use overwrite existing file option.
Thanks and Regards
Sujit Kr. Mandal
|
|
|
|
|
Sujit Mandal wrote: 1.where the mdf file located(is there any folder which is contain .mdf)
mdf and ldf file is located on shared folder (for example c:\abc or E:\abc)
folder abc is shared which i create programmatically
Sujit Mandal wrote: 2.when u r creating .bkp file always use overwrite existing file option.
i already check whether there are any file with same name. if yes, then first remove it and after that i create backup file
|
|
|
|
|
--> what is the problem with the following query... Actually i am running it against Access 2007 from VB.net 2008...
SELECT * FROM TBL_SALES where product_id=2 and customer_id=3 and dated='2009-10-01'
--> it works when i run it from SQL Server 2005... but doesn't work from dotnet... Need some suggestion from your side.. thanks...
J A Nasir K
|
|
|
|
|
Jamal Abdul Nasir wrote: doesn't work
Luc Pattyn
I only read code that is properly indented, and rendered in a non-proportional font; hint: use PRE tags in forum messages
Local announcement (Antwerp region): Lange Wapper? Neen!
|
|
|
|