You are correct but when I run this statement I get no values.
So I went on to try some more ways to make it work and this statement works:
, CASEWHEN [START_DATE] IS NULL OR [START_DATE] = '' THEN
CAST(Replace(convert(date, END_DATE, 101), '-', '') as numeric(8,0)) ELSE
CAST(Replace(convert(date, [START_DATE], 101), '-', '') as numeric(8,0)) END AS [START_DATE]
But I can't integrate it in my DateDiff statement, can you help me please?
I have a little bit of SQL code and I am having trouble bringing it over to MSSQL. I don't even know where to being I know that the SELECT, FROM , GROUP BY and HAVING will be in the MSSSQL query.
However I know for a fact the 4th line will change into @param1 and @param2. If anyone would like to add some input into this would be nice.
Select COUNT(') AS Result, Username AS UsernameInput, [Password]
GROUP BY Username, [Password]
Having (COUNT(') = 1) AND (Username = ?) AND ([Password] = ?)
I am having sqlserver 2008R2 database, and in the table, there is a column "Text" with some string value.
Some of the strings are good (have the characters entered from keyboard" where some have values like "degree" symbol.
Row 1 has string "Today temperature is 45Degrees C"whereas Row 2 has string "Today temperature is 40°C
Row 2 has a symbol which is not entered through the keyboard. I want to filter such kind of symbols while querying.
Is there a way to query that way by filtering? If so, please provide me such query.
There are multiple ways to do it. i would suggest you should review your data to identify how many other invalid characters you have after this just use the simple REPLACE() function to remove those. Furthermore, if you are planing to create a function for this then you can look into this Link.
I have list of modules of a program in a asp.net repeater. I can change the order of the modules using drag and drop, but the matter is I want this order changes, apply in the database too!
There is a show order field in a table of the modules. I want to write a code in C# that after changing the order of modules in the repeater, I can submit the new order of the modules in the database by clicking a button called "Save the changes".
The problem is I can't access the repeater items in the event click of the button.
Please tell me how can I apply the changes in the database too.(C# code please)
Thanks a lot.
Last Visit: 31-Dec-99 18:00 Last Update: 13-Aug-22 0:19