about 7 months ago - No comments
Problem:
display label with the text full if the current field equal to zero in repeater or gridview
Solution:
<asp:Label ID=”Label1″ runat=”server” Text=”Full” ForeColor=”Red” Visible=’<%# Convert.ToBoolean(Eval(“name of your field”).ToString().Equals(“0″)? “true”:”false”) %>’>
about 8 months ago - No comments
problem:finding the duplicate within sql
solution:provide table named subscriber, with elements: email
SELECT COUNT(DISTINCT email) AS NumberOfEmail, email FROM subscriber GROUP BY email HAVING (COUNT(email) > 1)
about 11 months ago - No comments
problem:
display age with sql command
solution:
sql command:
SELECT DATEDIFF(mm, dateOfBirth, GETDATE()) / 12 AS age
FROM someTable
it wil display age ^^V
about 12 months ago - No comments
problem:
displaying list of bday boy/girl in next (30/ according to your own choice ) days from the current date.
solution:
im using the sql to select the date of birth, for displaying, you can use whatever you want, like gridview, datalist etc.
hereby the sql command:
SELECT DateOfBirth
FROM someTablename
WHERE (DateOfBirth < GETDATE()) AND (DATEDIFF(d, GETDATE(), DATEADD(yy, DATEDIFF(yy, DateOfBirth, GETDATE()), More >
about 1 year ago - No comments
SELECT previous row or "LIMIT-command" in MSSQL
SELECT TOP (1) FROM table_name WHERE (ID< @ID)
ORDER BY ID DESC
SELECT next row or "LIMIT-command" in MSSQL
SELECT TOP (1) FROM table_name WHERE (ID> @ID)
ORDER BY ID
Thank also for the descussion