I've recently started using VIM (7.2) in Windows and have been trying to use the OMNI completion feature when editing SQL.
When at the start of a new line it appears to work fine. For example, if I am in insert mode and type:
se <C-C>a
then the word 'select' appears. If I then try and use OMNI completion on any other word on the sam...
An IT Manager is not allowing the use of SQL Server with an ASP.NET website being developed. The current setup being replaced is a php site connecting to a Microsoft Access database. I have a few reasons of my own as to why SQL should be used, but would like as many strong arguments as possible (student vs. IT Man.). Does anyone have a...
Hi All,
I've inherited the code below but I'm puzzled as the code works just fine but I'm not convinced it's correct. I've not used LIKE before so I can't decide if I should bother changing this. How does this look to you?
The code is for a filter in a db it checks if X value contains Y value, find X* in X (e.g. Match would be F* in Fu...
I have two tables: 'movies' and 'users'.
There's an n:m relationship between those, describing what movies a user has seen. This is described with a table 'seen'
Now i want to find out for a given user, all the movies he has not seen.
My current solution is like this:
SELECT *
FROM movies
WHERE movies.id NOT IN (
SELECT seen.movie...
Is there command inside a Query Window that will open a stored procedure in another Query Window?
i.e.
MODIFY dbo.pCreateGarnishmentForEmployee
I am using SQL Server management Studio 2005 and Red Gate's SQL Prompt.
Currently I have to do the follwowing multiple steps:
Open Object Explorer
Navigate Programmability | Stored Procedure
...
How can you search all the Stored Procedures for a Pattern and then open the stored procedures to be edited?
Is there anything built inside of SQL Server 2005?
Or are there any 3rd party addins that will do this searching?
I am also using Red Gate's SQL Prompt but I have not noticed that option.
Currently I am using the following co...
My project requires users to create some basic math functions, I need to store these in a ms sql databse to use on datasets in my business logic.
The functions will be similar to:
when (value1 between 20 and 40) then value2 = value 2 * 37.8
What is the best schema to store something like this ?
And what is the most efficient way...
It's time to implement sorting on my blog-like web application. In addition to browsing by creation date, I want users to be able to sort by the number of replies, too.
Given that I have two tables blog_posts and replies, and that replies has a field called blog_post_id (a foreign key for the blog_post it's a reply to), how do I write ...
I am trying to find a way to query rows of data by using a "multivalue" pipe delimited column in another table as a WHERE clause. SQL SERVER 2005
This is my best description of the problem:
Imagine a pipe delimited column set to a variable like @LIST = 'Bob|Mary|Joe'
then I am trying to find a match like this
Select * from Users...
Lets say I have the following table in MS SQL 2000
Id | description | quantity |
-------------------------------
1 my desc 3
2 desc 2 2
I need to display multiple rows based on the quantity, so I need the following output:
Id | description | quantity |
-----------------------------
1 my desc 1
1 ...
Why didn't the designers of SQL require a keyword (e.g. "All") for any Update or Delete statements that don't have a Where clause? Was it just an oversight on their part? They would have saved so much grief (not to mention jobs!) if they had done that!
...
SQL> select * from employee;
ID FIRST_NAME LAST_NAME START_DAT END_DATE SALARY CITY DESCRIPTION
---- ---------- ---------- --------- --------- ---------- ---------- ---------------
03 Jason Martin 25-JUL-96 25-JUL-06 1234.56 Toronto Programmer
03 Alison Mathews 21-MAR-76 21-FEB-86 13323.56 Vanco...
Would some one suggest me the best method to start learning the fundas of programming.
I would be involved in SQL and SAS related technologies involving databases.
Please advice
...
I want to search a sentence (word combination of) in some table or view of DB. I dont want to use Fultext search property of DB. Is there any alternative efficient way?
...
I have a service broker activated stored procdedure that runs fine when executed in management studio. However, when it is activated on the queue, the sql server error log shows the following message:
"The activated proc [dbo].[FileUploadAsyncWorker] running on queue
AsyncProcessing.dbo.FileUploadRequestQueue output the following: 'You...
Is it possible to restore a backup of a SQL Server 2008 database onto an instance of SQL Server 2005?
I need to work on an sample application for which database backup is in sql server 2008.
But I'll not be able to install 2008. So is it possible to restore that back up in 2005?
...
I need to do a Full Text Search with NO word stemming...I tried to wrap the term I'm searching in double quotes, but no joy... I still get results like "bologna" when I search for '"bolognalo"'
Any help is appreciated..
...
Is ther a TSQL command to connect to another server?
Or when you are in a Query Window, what are the Keyboard shortcuts to connect to another server and have a Query Window show up?
I have seen Ctrl+N pop up the Connect to Server dialog in some screens but when I am in a Query Window already and hit Ctrl+N it just opens up another Quer...
I am working on a pretty typical asp.net web site and using sql server 2005 as database.
I have created a Model dll holding the applications typical business logic.
The application is dependent of some static data which is stored in the db in lack of a better persistent storage, but since the application is dependent of this data in ord...
Let's say I have a number in the german number format "1,00" which is equal to 1.0 in the en-US locale.
Is there a built-in way to convert this text in T-SQL to the corresponding number? It seems like CONVERT and CAST accept only numbers with '.' as the decimal separator and I see no way to tell them otherwise.
I was thinking about sim...