Hi,
There are a number of questions about this and a number of possible causes and thus far ive tried them all with no success.
situation:
i have an app that needs a db to work, onstartup it does a SmoApplication.EnumAvailableSqlServers(false) to get all the instances on the network, shows the user a dropdown, they pick one and i go con...
I have a table that I need to get some specific data from for a view. Here's the base table structure with some sample data:
| UserID | ReportsToUserID | Org ID |
-------------------------------------
| 1 | NULL | 1 |
-------------------------------------
| 2 | 1 | 1 |
-----------------------...
I have a power function call inside of a sql function. What is the correct way to handle overflow and underflow conditions since I cannot use a Try Catch inside of a function. I am also trying to avoid modifying the ARITHABORT, ANSI_WARNINGS, and ARITHIGNORE settings in the calling code.
GO
CREATE FUNCTION TestPow()
RETURNS DECIMAL(30,...
I'm creating an install package using InnoSetup and installing SQL Server 2005 Express. Here's the code below that appears in my RUN section:
Filename: "{app}\SQL Server 2005 Express\SQLEXPR.exe" ; Parameters: "-q /norebootchk /qn reboot=ReallySuppress addlocal=all INSTANCENAME=(LOCAL) SCCCHECKLEVEL=IncompatibleComponents:1;MDAC25Versio...
On our production SQL2000 instance, we have a database with hundreds of stored procedures, many of which use a technique of creating a #TEMP table "early" on in the code and then various inner stored procedures get EXECUTEd by this parent sProc. In SQL2000, the inner or "child" sProc have no problem INSERTing into #TEMP or SELECTing data...
Hi all
I have a Rails app that I'm porting from Rails 1.2 to 2.3. I'm also moving from the Ruby MRI to the latest version of JRuby as well.
In the existing (Rails 1.2) app I use the mysql_bigint plugin to provide support for 64-bit ints as primary keys.
I need to to the same thing for the new application running against a MS SQL 2005 ...
How can I write an efficient SQL query that returns columns form table A plus a bit column that specifies whether the PK of table A exists in table B? I am using MS SQLServer 2005. Thanks.
...
I am running a select against a datetime column in SQL Server 2005. I can select only the date from this datetime column?
...
The title of this question is a bit misleading, but I couldn't summarize this very well.
I have two stored procedures. The first stored procedure (s_proc1) calls a second stored procedure (s_proc2). I want to assign the value returned from s_proc2 to a variable in s_proc1. Currently, I'm calling s_proc2 (inside s_proc1) in this manner:...
Consider a table,
Id columnA
1 a
2 b
3 c
Select ColumnA from table gives the result as below,
columnA
a
b
c
Is it possible to get
ColumnA
a,b,c
...
I am looking for some SQL varchar comparison function like C# string.compare (we can ignore case for now, should return zero when the character expression are same and a non zero expression when they are different)
Basically I have some alphanumeric column in one table which needs to be verified in another table.
I cannot do select A...
Hi,
I am passing a XML document as a input to a stored procedure in Microsoft SQL Server 2005.
This is the sample XML being passed as input
<Strategy StrategyID="0" TOStrategyID="8" ShutdownQtySell="1" ShutdownQtyBuy="1">
<ParameterRange ParameterSetID="6" ParameterRangeID="1" ParameterRangeFrom="0" ParameterRangeTo="20" Paramete...
I am creating a string that is a list of comma-delimitted values by looping through the selections in a CheckBoxList. I am able to display this value, so I know that it is creating what I expect. I am attempting to pass this list to an IN statment in a SELECT query:
SelectCommand="SELECT ThisDate, DATEPART(dw, ThisDate) AS Expr1 FROM ...
Given a entry in a sysdtslog90 table in SQL Server 2005 from an SSIS package, how do you figure out what database agent job the entry was run under?
...
I have a table which looks like
Col1 col2 col3 col4 col5
1 5 1 4 6
1 4 0 3 7
0 1 5 6 3
1 8 2 1 5
4 3 2 1 4
The script is
declare @t table(col1 int, col2 int, col3 int,col4 int,col5 int)
insert into @t
select 1,5,1,4,6 union all
select 1,4,0,3,7 union a...
I have a table which looks like
Col1 col2 col3 col4 col5
1 5 1 4 6
1 4 0 3 7
0 1 5 6 3
1 8 2 1 5
4 3 2 1 4
The script is
declare @t table(col1 int, col2 int, col3 int,col4 int,col5 int)
insert into @t
select 1,5,1,4,6 union all
select 1,4,0,3,...
Here is my query:
IF OBJECT_ID('NPWAS1513.dbo.usp_MSPEX_QLK_Billing_Fact_Load') IS NOT NULL
DROP PROCEDURE dbo.usp_MSPEX_QLK_Billing_Fact_Load;
GO
CREATE PROCEDURE usp_MSPEX_QLK_Billing_Fact_Load
@create_timestamp datetime,
@update_timestamp datetime,
@create_user varchar(50),
@update_user varchar(50),
@dbProdServ varchar(...
select distinct * from Drivers where IsDeleted=0 gives me this,
I want select * based on distinct DriverMobNo column
...
Hi All,
I am using SQL Server 2005.
I have a stored procedure [say Sp_GetAllMaterialInfo], I want to put it in a scheduler that everyday this stored procedure execute on 2 P.M. daily.
Please let me know the steps I have to follow to achieve in SQL Server 2005
Thanks in advance.
...
Hi,
Fairly simple question, but I don't see it anywhere else on SO:
Do indexes (indices?) on a temporary table get automatically deleted with the temporary table?
I'd imagine they do but I don't really know how to check to make sure.
Thanks,
Phil
...