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

Post New Web Links

How to get the right combination

Posted By:      Posted Date: April 14, 2011    Points: 0   Category :


I need to write a SP to explore the combination of the cards from three bags?? Is anyone can help me out on this one without using a cursor? Thanks.

/ Sample Data /                                             / Wanted Result /

View Complete Post

More Related Resource Links

formula to display all combination output


hi all

i am now think of how to get all the output for all the combinations


given : 1234

output = 1234,1243,2143......and so on.....all 24 possible output

if given : 123

output = all 12 output

if given 12345 , all 120 output...

can someone provide me the algorithm or formula for that ?


order by in combination with union


 Hi All,

How can I order this by count? so if it appears above and below the union statement, I want it on top

	SELECT distinct BIER.Naam, BIER_L2.L2_Naam, BIER_L3.L3_Naam from BIER_MATCH, BIER, BIER_L2, BIER_L3

	SELECT distinct BIER.Naam, BIER_L2.L2_Naam, BIER_L3.L3_Naam from BIER_MATCH, BIER, BIER_L2, BIER_L3
	where BIER_L2.L2_ID = BIER.L2_ID and BIER_L2.L3_ID = BIER_L3.L3_ID and RECEPT_ID = @RECEPT_ID 
	and BIER_MATCH.BIER_ID is null


insert into in combination with inner join


Hi All,

I have my data split in 3 tables for cascading dropdownlists.

How can I make an update statement of this select statement?

SELECT distinct BIER.Naam as naam1, BIER_L2.L2_Naam as naam2, BIER_L3.L3_Naam as naam3
	from BIER, BIER_L2, BIER_L3
	where BIER_L2.L2_ID = BIER.L2_ID and BIER_L2.L3_ID = BIER_L3.L3_ID 



Regular Expression for Digits, comma & space combination

Hi Can you suggest a Regular Expression for the following category. A text box which should contain: Max size : 53 0-9 digits + a comma + a space The 0-9 numbers should be repeated 5 times and separated by a comma and a space Eg: 123456789, 123456789, 123456789, 123456789, 123456789 Thanks, David.      

Problem with calculation in combination with crossjoin

Hi fellows   I dont know how to rewrite my MDX in order to get the correct result.    The following MDX statement is reduced to a minimum in order to explain my problem: WITH    MEMBER [Article].[Article].[Article_CE]    AS AGGREGATE ([Article].[Article].[Article_1], [Customer].[Customer].[Unknown], [Location].[Location].[USA])              SELECT       {[Measures].[SalesNet]       ,[Measures].[Budget] } ON COLUMNS ,       NON EMPTY         [Customer].[Customer].[Customer].members         * {[Article].[Article].[Article].members          ,[Article].[Article].[Article_CE]} ON ROWS FROM SALES   If i dont display the customer hierarchie " [Customer].[Customer].[Customer].members " on rows, then every thing works fine! As Soon as I add the above customer hierarchie to my mdx statment, then every thin works fine except for my member " [Article].[Article].[Article_CE]". Instead of showing only one row for customer "Unknown" (see Member definition), a row appears for each customer and with the same SalesNet and Budget.   Any Idea how to rewrite my mdx ?   best regards Pellito

website and webapplication combination

Salam All Experts, i have two solutions, 1st one is webapplication, 2nd one is website. the 1st soltions (webapplication) includes aspx pages, user controls .... etc. the 2nd solution (website) also includes pages, user controls ... etc. now i need to combine between those, so i copy the webapplication inside a folder in the website, and i put the DLL's for the webapplication inside the main Bin folder, and the theme's like so. but after that, i make some changes in the source code of webapplication, i build the solution, but the new source code updates doesnot appear in the run time !!!! its still running the code before i make combination !! does that because i make the 1st solution as a webapplication ?? how can i convert the 1st solution to a webapplicatoin? or in other words how can i make combination between webapplication and website to run as one solution? please response. thanks

cannot we hide as we say clip which is combination of table and some static text when the table valu



well am just having a problem as 

cannot we hide as we say clip which is combination of table and some static text when the table value is empty or null.

Defining uniqueness of a record with combination of IDs



My question may be trivial but I just have a hard time abstracting table relationships :P

I have 3 tables:

[] -> primary key

Datas: [ID], Data
DataValues: DataID, ValueTypeID, Value
ValueTypes: [ID], Name

The first is the main table;
The second is an value-attributing table and reason of this topic;
The third is the value type definer;

The problem is as follows:
I want to be sure on this low-level model that ONE ValueType record only gets refferenced by ONE Data record.

Datas: ID -> 27, Data -> "Some Data"
ValueTypes: ID -> 14, Name -> "Length"
DataValues: DataID -> 27, ValueTypeID -> 14, Value -> 9

I want not to be possible to add another record in DataValues with DataID = 27 AND ValueTypeID = 14
It should allow, though, DataID = 27 AND ValueTypeID = 18 or DataID = 65 AND ValueTypeID = 14, for example.

Thank you,

Matheus Simon.

Different matches starting at the same index (combination of lazy and greedy)

Hello everyone

My question is:

when catching a regex pattern that has a quantifier like * or +, it matches the greedy way, and by adding ? we can match it the lazy way. is there a way that we can match both of them, including all the matches on the way? in other words, is it possible at all for two different matches to start at the same index?
for example

for the input:
a something something b blah blah b blah blah b

we want to have all the 3 matches:
- a something something b
- a something something b blah blah b
- a something something b blah blah b blah blah b

so is it possible (our platform is .NET if it has any meaning)


Combination Keyboard Shortcut KeyBinding Question


Hi Everyone,

My question is whether it is possible to create a keybinding for Ctrl+A,N.  Meaning that the user will first press Ctrl+A and then press N.

I am aware that Ctrl+A can be catered for very easily.

Any response will be valued.

Resource file and Assembly combination cause errors


I have an interesting issue. I first encountered it in Visual Studio 2010 Beta2 and am now able to replicate it in the release. The error occurred when i switched my company’s main application from 2008 to 2010. My quick fix at the time was to delete the form level resources and set any missing information from the resource in the form new. Recently, I encountered this issue in a much simpler application which lead me down this path.

The error reads "Could not load file or assembly '.../ClassLibrary1.dll' or one of its dependencies. An attempt was made to load a program with an incorrect format." and points to my form's resource file.

After experimenting with all sorts of combinations of objects, files, and resources, I narrowed it down to the following circumstances.

  • On a 64-bit machine, create a 3.5 windows application.
  • Add an ImageList to the form and choose an image for the ImageList. It doesn't matter which image.
  • Create a 3.5 class library and make sure the first letter of the library's assembly name is less than 'S'. Ex. "ClassLibrary1"
  • Set the library's target cpu to x86
  • Add the library as a reference to the windows form.

These steps will produce the error at compile time. The library name just has to be before "System" on the reference list. When

Designing lists: Quick key combination for adding a new list column field?


I'm simply looking for a way to quickly design lists, and I find it rather slow to use the mouse to go to the Add New Column button in the ribbon every time when I want to add a new list field.

The only column that can't be changed type of later seems to be the Calculated column. But for all others, you can still change them afterwards.

An answer with a combination of two kinds of answers


Hi, I am creating a form for the lab and I want to make the question with multiple choices.

Possible answers are following.

-500 -70 -15 15 70 125 500

However, I want to make the answer by selecting two answers.

The user can check/uncheck Neg and select one of 15,70,125,500.

Neg 15 70 125 500

There is one parameter linked with backend database. Is it possible to make a conditions like this?

MVC Checkbox and Textbox combination


I am very new to MVC and I have a Model like this

User :

FirstName : TextBox LastName : TexBox User Commitee : [CheckBox Textbox] [CheckBox Textbox] [CheckBox Textbox]

I store if user is in committee in a separate table.I need to insert selected check box value and related text box to database.How can I achieve this ? Can this be possible with using EditorTemplate ?


delete from one table if a combination of data doesn't exist in another


this will work, but i am 100% certain there's a more efficient way:

create table stgClients(intClientId int, status1 varchar(50), status2 varchar(50), status3 varchar(50))

create table lkpClientStatus(intStatusId int, vchStatusCode varchar(50), bitDeleted bit)

create table trefClientsStatus(intClientId, intStatusId)

DELETE FROM trefClientsStatus WHERE cast(intClientId as varchar(10)) + '|' + CAST(intStatusId as varchar(10)) NOT IN
SELECT cast(a.intClientId as varchar(10)) + '|' + CAST(a.intStatusId as varchar(10)) FROM
(SELECT DISTINCT sc1.intClientId, cs1.intStatusId
FROM stgClients sc1 INNER JOIN lkpClientStatuses cs1 ON (LTRIM(RTRIM(sc1.status1)) = cs1.vchStatusCode AND cs1.bitDeleted = 0)
WHERE NULLIF(LTRIM(RTRIM(sc1.status1)), '') is not null
SELECT DISTINCT sc2.intClientId, cs2.intStatusId
FROM stgClients sc2 INNER JOIN lkpClientStatuses cs2 ON (LTRIM(RTRIM(sc2.status2)) = cs2.vchStatusCode AND cs2.bitDeleted = 0)
WHERE NULLIF(LTRIM(RTRIM(sc2.status2)), '') is not null
SELECT DISTINCT sc3.intClientId, cs3.intStatusId
FROM stgClients sc3 INNER JOIN lkpClientStatuses cs3 ON (LTRIM(RTRIM(sc3.status3)) = cs3.vchStatusCode AND cs3.bitDeleted = 0)
WHERE NULLIF(LTRIM(RTRIM(sc3.status3)), '') is not null) a

yes the trims and nullifs are

C# Detect Key Combination Pressed



   How can I detect on my Form if the following key combination is pressed in sequence.

Hold ALT then 'P' then 'A' then 'U' then 'L'



Database snapshots in combination with filestream



I've created a database snapshot from a database with a table that use filestream.

The creation of the snapshot works, but when I try to restore the snapshot I get the error "The database cannot be reverted because FILESTREAM BLOBs are present".

Is there a way around this?



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