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


Top 5 Contributors of the Month
Kaviya Balasubramanian
satyapriyanayak
SP
abhays
Sasi Prabhu
Post New Web Links

Exclude rows that has certain values

Posted By:      Posted Date: September 20, 2010    Points: 0   Category :Sql Server
 

Hi,

We are using sql server 2005. Data looks like this:

ID    Type      Category        Code     Amount

1      XF+          NETX              600       50

2      XF-           NETX              600       60

3      XF+          NETX              607       50

4     XF-            NETX              890       98

5     WHD          WIRE              799       80

I need to get result excluding the data that are


View Complete Post


More Related Resource Links

Refer Rows/values of OLEDB Source inside DFT

  
I have a Data Flow task that implement Insert/Update using logic:  http://social.msdn.microsoft.com/forums/en-US/sqlintegrationservices/thread/131dbe38-95a9-4b64-8434-60ba3cd6de00/. Now I want to also include "Delete" just after the OLEDB Source where I will delete from Target Table if the Rows are present in Target and No in the OLEDB Source. So what control I should use and how do I refer to the OLEDB Source records. May be something like: Delete from dest_table where ID NOT IN (SELECT ID from OLEDBSourceControlRecords)... Thanks, Prabhat

Infopath 2007 Repeating Table - Multiple Value Column Text - Hiding Rows based on Column text values

  
Infopath 2007 browser based form Full Trust Example: I have a repeating table (FruitChoice) that has multiple columns. Both drop down list point to sharepoint list data sources. Choose your tree ft. drop down list – 6Ft Choose your Department drop down list - 103 This repeating table is conditional on the drop down values. This works great. Trees     Fruit       Cost   Date Ordered    Date Delivery Department 6Ft        Peaches                                                        103 3Ft        Apples                                                          102 3Ft        Peaches         &

Failed to enable constraints. One or more rows contain values violating non-null, unique, or foreign

  
Using Visual Studio with MySQL.In my XSD dataset I created a query. It runs perfect. I can preview the data fine.In my BLL I wrote code (see below) to retrieve the query results and I'm getting...Using db As New dsDemoTableAdapters.DemoTableAdapter Dim dt As New DataTable dt = db.GetDemo(DemoId) ' ERROR HAPPENS HEREFailed to enable constraints. One or more rows contain values violating non-null, unique, or foreign-key constraints.Why would previewing the data work but in code it fails?Any ideas?

Desired rows not returned because of null values

  

I have a property table and an image table.
I want this query to return all distinct properties and a thumbnail image. However some properties don't have thumbnail images and they
don't get returned by the query. If the imgid is null I still want to return the property. Not sure of how to do this. Thanks

ALTER PROCEDURE dbo.procGetPropertiesSelect2
AS
SELECT        tblProperty.PropertyID, tblProperty.SubmitPersonKey, tblProperty.SubmitDate, tblProperty.Active, tblProperty.PropName, tblProperty.StreetAddress1, tblProperty.Storage,
           tblPropertyImages.ImgID
FROM            tblProperty INNER JOIN
                         tblPropertyImages ON tblProperty.PropertyID = tblPropertyImages.PropertyKey
WHERE        (tblProperty.PropNa

How to hide matrix rows based on values?

  
Hi,

I have a matrix settled upon an MDX Query using Reporting Services 2000.
In columns i have the Months and in  the Lines and i have Products, so what i need todo is hide the rows that have a 0 value in all months.

How can this be achieved?


Best Regards,
Luis Simões

Concatenating column values for multiple rows

  

I know this question has been asked many times. I am just trying to verify that my solution is correct.

I need to concatenate a column values with the rows being ordered on another column.

I initially used the FOR XML PATH clause for the purpose, and it worked wonders, until I had XML entities (&, < etc) in my data, and FOR XML PATH encoded those. After some searching on experts-exchange, I came up with the following code for myself:

	SET @freeFieldXml = '';
	SELECT @freeFieldXml = @freeFieldXml + '/' + Value FROM @fields ORDER BY CodeType;
	SET @freeFieldXml = STUFF(@freeFieldXml, 1, 1, '');

In my testing, the above code worked perfectly. I just want to confirm that the data would always be sorted on the desired column and the concatenated string would actually have the field values sorted by that column.


I always think tomorrow will have more time than today. And every today seems to pass-by

Urgent:Create/Update Winforms grid columns and rows with config file values

  

I have legacy winforms datagrid , I have to add/replace columns with new values, My new column names and row values are changes as per new requirements , so I am looking to update datagrid form any config file , so in future for any new requirements , If I update my config file , it hast update existing datagrid.

Please suggest me the code; I am trying from 4 days and its urgent now.

 Thanks

Satya


Urgent:Create/Update Winforms grid columns and rows with config file values

  

I have legacy winforms datagrid , I have to add/replace columns with new values, My new column names and row values are changes as per new requirements , so I am looking to update datagrid form any config file , so in future for any new requirements , If I update my config file , it hast update existing datagrid.

Please suggest me the code; I am trying from 4 days and its urgent now.

 Thanks

Satya


Satya

How to list comma separated values in column to multiple rows

  

Hi,

 

I need to list comma seperated values form one to column in multiple rows..ex:

id                           call_rec 

1                            508190,737079,1004618,1075562,1272753,1390841,1544201,2591141

 2                           335395,359380,741049,1113212,2283999,2908851,2001205615 

3                            1212358,2451853,2795175,2001196872 

4                            2283999,2451853 

I want the call_rec for each bug ID to be listed

ex:

id                    

Group two rows together by picking the Distinct Values

  

Hi

There are many duplicate rows on the Table. where I need to pick the Distinct Values.

 

Ref Adur Achg Bdur Bchg TotChg StartBal EndBal

XML with PrimaryKey values to delete rows in database table at a time

  

 Hi,

I'm having a gridview in my aspx page with checkbox, User can select one or more than one record(s) at a time and clicks on delete button, Then i'm constructing an object of my DTO and adding all the checked row's Primary Key (DataKeyNames - GUID's in my case) to a serializable class and generating an XML and sending it as parameter to the Stored Procedure.

My Doubt is, can i bulk delete all the rows from database table those are present in my XML document??

If it works, I can do bulk update with XML only, i already did bulk insertion by generating an XML..

My Another Question is, Will it affect the performance? Each time when i construct an DTO object and adding it to the Generic List??

WHich one is better, I mean ObjectDataSource or SQLDataSource or my XML method??

Can anyone please help me out clarifying my doubts and also XML Delete Query..

 

My XML will be like this

 

<root>

<Customer>

<CustomerID>GUID1</CustomerID>

<CustomerID>GUID2</CustomerID>

<CustomerID>GUID3</CustomerID>

 ...

 ...

</Customer>

</root> 

Will bulk delete happen in the above case?

Thanks,

PAvan


Values in repeating rows being replaced after opening the form a second time

  

I have a couple Infopath forms and recently they started behaving oddly.

In each of them there is a repeating row. In each row you enter a work order as the first value/column, this then filters the second column which is a drop-down with the various items on that work order. The remaining rows are then descriptions of those select items respectively. This information is all retrieved from a single SQL connection.

It all looks great, you click submit (It submits those values to a SharePoint list) and is then saved in the document library. However if you open the form after the values in each of the repeating row has reverted back to the first item for the selected work order.

For example: I enter work order 3344 which consists of items x, y, and z. In the drop down I can select item x, for the second item, I select y, and then z for the third for a total of 3 rows I then click submit.

If I open the form again the correct work order is still displayed but the three rows are all showing details for x, the first item in the work flow.

Does anyone have any idea what could be doing this? Thanks in advance!


split data set values into 2 rows

  
I have a dataset that contains my customer sales entries for all months over the past 24 months. I would like to set up my report in a way so that the sales by month in the current year show on the first line of my report and the sales by month of the previous year show on the second line , so the months from year to year can be easily compared.
My data set results look like this:

Customer     Date     Sales
Joe Smith 2011-02 120.50
Joe Smith 2011-02 144.55
Jane Doe 2011-02 111.20
Joe Smith 2011-03 220.20
Joe Smith 2011-04 130.60


I've build a matrix report that summarizes the sales for each month by customer

Adding Dynamic Rows in ASP.NET GridView Control with TextBoxes and with Delete functionality

  
In my previous examples, I have demonstrated on how to add dynamic rows in GridView control with TextBoxes and how to save the values into the database. Now, seems that most of the developers are asking if how to add a delete functionality with it. So in this example, I'm going to show on how to delete a certain row in the dynamic GridView with TextBoxes.
Categories: 
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