I have saved dates from datetimepicker to sql in my windows form app with the format (dd-MM-yyyy). To edit date, I want to first fetch saved date and show in the datetimepicker control. Like if 28-03-…
number formatting 9’999.00
I’d like to format a number in a SQL select like this How can I do this? It works for 9,999,999 with the following command Answer You are almost there. Just replace group separator (.) with a single quote (‘) and you are good to go. result:
Oracle SQL Unions error “query block has incorrect number of results columns”
I’m trying to write a query that pulls data from a lot of tables, and has about 20 unions. It’s pulling the same information repeatedly, but with more layers each time, to show a sort of tree. I want to compare the final two columns. I’m using a case to do this, and if I add a case to this
How to consider a long “integer” as a string in SQL query when useing R to connect HANA?
I am using R package RODBC to connect HANA. One of the columns is like a long integer, but actually used as a string such as 2772161413309, 4239530000000239. SQL takes such data as integers. In R, …
using conditional where clauses in mysql select statement
There is a stored procedure sp_select_from_persons in MySql. And there are 3 parameters inside this procedure. age, class, group. These parameter values can be -1 or another value. And these …
SQL BACKUP and Restore Full backup
I have two full backups of different dates first full backup is of date lets suppose 21-05-2017 and I have restored that backup to client machine (RESTORE WITH NO RECOVERY) and now I got second full back on date : 26-05-2017 , now I want to restore that full backup on previous restored Full back on my client …
How to retrieve current month in SSRS expression
I want to get current month as default value of a parameter. I’ve come up with (which does not work): Answer If you want to get the month as an int that goes from 1 to 12, you can use this This answer was based on the official documentation that you can see in here – http://technet.microsoft.com/e…
SQL query Compare two WHERE clauses using same table
I am looking to compare two sets of data that are stored in the same table. I am sorry if this is a duplicate SO post, I have read some other posts but have not been able to implement it to solve my problem. I am running a query to show all Athletes and times for the most recent date
ROW_NUMBER Without ORDER BY
I’ve to add row number in my existing query so that I can track how much data has been added into Redis. If my query failed so I can start from that row no which is updated in other table. Query to …
Union of arrays as aggregate function
I have the following input: I want the following output: I am grouping by name. For each group, the count should be aggregated as the max and the options should be aggregated as the union. I am having troubles figuring out how do the the latter. Currently, I have this query: http://rextester.com/YTZ45626 I kn…