I am pretty new to SQL and hope someone here can help me with this: I have a table with one column dateX formatted as datetime and containing standard dates. How can I select all records from this table where this dateX equals a certain date, e.g. May 9, 2014 ? I tried the following but this returns nothing e…
oracle 12c – select string after last occurrence of a character
I have below string: So I want to select Sentence since it is the string after the last period. How can I do this? Answer You can probably do this with complicated regular expressions. I like the following method: Nothing like testing to see that this doesn’t work when the string is at the end. Somethin…
Checking for empty or null JToken in a JObject
I have the following… JArray clients = (JArray)clientsParsed[“objects”]; foreach (JObject item in clients.Children()) { // etc.. SQL params stuff… command.Parameters[“@MyParameter”]….
Execute query using C# [closed]
Closed. This question needs details or clarity. It is not currently accepting answers. Want to improve this question? Add details and clarify the problem by editing this post. Closed 8 years ago. Improve this question I am trying to execute some SQL code, connected directly to my database, but I don’t k…
SqlDependency onchange event infinite loop
I have a simple query, and the event fires at the correct time. However, once fired, the property, .HasChanges, of the SqlDependency object is always set as true. The first time OnChange is fired, the SqlNotificationEventArgs Info property is “Inserted”. The second time the event is fired it’…
convert datetime (mm/dd/YYYY) to decimal(YYYYmmDD)
I am trying to get the following result in Sql: example: 23/05/2014 to 20142305 but get this: result:41780 anyone know how you can get the following format?? (if possible ??) regards and thanks Answer In many databases (including SQL Server), you can just do: Some databases don’t support these functions…
C# Console Application insert row in MySQL database
I have a console application (in Visual Studio 2013 Ultimate) where I want to insert data in my database. How do I need to connect and insert data in this application? The query for my database is: …
How to mask a mobile phone number portion with ‘X’
Using Oracle SQL, how can I replace certain numbers with an ‘X’. For example, if I have a random mobile number: 0400 100 200 or 0400100200 I would like to mask out the number to: 0400 XXX XXX …
Select from row to last row
Is it possible for me with MySQL to select the from a specific row to the end of the table, without knowing how many rows there are left? My query at the moment is: But I want to be able to something like: Can this be done? Answer Just use a large value like 999999999 that is going to be
Can I use SQL commands (such as join) on objects in powershell, without any SQL server/database involved?
As a disclaimer, I’m no professional powershell scripter, but more of a ‘script-kiddie’ level scripter who was assigned something far outside the scope of his job, tech support. 😛 I’ve been working on a migration script to bring some really old data into a new software app. As a part o…