If I put a breakpoint on this line of code:
If iResult = Framework.ErrState.S_OK Then
Session.Add("UserInfo", tdsUserInfo)
FormsAuthentication.RedirectFromLoginPage(tdsUserInfo.UserInfo(0).UserName, False)
Else
lblMessage.Text = sErrorMsg
End If
and then run the project it goes to...
On report.aspx, there is a dataset (tdsReportRetrieval), which has a table (tableReportRetrieval) that has a column (DisplayName) that I need to bind to a DataList (Sounds like that elementary song).
My questions are:
1) DisplayName is a field that shows the report names and a user can click on...
If I'm passing a varchar field from my stored procedure, but that field needs to be summed in the groupfooter field what type do I need to convert it in the vb backend?
Right now I'm getting 0 in the groupfooter field because it cannot add the values from the detail section as they are type...
I realized a bit late that the code below doesn't work. If there is an assistant manager, but no manager I still get a blank and that is incorrect.
COALESCE(dbo.udfGetManager(CM.ControlID) + ', ' + dbo.udfGetAssistantManager(CM.ControlID), '')
So this is the replacement code:
CASE WHEN...
This is the code:
DECLARE @ControlIDList nvarchar(4000)
SELECT @ControlIDList = '''Z'', ''Y'''
PRINT @ControlIDList
SELECt *
FROM TestTable
WHERE ControlID (' + @ControlIDList + ')
What I want to do is Select all the fields where ControlID in Z and Y. But no results come back.
Platform is a parameter being passed into the stored procedure.
For now it could have 3 different values. If it equals the 3 different values the selected result would depend on that where clause. But if it doesn't meet the 3 different values (for example NULL) then I want all of the data...
Are there different levels of permissioning with a dbo userid? For example, if I created an userid as a dbo would I be able to give it different permissioning levels?
Also, if anyone could please provide a link that has info on this.
Thanks.
if someone can guide me information on how I can find info on this question.
Does db_datareader have permissions on executing stored procs and udfs that are aliased in the stored proc?
Thanks.
In the case statement below I expect the result to be blank when CM.Cost is NULL or = to .0000. But when CM.Cost = .0000, I get the value as 0%.
LA.Numerator isn't equal to 0, so that isnt the problem.
COALESCE(dbo.udfFormatPct(
(SELECT CASE WHEN CM.Cost IS NULL OR CM.Cost =...
Lets say I have a query:
SELECT N.NoteID,
CM.DealName
(SELECT C.FirstName + ' ' + C.LastName
FROM tblContact C
INNER JOIN tblSecUser SU
ON C.ContactID = SU.ContactID_F
WHERE SU.userid = tblControlMaster.UserID_F) AS Originator
FROM tblControlMaster CM
INNER JOIN tblNote ON...
CASE WHEN CM.ApprovedDate IS NULL THEN ''
ELSE CM.ApprovedDate END
What I would like to do is if ApprovedDate IS NULL then blank the cell, otherwise populate the cell.
however, the results from the query is that if the approvedDate is NULL then...
If I have these dates in my startdate column:
2006-08-02 16:51:59.500
2006-08-02 19:58:06.507
2006-08-02 15:26:26.313
2006-08-02 15:31:24.423
2006-08-22 12:35:46.920
and I want to get the maximum date: 2006-08-02 19:58:06.507. How would I get that?
SELECT MAX(StartDate)
FROM tblTest
gets me...
DECLARE @TEMP TABLE
(
idnum int IDENTITY(1, 1),
col1 int,
col2 int
)
INSERT INTO @TEMP(col1, col2) VALUES(2,3)
INSERT INTO @TEMP(col1, col2) VALUES(5,6)
SELECT * FROM @TEMP
Can do I a swap of the values in col 1 and col2 in 1 update query? Or do I need to create a temp table...
I'm going through a tutorial that uses VS 2003 and one of the options in that version of VS is to build and browse by right clicking on an ASP page in the solution explorer.
However, the version of VS 2003 that I have doesn't have that option. Is there any way that I can include that option...
This is from a SQL Server book:
Use Northwind
GO
IF OBJECT_ID('dbo.ListCustomersByCity') IS NOT NULL
DROP PROC dbo.ListCustomersByCity
GO
CREATE PROCEDURE dbo.ListCustomersByCity @Country nvarchar(30)='%'
AS
SELECT City, COUNT(*) AS NumberOfCustomers
FROM Customers
WHERE Country LIKE...
NS.Numerator is of type money,
I'm using that field in a select statement, but the error: Error converting data type varchar to numeric. comes up. So I tried this CONVERT(money, CONVERT(varchar, NS.Numerator)), but still get the error.
Please help. Thanks.
insert @CIDS(Controlid, ControlidOrderKey)
select Controlid, ControlIDOrderKey from #CIDS order by controlidorderkey
SELECT ControlID FROM @CIDS
Shows
ControlID: 00-0385, 00-0375
DROP TABLE #CIDS
DECLARE ControlID_cursor CURSOR FOR
SELECT Controlid FROM @CIDS
OPEN ControlID_cursor
FETCH...
I have to run a report every thursday. Is the best way to do this is
SELECT FIELDS
FROM table
WHERE DATEDIFF(d, N.NoteDate, getDate()) = 7
Also, I have to run anoter report report bi-monthly. Could I just do:
WHERE DATEDIFF(d, N.NoteDate, getDate()) = 15
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.