Can somebody explain the difference between below query examples. select column1,column2 from table1 join table2 on table1.columna = table2.columna and columna=’1234′ vs select column1,…
Tag: sql
`?` placeholder for SQL `IN` condition with persistent’s `rawSql`
I would be happy to use ? placeholder to populate ids for SQL IN clause. Unfortunately the following does not work Such code results in database error similar to: Wrapping ? placeholder with brackets (e.g. IN (?)) gives another type of error: Is there a way to accomplish this? P.S. Looks like it’s a hor…
Sql agent job last run status
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 …
Can Anyone an Hint with the following SQL
imagine i have a table like this Bikename Username NumOfUsages LastTimeOfUsage Bike1 Haldi 5 2018-12-13 12:00:00 Bike1 Torte 1 2018-08-15 12:00:00 Bike2 Haldi …
How to do SQL Join with many tables (FK tables have looped results sharing ID)
I am newish to SQL and Join statements and I am way out of my league at the moment I currently have 6 Database Tables that are all linked to the main 7th table based on the main tables ID, however all …
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ساير سپرده ها حساب-…
If there is data linked to an order number, how do i pull some but not the other (not exists?)?
I’m using Toad for Oracle. I currently have Order Numbers with items in both our yard and our warehouse. I’m looking to see items that ONLY have items in the yard. Essentially I need a count of the …
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 add a character to specific index in string
I have a db with email-addresses which are 15 characters in total. Some are 14 characters long and they have the same in common, they miss a 0 in their name at the 3th index. I had a what similar …
List of all table and column level privileges for a MySQL database
What is the easiest way to list all table-level and column-level privileges for a MySQL database? I need to know what level of customized access has been granted for a specific database and which users have fine-tuned access to certain tables and/or columns. Answer To list table level privileges, you can quer…