Skip to content
Advertisement

Persistent temp tables in SQL?

Is it possible to have a ‘persistent’ temp table in MS-SQL? What I mean is that I currently have a background task which generates a global temp table, which is used by a variety of other tasks (…

Getting new IDs after insert

I’m inserting a bunch of new rows into a table which is defined as follows: using the following insert: when I’ve finished, I’d like to know the IDs of all the newly inserted rows. SCOPE_IDENTITY() only returns the ID last row inserted. How can I get all the new IDs? One method that springs to mind would be to grab

How can I compare time in SQL Server?

I’m trying to compare time in a datetime field in a SQL query, but I don’t know if it’s right. I don’t want to compare the date part, just the time part. I’m doing this: Is it correct? I’m asking this because I need to know if 08:00:00 is less or greater than 07:30:00 and I don’t want to compare

SQL query that distinguishes between ß and ss

It seems that ß=ss in SQL. I need to be able to distinguish on a strict charcter equivalent basis. i.e. SELECT * from table WHERE name LIKE ‘%ß%’ yields Brian Bruß Steven Sossmix etc.. I’ve looked at …

Case expressions in Access

Can you use case expressions in Access? I’m trying to determine the max date form 2 columns but keep getting syntax errors in the following code: CASE WHEN dbo_tbl_property.LASTSERVICEDATE > …

How to use “AND” in a Django filter?

How do I create an “AND” filter to retrieve objects in Django? e.g I would like to retrieve a row which has a combination of two words in a single field. For example the following SQL query does exactly that when I run it on mysql database: How do you accomplish this in Django using filters? Answer (update: this answer

Advertisement