I am using SQL Server Management Studio to run a script on SQL Server 2008.
Following simple statement throws error "Incorrect syntax near ':'".
:setvar DatabaseName "USHR1.2"
Curious, what's going on here. Appreciate your help!
...
I have a Data Solution that has a Database Project and a Server Project.
I want to deploy to an SQL Script. I don't want to have to have SysAdmin privileges on the SQL Server (SQL 2008).
Is there a way to do this? I really don't want to set any settings or upload any server level stuff. I only have the server project because my DB p...
This seems like an easy thing, but I'm drawing a blank.
Select * from
....
inner join
(
select JobsID, Value from Jobs where Value **is the highest**
) as MaxJob on MaxJob.CustID = A.CustID
inner join
(
select other information based upon MaxJob.JobID
) as OtherStuff
Is there a nice way to have that first subquery gi...
Hi,
Is Cumulative update package 3 for SQL Server 2008 SP1 available for 64 bit SQL server?
I couldnt find the link.
Please advice.
Thanks-
Manjot
...
Columns such as CreatedDate and ModifiedDate are commonly used in the SQL tables. I think, storing the UTC value of the time would help remove dependency on the location of the server hosting the app. With the cloud computing gaining familiarity(even excluding it), the applications could be hosted in any timezone and in any part of the w...
The objective is below the list of tables.
Tables:
Table: Job
JobID
CustomerID
Value
Year
Table: Customer
CustomerID
CustName
Table: Invoice
SaleAmount
CustomerID
The Objective
Part 1: (easy) I need to select all invoice records and sort by Customer (To place nice w/ Crystal Reports)
Select * from Invoice as A inner join...
I have some content in our database with (for our language) 'strange' characters.
For example:
Å
When using the like statement in Sql Server with the letter A, this does not return a result because the Å is not an A.
Is there a way in SqlServer to treat the Å as an E (and the é as an 'e' etc)?
...
Hello.
Is there a way to retrieve the filename for filegroup filestream?
I try to create a new database in tsql, i need to create the filestream path for the database.
but i dont know the path of the folder to put the filestream in. So i try to get the filename path of another database on the same server to configure the new database....
Is it possible to connect to an Analysis Services Database (2008) from Excel 2007 on Windows 7?
I have installed the "Microsoft SQL Server 2008 Analysis Services 10.0 OLE DB Provider" but it's not possible to create a connection.
It works on windows XP and on Windows Vista so I guess the problem is Windows 7?
...
I am working on a SQL Server 2008 Db that has many tables in it (around 200). Many of these tables contain a field by the name "CreatedDate". I am trying to identify all the table schema with this particular field.
Is there a SQL query to do this?
Appreciate your response!
...
I'm wondering what y'alls would recommend as the best way to go about getting the action counts from a MERGE statement in Sql Server.
So, i.e. I run a MERGE which does some inserts, some updates and some deletes, ... I would like to be able to find out HOW MANY inserts, HOW MANY updates and How Many deletes.
What'd be the best way to...
I have created my db data model diagram using Visio. Is there a way to generate the DB schema from the Visio?
Appreciate your response!
...
In SQL Server 2008 Management Studio, how do I create a folder in my 'databases' folder similiar to 'system databases'.
It would be a great way to group like db's.
...
How do you find centroid values for each cluster using the excel data mining plug-in (or SQL Server 2008)? In particular, how can the centroids be measured accurately when their vectors include nominal and boolean values?
I've read the online books and I only got as far as node_distribution. I'm looking for centroid values or an algori...
When you create a table via scripts it appears to just list the columns in order of creation. It's a minor annoyance, but I like a certain method to the madness. When I later add a column with ALTER TABLE, how do I make it show up in a specific place when viewing the table in interactive tools such as enterprise manager?
ex:
Table Fo...
I'm new to SQL 2008. As I look at the Common Table Expressions (WITH keyword), how is the performance compared to using a temp table. Besides syntax / readability, are there any other benefits to using CTEs?
...
Hello,
Where do I find advanced SQL SERVER 2008 videos?
Thanks
...
Hi folks,
I've got a classic case of UPDATE or INSERTing some data into a table. I'm not sure if I should just do an UPDATE and if i get zero ROWCOUNT, then do an INSERT. Alternatively, I've heard rumours that the MERGE statement now replaces this, but I'm not sure how and if it's appropriate, in this situation.
Here's some sample sql ...
On a Publication (secondarily, a Subscription), is there a script or command I can run that verifies that the articles currently in place match what is expected and/or correct?
If changes were manually made to a replication database (i.e. a table's "MSMerge_ins_..." trigger is modified or deleted, causing replication of that table to fu...
How can I extract string ‘abc.com’ from a string http://[email protected] using sql?
...