I have N jobs with M steps in each, that could change any time(Add/delete some steps). Jobs have different schedule to run. I want a query to get last run status, job id, job name of each job. Is it …
Tag: sql-server
how i can pull out custom template in sql query? [closed]
I have one column like this in SQL Server and I need get this codes ## Title## حساب-س1-2564492-305-151ساير سپرده ها حساب-س151.305.881307.1ساير سپرده ها حساب-س1-1547032-305-151ساير سپرده ها حساب-…
I need to migrate data from one old table to a new table by storing appropriate CityId instead CityName
I’m migrating data from one table to another table in SQL Server, In this process what I need to do is “I have 10 columns in old table one column is ‘CityName’ which is varchar and in the new table, I …
How to save unicode character in SQL database
I am trying to save ThinSpace (u2009) to the database using ADO.NET classes, but instead I am getting “?” symbol in db in place of ThinSpace. String that I save to db in UTF8 format. var …
SQL How to link lowest row from another select
I searching since a week for this problem. I try many code and I’m not able to get a correct answer, here’s the problem : I have a table of seller that have each time a customer contact this seller, …
SQL: Combining LIKE and IN in SQL , and Showing the Array of LIKE in a column
Below code works to combine Like and IN. But I need a column in the output with the values that I used for the Like: SELECT file_id FROM table1 as t WHERE archival_date = ‘20180108’ WHERE EXISTS(…
Serial number auto generation
Facing issue in auto generation of serial number. How can i use row_number() in proper manner or is there any alternative to achieve the expected results? Note: I want to write query without using CASE. Current Results: Expected Results: Answer You can try to use ROW_NUMBER window function in a subquery, then…
How To Convert Linq To Sql?
I want write code for table, I know in SQL Server, but I don’t know Linq or EF. SQL Server code: SELECT * FROM Driver WHERE id IN (SELECT Driver FROM Drive_Car WHERE …
How can I retrieve first second and third word of a String in SQL?
I need a query which would extract the first second and third word of a string. I have approximately 5 words in each row and I need only the first three words out of 5 in the same row (1 row). …
“Incorrect syntax near ‘RETURNS’. Expecting AS, FOR, or WITH.” (SQL User Defined Function) [closed]
Please review the SQL code below for a user-defined function I am trying to create. In SSMS, there seems to be an issue with this part of the code: RETURNS VARCHAR(50) I am getting the error …