How do i get one row if the resultset returned has no rows.
Hi
I have couple of CTE's which i want to ultimately insert into a temp table... and based on my condition some of the CTE's return some rows and some dont... but i want to have the CTE return atleast one row if there is no data in it.. I have tried doing the following but i am not getting the desired output
;with cte_rpt4 as (select '4' a,recd_dt as approve_dt, prov_no, prov_name, client_id, claim_mst_id, claim_adj_id, claim_dt,
claim_amt, rpt4,
(Select count(distinct(Claim_mst_Id)) as crpt4 from #temp1 where datediff(day,isnull(recd_dt,create_dt),isnull(c...
Can't get dw_1.Object.Data[row] for a row > 32768Is anyone aware of a problem with passing a row greater than
MAX(integer) (32768) to dw_1.Object.Data[row]?
I would appreciate a response.
Jameel Abdo
MCI Systemhouse.
I understand that PB5 didn't support object notation for more than 32K
rows. It was supposed to be fixed in PB6 (although I haven't confirmed
it in PB6, myself). The object notation tended to be a tad flakey in
PB5 too (poor null handling, etc.). Many developers decided to stick
with the GetItem, SetItem in PB5 to avoid these problems.
Jameel Stephen Abdo wrote:
> Is anyone aware of a proble...
xquery returning one data row result only?
hi folks,
i am trying to get 2 values from xml file. the query is only returning one.. code and xml file is below.. Dim myXPathNodeIterator As XPathNodeIterator = myXPathNavigator.Select("/root_node/XML_Child_Node/PDT_NO[@p_family='" & prVal & "']/@pdt_des")
While (myXPathNodeIterator.MoveNext())
If myXPathNodeIterator.Current.Name = "PDT_NO" ThenMe.PDT_cmb.Items.Add(New WebControls.ListItem("aaa", myXPathNodeIterator.Current.Value))
'Me.PDT_cmb.DataTextFiel()
End If
End While
myXPathDocument = Nothing
<XML_Child_...
How to get three rows of data combined into one?
I'm trying to select a list of employees from the tEmployees table and join that to a Newsletter Subscription Table. Each employee is in the tEmployees table once, but the employee's ID can be in the tNewsletter table multiple times, as they can subscribe to multiple newsletters. So, one employee is returning as many rows of data as they have newsletter subscriptions. Is it possible to some how group or merge this data, so taht each employee only has one row of data, with a column for each newsletter they subscribed too? Never make important decisions on a Mon...
Displaying one of the columns in GridView data as GroupBy or similar data one after another row
Hi
Would like to know the property or code that will Group data in one of the columns of GridView together.
In other words i like to display the columns data in GridView that is repeated more than once together.
Example: say Column heading
Name
John
Jim
Kevin
Albert
John
Jim
John
You can see john or jim is displayed in Name Column at various rows. I like to get them displayed together such as
John
John
Jim
Jim
Regards,-- "Mark As Answer" if my reply helped you --
Hi
I am not too sure, but may be you can try a "Order by" clause at your SQL level. Say,...
Get differant rows from db and return one SqlDatareader?
I need to get several rows from db in one SqlDatareader. How do I do that? This is my procedure:
CREATE Procedure hentEnkeltVare
(
@varenr int
)
AS
SELECT
v.navn,
v.enhed,
vt.navn as type,
v.pris,
v.billedNavn
FROM
vare as v,varetype as vt
WHERE
v.type=vt.typenr and varenr=@varenr
GO
And with this method I can get one row from db:
public static SqlDataReader hentEnkeltVare(int vareNr)
{
SqlConnection sqlConnection = Util.Connect();
SqlCommand s...
How do I find the number of rows returned in an Object Data Source
Hi,Does anyone know how to find out how many rows have been returned when an Object Data Source has been bound?Thanks.
I believe you'd use the selecting event handler - like this:
protected void ObjectDataSource1_Selecting(object sender, ObjectDataSourceSelectingEventArgs e) { bGetSelectCount = e.ExecutingSelectCount; }
Take a look at parameter 'e' in the Selected event of the ObjectDataSource. The ReturnValue should give you the datatable/dataset you're about to b...
DetailsView and getting data from a row or field?! VB.NET
I am using Visual web developer and ASP.NET 2.0 using VB.NET Basically i have a detailsview which is bound to a database. It has two rows which are User and Status.. E.g. User : Sean Status: OnlineNow the trouble is that i wish to get the data of the User row and insert it back into another database, dont worry the SQL is not my problem..What i need help with is getting the data that it is in that row! I can get the selected page index but not what i need! Also if you know how to do this uding the grid view, form view or any data repr...
How to get data from database row by row
I try to get data from a database row by row, I am using DataReader, the return result is not I expected, don't know how to solve it. Here is my sample code: --------------------------------------------Dim commandText As String = "select * from customer "Dim con As New OleDbConnection("Data Source=c:\company.mdb;Persist Security Info=False; Provider=Microsoft.Jet.OLEDB.4.0;")Dim Cmd As New OleDbCommand(commandText, con)Dim reader As OleDbDataReader = Cmd.ExecuteReader() Using con &nbs...
Get Access to actual Data Object from FieldTemplate, when using DynamicObjectDataSource
Hi There, I am using the DynamicObjectDataSource with Dynamic Data to scaffold my data-bindable business objects using controls such as Detailsview etc. In one of my custom field templates I want to populate a drop down list of string values. These values are returned by calling a string[] method on my bound class. public override string[] GetChoices(string fieldName) { return new string[0]; // TODO: This contains a switch statement which returns a string array based on the field...
How to get data from an Object data source?
Hi
I am new to data source controls and I have a basic query...I am using following code to show some results in a GridView with custom pagination.<asp:ObjectDataSource ID="objectDataSourceSearch" runat="server" EnablePaging="True" SelectMethod="Select" TypeName="GoogleSearchDatasource" SelectCountMethod="SelectCount" OnSelecting="objectDataSourceSearch_Selecting" > &...
Data of two rows in one row
Emp-----ID Name1 x1 P2 y2 Q3 WEmp_DataId Name-1 Name-21 x P2 y Q3 wabove
is my tables (Emp ),And the I want the Resulting Data in the (Emp_Data)
format.is this possible Pls Help........Thanks in advance-----
SELECT t.ID,MAX(CASE WHEN t.Seq=1 THEN t.Name ELSE NULL END) AS Name_1,MAX(CASE WHEN t.Seq=2 THEN t.Name ELSE NULL END) AS Name_2FROM (SELECT ROW_NUMBER() OVER(PARTITION BY ID Order BY Name) AS Seq,* FROM Emp)tGROUP BY t.ID Please click "Mark as Answer" if my reply solved your problem.CheersRammohan
Thanx it helped me a lot...
How to move a row in a data table object to the top of the table? The data table is in a data set. The data is bound to a drop down list box.
I am maintaining some 2003 C#/asp.net code for a web application. In the application a table in a data set is usedto populate a drop down list box.(The drop down list box will display a list of names)
Before the data set table is bound to the list box control, blank characters are inserted at the topof the data set table. The purpose of this, is to display a blank line in the drop down list box, when the list box isinitially displayed. This code works fine. (See lines 1-14 below).
Now I have been asked to modify the source code so that instead of a blank line being inserted at to top of th...
How to edit just one row of a coloumn using object data source??????
MY .aspx code:
<asp:Label ID="lblcontactDetails" Width=50% CssClass="labelh3" runat="server" Text="Contact Details"></asp:Label><asp:GridView ID="GVContactDetails" runat="server" ShowFooter="True" AllowPaging="True" PageSize="7"
AutoGenerateColumns="False" EmptyDataText="No Entries Found"
DataSourceID="ObjContactDetails">
<Columns><asp:BoundField DataField="ContactID" HeaderText="ContactID"
SortExpression="ContactID...