-
- How to change a string
by Fike
- 4 Replies
- Last post
by Fike
- Hi,
I have a string like (Mike,David,John...). How can I change this string into a proper syntax of
('Mike','David','John'...) so that I can use it in an "IN" statement some where else.
Select * from TableName where Customer_Name In ('Mike','david','john',...)
Any function Any Idea
Thanks
-
- Recompile eveytime with sp_executesql
by PatrikC
- 3 Replies
- Last post
by Ron31416
- When you use exec() it will almost always generate a new execution plan
(never reuse an execution plan), while sp_executesql will cache and
reuse an execution plan based on the parameters sent to the SP. Is it possible to make the sp_executesql never cache the execution plan Or maybe recompile it every time I
want the good things with parameterized queries (to avoid sql-injection
etc), but I
-
- Create a batch file to run the sql statements
by Murthi
- 2 Replies
- Last post
by Michael Hotek
- Hi I have written stored procedures to create a database with db name as input parameter I need to create a batch file to run the stored procedure with input value given in the command prompt along with the batch file will be my dbname, which will be used by the stored procedure to create the databse.
and also few sql statements to insert data into those tables after creating
Plz coul
-
- How do I load SQL Samples?
by cyoung3000
- 3 Replies
- Last post
by Arnie Rowland
- Hello,
I am a total beginner to SQL and I'm unable to load the samples. I downloaded the .msi file and installed it but I don't know where to go from here.
Am I importing one of the samples in SQL or do I open them in Visual Basic
The samples folder has several sub-folders with no executable so I don't know where to begin.
Can someone point me in the right direction
thanks in a
-
- FileStream whitepaper needed
by Lakusha
- 7 Replies
- Last post
by MVP User
- There are still a bunch of questions and recommendations needed about the new Filestream datatype. I guess it is transactionnally consistent (not like Oracle's BFile), but what are the impacts on the transactional log What are the recommended ways to use it etc.
If we envision db with a few terabytes (and more), are we out of our minds or is it really in reach (without NASA technology and
-
- How to pull few records from a table (Column) and concatanate and return as a single value.
by vije
- 2 Replies
- Last post
by vije
- Hi Gurus,
I have a table having sales records and there are more than one record per one customer. The sales table has a reference number like below.
CustomerID
Sales_Ref
2
H_1123
2
H_2344
2
H_4322
I need to do a query and generate the following query.
CustomerI
-
- Sending SQL Mail
by Mohan1
- 14 Replies
- Last post
by Pycior
- Hi,
I am using SQL Server 2005. I have configured my email on Database Mail. when I am trying to send email using xp_sendmail I am getting problem error as:
Msg 17925, Level 16, State 1, Line 0
xp_startmail: failed with mail error 0x80040111
I am using following sql statement
master . dbo . xp_startmail 'myaccount' , 'mypwd'
master . dbo . xp_sendmail 'tomail1@mail.co.in' ,
-
- Native compiler return value: [BC30494] Line is too long
by Daniel Hardjosuwito
- 4 Replies
- Last post
by Daniel Hardjosuwito
- I'm developing a very big and complex P&L report in RS2005 for a big bank which suppose to have 20 tables with around 12 groupings per table. This is similar like having or combining 20 reports in one big report with massive data from Analysis Services 2005 data source.
The report was successfully compiled only up to the fourth table. When I added the fifth table by copying and pasting from
-
- TFS Transaction Log Backups failing after SQL/SP2 applied
by simdoc
- 11 Replies
- Last post
by CMEng
- The SQL server transition log backups for the ReportServer and ReportServerTempDB databases have stopped working ever since I applied SQL Server SP2 to my TFS. I know this because I know the date the SQL SP was applied and I see that my transaction logs started to fail immediately after application of the SP. This is noted because the backup logs for SQL server start to contain the failure immedia
-
- Generating Script in sql2005
by Barbi
- 6 Replies
- Last post
by Vivekeviv
- Previosly, in SqlServer2000, when i was putting database changes (stored procedures) to the production server, I used to generate script for all stored procedures on the source server and run it it on the production server. It had in itself all the "If Exist--drop" rows, so it was posible to copy the new ones and change the existing stored procedures .
Now I'm using SqlServer2005 Expr
-
- Can't Create cube
by Galin Iliev
- 4 Replies
- Last post
by Eyso Zanstra
- Is there is a way to create cube against database which tables get new records every few seconds
I get these errors
Thanks in advance
Warning -2128674815 : Errors in the OLAP storage engine: The attribute key cannot be found: Table: dbo_Log, Column: InsertDate, Value: 2/23/2007 9:22:32 AM.
Thanks in advance
-
- Content Manager can't access rs properties page
by Tom Janssen
- 3 Replies
- Last post
by tom janssen
- Hi,
in one of our team projects users whom are members of the reporting services ¡°content manager¡± role are not able to get onto the ¡°sql server¡¯s reporting services¡± properties page of their team project. Instead of that page they receive the following error message:
The permissions granted to user '<UserName>' are insufficient for performing this operation. (rsAccessDenied)
With f
-
- Using multiple report viewers on MOSS with common parameters
by CodeCommando
- 5 Replies
- Last post
by chris.prime
- Hi!
I'm using Reporting Services Integration Mode and I have a page that has a number of report viewer webparts on it to display reports. Is there a way that I can add another webpart to pass parameters to all the reports at once instead of individually I am trying to build a dashboard and this is one of the requirements. I see on the Report Viewer web part, that there is an option in Connectio
-
- Need a script to take duplicate data and lines and place it into a new view.
by Mike Misera
- 2 Replies
- Last post
by John V. McCarthy
- I have a Site 2509CRUZ2 and SB1931 that have Multiple Contract ID's assigned to them in the table. Which are in 12 font below. I need to create a script to take these duplicates and place them in their own view but not delete them from the table.
Table is now.
CONTRACTID CUSTID SITEID
---------- --------------- ----------
NVLC009581 MOLT00100 1506BLDG
-
- HH:MM:SS Format
by Tony A
- 4 Replies
- Last post
by Tony A
- In MS reporting, how would I convert seconds into HH:MM S format
-
- Silent Installation of SQL Server
by Amit585237
- 3 Replies
- Last post
by Amit
- Hi There,
My ASP.Net application needs AJAX and SQL Server to be installed on the server.
How can I make AJAX and SQL Server installation as a part of my application installation
Is it possible to automate the install of SQL Server So user dont need to write in anything, all the answers will be prewritten.
I heard, using Microsoft Setup manager we can generate Setup.
-
- Error loading http://localhost/ReportServer
by Tom&#38;&#35;2
- 5 Replies
- Last post
by Tomas Martinez
- Hi!
I've installed the Report Server but when I try to go to http://localhost/ReportServer I get the following error:
Reporting Services Error
An internal error occurred on the report server. See the error log for more details. (rsInternalError)
And the log in the c:\Program Files\Microsoft SQL Server\MSSQL.3\Reporting Services\LogFiles\SQLDUMPER_ERRORLOG.log file is this:
12/01/0
-
- SQL Server 2005 Express Edition with Advanced Services Service Pack 2 Update Fails
by BobInIndy
- 5 Replies
- Last post
by braveheartkenya
- Using VS05 Pro SP1 with the SQL version below...
From the Windows update site and also via automatic download of updates, the following update fails every time...The SQL it is trying to update works fine.
The following updates were not installed:
Microsoft SQL Server 2005 Express Edition with Advanced Services Service Pack 2 (KB 921896)
Any idea what the problems are
Thanks, Bob
-
- SSIS Expression result limit of 4000 bytes
by ckcampbell
- 14 Replies
- Last post
by ckcampbell
- I have a package with an input column that is varchar(8000).
I want to strip the first byte off of this column and put it in one result column and the remainder of the field I want to go to a second column. If the input column is an empty string, I want to return NULL.
Pulling the first byte off works fine, no issues, however putting the remainder of the input column into an output column is
-
- Delete Records Fast
by shah_hs
- 5 Replies
- Last post
by Ennor
- I run a query;
delete * from abc where date >= @start and date < @end
This query deletes millions of records but takes a very long time. Is there a way to delete records in faster way other that above query. Further, for your information the table 'abc' is used as article in merge replication. So deletion also implements on other replicated table.
Thanks,
-
- Problem with BCP in trigger, how to do it?
by Dallastower
- 7 Replies
- Last post
by Dallastower
- Hello all,
I¡¯m pretty new to T-SQL, so please bear with me.
I¡¯m trying to output the temp "inserted" table avalible in the trigger to a text file.
When this trigger executes, the server seems to enter a never ending query.
If i comment the last three lines (declare... select... exec...) the trigger works fine,
so it seems to be a problem with the BCP part of the
-
- Pls help in making this proc work
by swan_sgp
- 5 Replies
- Last post
by Manivannan.D.Sekaran
- Hi,
I just found a procedure to make pivot tables,But iam getting an error,can someone help in Overcoming the error.
The syntax is as below
CREATE PROCEDURE crosstab
@select varchar ( 8000 ),
@sumfunc varchar ( 100 ),
@pivot varchar ( 100 ),
@table varchar ( 100 )
AS
DECLARE @sql varchar ( 8000 ), @delim varchar ( 1 )
SET NOCOUNT ON
-
- Error connecting to Oracle DB when executed within SQL Job
by chrisxxx
- 1 Replies
- Last post
by MatthewRoche
- Hi,
I have installed MS SQL Server 2005 and Service Pack 2 on a new Windows 32-bit environment. I also installed the 32-bit 10g client (the Administrator option). The tnsnames.ora file is configured properly and I can tnsping to the Oracle database without any issues. I have created a package in Visual Studio and it runs successfully when I execute the job manually. I saved the package to t
-
- Questions about applying COM+ 1.5 Hotfix Rollup Packages to SQL installations.
by salafa
- 0 Replies
- Last post
by salafa
- KB 927673
references an available Hotfix Rollup for COM+. There are at least 11
fixes for behaviors we have seen under high load using
System.Transactions with SQL 2005. However, we want to have as much information on
deploying the Rollup as possible before we open a case to get it. Can this Rollup be applied to a server or cluster that already has SQL 2005 installed Would you recommend ap
-
- ntext vs. nvarchar, mysterious data in the database
by sbradbery
- 2 Replies
- Last post
by sbradbery
- I hope this is the right forum for this question, my apologies in advance if it isn't....
We have a web based CGI product (written in C++ VS 6) that uses ODBC and takes text from a submitted web page and stores it in a SQL Server table in a field of type " ntext". The user in question is copying and pasting this text from an MS Word 2003 document. After the initial save our app e