I’m trying to migrate a MySQL-based app over to Microsoft SQL Server 2005 (not by choice, but that’s life). In the original app, we used almost entirely ANSI-SQL compliant statements, with one …
SQL Server 2005: Determine datatype of variable
Is it possible to determine the type of a local variable at runtime in TSQL? For example, say I wanted to do something along these lines: Or Does anyone know of any way to accomplish this? EDIT: This is not for a specific task, this is more of a general knowledge question. I do appreciate answers that indicate that the
Is a view faster than a simple query?
Is a faster than the query itself to create the view (in order to have the same resultSet): ? It’s not totally clear to me if the view uses some sort of caching making it faster compared to a simple query. Answer Yes, views can have a clustered index assigned and, when they do, they’ll store temporary results that can
How do I list the first value from a three-way joined table query?
Ugh ok I’m terrible at explaining things, so I’ll just give you the quotes and links first: Problem 4b (near bottom): 4b. List the film title and the leading actor for all of ‘Julie Andrews’ films….
How do you import a large MS SQL .sql file?
I use RedGate SQL data compare and generated a .sql file, so I could run it on my local machine. But the problem is that the file is over 300mb, which means I can’t do copy and paste because the …
How to resolve ambiguous column names when retrieving results?
I have two tables in my database: NEWS table with columns: id – the news id user – the user id of the author) USERS table with columns: id – the user id I want to execute this SQL: SELECT * …
Are there Free SQL Server Mgmt Studio Autocomplete Add-ins? [closed]
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers. We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations. Closed 14 days ago. Improve this question I know Red Gate has such a product, but I’d rather
is there a PRODUCT function like there is a SUM function in Oracle SQL?
I have a coworker looking for this, and I don’t recall ever running into anything like that. Is there a reasonable technique that would let you simulate it? would yield 30 Answer edit: if col always > 0
SPARQL Query, select everything except things that match?
I am getting comfortable writing regular queries in SPARQL, but I’m still having trouble with fancier stuff. My latest problem is trying to select everything except stuff that matches the where clause. For instance, say I want to find all the husbands who like a car color that their wife doesn’t like (I’m working on a proprietary model, so excuse
Cleanest way to build an SQL string in Java
I want to build an SQL string to do database manipulation (updates, deletes, inserts, selects, that sort of thing) – instead of the awful string concat method using millions of “+”‘s and quotes which …