sql-server-2008 Questions

8

Solved

Why is it that in SQL Server I can't do this: select sum(count(id)) as 'count' from table But I can do select sum(x.count) from ( select count(id) as 'count' from table ) x Are they not es...
Haemal asked 25/5, 2012 at 3:3

5

Solved

I have the sql query below that is running very slowly. I took a look at the execution plan and it is claiming that a sort on Files.OrderId is the highest cost operation (53%). Why would this be ha...
Krugersdorp asked 8/1, 2013 at 16:25

7

Solved

I am attempting to alter an existing stored procedure with the command ALTER 'name_of_stored"procedure' however the name is highlighted in red noting it is an invalid object. I am able to execute...
Langouste asked 23/2, 2012 at 19:19

3

Solved

I'm pretty new to Python (2.7) and am just not a lot of help with pyodbc. I have a script that calls a stored procedure: sql = "exec gen_all.dbo.rpt_trinity_total '" + startDate + "', '" + endDate...
Ossicle asked 11/2, 2013 at 23:50

3

Solved

What is the basic difference between SQL Server stored procedures (sp_) and extended stored procedures (xp_)? Why there are extended procedures anyway?
Danu asked 16/6, 2010 at 18:11

4

I have a SSIS job which run well in SQL Server 2008 but no longer working in SQL Server 2017. The error message I get is: Cannot create a task from XML for Task "Email", type "Microsoft.Script.T...
Tridentum asked 29/6, 2019 at 7:6

9

Solved

I have one specific string, such as "123abcd" for example but I don't know the name of the table or even the name of the column inside the table on my SQL Server Database. I want to find it with a ...
Majolica asked 8/12, 2011 at 18:43

5

I have a database field that contains address information stored as multi-line strings. 88 Park View Hemmingdale London Could anyone tell me the best way to get line 1, line 2 & line 3 as di...
Sheetfed asked 14/11, 2012 at 18:8

10

Solved

I need to know if a given Job is currently running on Ms SQL 2008 server. So as to not to invoke same job again that may lead to concurrency issues.
Ithunn asked 26/8, 2013 at 13:52

13

Solved

I have an integer column "Month" I would like to get 2 digit number for month. This is what I have tried: DATEPART(mm, @Date) It returns one digit for months January to September I am using SQL S...
Palaeography asked 20/2, 2013 at 9:6

14

Solved

I am using SQL server 2008 and its management studio. I executed a query that yields many rows. I tried to cancel it via the red cancel button, but it has not stopped for the past 10 minutes. It us...
Throckmorton asked 10/4, 2013 at 9:3

5

Solved

Is there a simple way to view the SQL Queries actually generated by SSRS other than running profile traces to capture them? Is there some way from within the BIDS editor to see this?
Federico asked 9/8, 2010 at 14:36

3

Solved

How can I export my 2012 database with data to a .sql file so I can import it to a 2008 server? I've never been able to export the data only the structure.
Shaeffer asked 21/8, 2013 at 10:53

5

Solved

I am trying to generate a data dictionary for a table in my database. Ideally I would like to export the column names, data type, restrictions and extended property descriptions. How can this b...
Doall asked 27/6, 2011 at 1:37

6

Solved

Can I select specific columns by the number of the columns in SQL? Something like SELECT columns(0), columns(3), columns(5), columns(8) FROM TABLE
Had asked 26/7, 2013 at 15:44

6

Solved

I am developing a framework, where in I am a calling stored procedure with dynamically created parameters. I am building parameter collection at the runtime. The problem occurs when I am passing ...

6

I want to generate a script to assign a user account to some securables, e.g. Table:Select. How to do this?
Hedgepeth asked 30/9, 2009 at 19:48

4

Solved

I have a SQL Server instance that I've added a linked server to another SQL instance. The table I'm accessing on the linked server contains spatial types. When I try to query the table I receive an...
Esquiline asked 11/3, 2011 at 21:53

4

Solved

I have a SQL Server column of type XML containing some records with more than 8000 characters. I would like to convert this column into a varchar. I am not concerned about truncation (the first 8...
Stentorian asked 17/7, 2012 at 6:46

3

I am passing an xml string to stored procedure in SQL Server for inserting 10000 records to my table. In this when I call this stored procedure. Want to check the SQL Server table with that xml str...
Vereen asked 28/2, 2013 at 6:33

6

Solved

I need to create trigger in SQL Server 2008 that gone insert all values from one row in which some value was changed into Log table! For example if i have table Employees that have column id, name...
Cilia asked 5/7, 2010 at 17:50

7

Solved

I have SQL Server 2008 installed, but I'm not sure what license was installed. Is there an easy way to find this out?
Horseback asked 4/11, 2010 at 17:32

4

I have a query that returns a large 'ntext' result. I want to copy this over to a plain text editor (Notepad), but only a part gets copied over. I tried increasing Query Options -> Results -> Text...
Dodder asked 21/4, 2010 at 9:34

7

Solved

I'm looking how to replace/encode text using RegEx based on RegEx settings/params below: RegEx.IgnoreCase = True RegEx.Global = True RegEx.Pattern = "[^a-z\d\s.]+" I have seen some examples o...
Sulfathiazole asked 19/1, 2012 at 15:9

26

Solved

Below is the query that I am using to backup (create a .bak) my database. However, whenever I run it, I always get this error message: Msg 3201, Level 16, State 1, Line 1 Cannot open backup d...
Knossos asked 18/10, 2010 at 14:40

© 2022 - 2025 — McMap. All rights reserved.