Hi all,
Trying to get a basic understanding of T-SQL here in SQL Server 2008. Suppose I have a table named "Issues" with columns such as:
Priority User
1 Foo
1 Foo
2 Foo
5 Foo
4 Bar
5 Bar
1 Bar
1 Fuz
and I wish to display a count of the Priority for each User, along with a break...
What is the usage of policy management in management part of sql server 2008??
...
I am creating sql server 2008 Agent scheduler job form sql script.
Want to Log the details if failed in some case within Job > View Histroy.
Is there any way, so we can log custom text with Job > View Histroy?
...
There are two columns in database as name FIRST_NAME and LAST_NAME.i want to join both the name and display in single column. The query which is used by me is given below but it gives error as Incorrect syntax near 'NAME'.
Modify the query:
SELECT [CREATED_ON], MUD.PK_ID AS USER_ID,
(MUD.FIRST_NAME + ' ' + MUD.LAST_NAME NAME)
AS NAME...
Hi guys,
I recently changed SQL Server 2008 from windows authentication mode, to mixed. I created a new user 'taraw' and set a password. I'm connecting to localhost - which works perfect when using windows authentication, however if I want to use SQL Server authentication with my user - taraw, I get the following error:
Shared Memor...
I usually make applications with the front end in Access 2003 - 2007 and the back-end on SQL Server 2008. When I create an ODBC to link the tables in access I have two choices in the ODBC Data Source Administration page on my Windows XP PC:
Server 2008: SQL Server Native Client 10.0 v.2007.100.2531.00
SQL Server v. 2000.85.1132.00
W...
Hi guys,
I'm running the nerddinner MVC application on visual studio, and the database is on sql server 2008. I was previously having problems with permissions, etc but I seemed to have these sorted.
I created a user - taraw in SQL Server Management Studio, and got this all working. I can log into it fine.
When I test the application...
I have a table that simplified looks like this:
create table Test
(
ValidFrom date not null,
ValidTo date not null,
check (ValidTo > ValidFrom)
)
I would like to write a trigger that prevents inserting values that overlap an existing date range. I've written a trigger that looks like this:
create trigger Trigger_Test
on Test
for i...
Hello everyone, I would like to do a insert into using a select, but I know that some rows might fail (that is expected). Is there a way to change the implicit transactions of SQL Server 2008 off so that the ones that have not failed are not rolled back?
-- get the count of the customers to send the sms to
SELECT @count = COUNT(*)
FROM ...
I have some code that inserts data into some tables (one table has a FILESTREAM column) and then calls SubmitChanges after it is done.
db.Log = new System.IO.StreamWriter(@"c:\windows\temp\linq.log") { AutoFlush = true };
db.SubmitChanges(ConflictMode.FailOnFirstConflict);
I have referenced the following links but they appear to not b...
Hi all,
I'm having a complete brain fart moment so i figured i'd ask away here.
I have 3 tables that look like this
Equipment Table
EquipmentID | LocationID
-------------------------
1 | 2
2 | 2
3 | 1
4 | 2
5 | 3
6 | 3
Location Table
LocationID | LocationName
------------...
Hi, I have this two tables:
data
id |email
_
1 |[email protected]
2 |[email protected]
3 |zzzgimail.com
errors
_
error |correct
@gmial.com|@gmail.com
gimail.com|@gmail.com
How can I select from data all the records with an email error? Thanks.
...
I have two databases with THE SAME schema. I need to copy the contents of all the tables from one database into the other database. What is the best way to do this>? There are about 200 tables. I have ssms.
...
I have a SQL query that will return over 10,000 rows. Since the client only will view 12 rows at a time, how do I alter my SQL so that I can select just the needed rows?
My expectation is that I'll requery the database each time the user clicks on the grid. My solution is based on the demo below, however I'm trying to make this work w...
I have a SQL 2008 Ent server with the databases "DBOne", "DBTwo", "DBThree" on the server DEVSQLSRV.
Here is my Powershell script:
$DBNameList = (Invoke-SQLCmd -query "select Name from sysdatabases" -Server DEVSQLSRV)
This produces my desired list of database names as:
Name
-----
DBOne
DBTwo
DBThree
I has been my assumption that a...
Does SQL Server 2008 offer any pre-defined table types for use with table-valued parameters?
For instance, if I just want to pass in a list of integers as a table, and derive necessary context from the other parameters I'm passing in, is there a type in place for that, or would I have to create it?
...
Hi SO,
I am a programmer who has done a very bad thing and somehow didn't select the WHERE clause before hitting F5 on an update query in SQL Server 2008.
I know this isn't a programming question but it is a question from a desprate programmer ...
Is there anyway to get the one column's data back from the transaction log or a log kept ...
I have a CHAR(250) column being used as a foreign key to a varchar(24) column.
In MySQL I recall that I could create an index specifying column(24) in order to create an index on the leftmost 24 characters. This doesn't appear to be possible on MS SQL Server.
My question is this:
Is it possible to use an indexed view on SQL Server 20...
Where is the SQL Analyzer?
I did a full install, I don't see it anywhere in the menus. If for some reason is just doesn't exist any more, what are some viable alternatives?
...
I am trying to implement an image gallery in ASP.NET./c#
I am displaying 6 thumbnails on my page. To display this I have decided to use ListView with an ItemTemplate containing an ImageButton control in it for each thumbnail that I would be displaying. I have a few questions:
Am I choosing the right controls? (there are options like D...