all groups > sql server programming > october 2004 > threads for saturday october 2
Filter by Day: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
EXISTS should be same as IN but isn't
Posted by DC Gringo at 10/2/2004 10:31:48 PM
These two queries should yield the same results but they don't...can someone
tell me why?
SELECT distinct clnGUID = '', Sum(DistanceFromCRP) as DistanceFromCRP
FROM vwSHAs v1
WHERE EXISTS
(select top 66 clnGUID
FROM vwSHAs v2
WHERE v1.clnGUID = v2.clnGUID
)
SELECT distinct cln... more >>
CHARINDEX in user-defined function
Posted by Agoston Bejo at 10/2/2004 9:39:44 PM
Hi,
I'm trying to use the CHARINDEX built-in function in my user-defined
function, but it doesn't seem to work.
Right now I got down to only write a test-function that doesn't do anything
else but call charindex:
CREATE FUNCTION X(@p_str1 VARCHAR, @p_str2 VARCHAR)
RETURNS INT AS
BEGIN
RET... more >>
SQL-DMO Restore
Posted by Simon at 10/2/2004 7:45:42 PM
Hi,
I am having a problem do a Database restore.
1. I create and connect an SQLDMO.SQLServer object in VB6
and then connect using the 'sa' login.
2. I create a SQLDMO.Restore object with the following
properties...
With oDBRestore
.Action = SQLDMORestore_Databas... more >>
sproc problem with ASP
Posted by gdp at 10/2/2004 4:21:42 PM
HI...I have an asp page with this in it
strIP=cstr(request.servervariables("REMOTE_HOST"))
Set objCommand = CreateObject("ADODB.Command")
With objCommand
.CommandText = "populate_MAIN_visitors"
.CommandType = 4
.ActiveConnection = con
.Parameters.Append .CreateParameter ("... more >>
Views and Identity
Posted by Michael Tissington at 10/2/2004 12:56:20 PM
How can I create a View that returns an additional column like an IDENTITY
or simply the row number without modifying the underlying tables.
Thanks.
--
Michael Tissington
http://www.oaklodge.com
http://www.tabtag.com
... more >>
Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection
Posted by Prashant at 10/2/2004 12:33:16 PM
Hi,
I have a windows setup program (framework 1.1), this setup
program calls one util.exe with parameters. util.exe opens the connection
(SQL Server 2000, windows authentication only) and does some db updations.
when i run thru setup exe fails throwing
"Login failed for user '(null)'. Reason: ... more >>
SP with XML dont' work in WINDOWS-98
Posted by F. Halmi at 10/2/2004 9:09:56 AM
I have many stored proc. with a VB.NET application. Under XP work
good.
I deployed that in WIN 98 + MSDE200A. Here that the stored proc. where
I use
the xml don't work.
Error message 1.: System.InvalidCastException
2.: Failed to Loa... more >>
drop constraints using stored procedured
Posted by tchangmian NO[at]SPAM yahoo.com.sg at 10/2/2004 8:01:26 AM
i would like to check for duplicate data in a field called
catalog_code, if i found got duplicate data,then the table (rd_awards)
will not be dropped, but if i found that dun have duplicate data in
the catalog_code field, the table will be dropped and the constraints
of the field will not be dro... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
Moving IDENTITY attribute from one table to another
Posted by andyza NO[at]SPAM webmail.co.za at 10/2/2004 6:44:06 AM
I have two tables in a SQL Server 2000 database:
Table1 (ID,Col1,Col2,Col3)
Table2 (ID,ColA,ColB,ColC)
- The ID column on Table1 has the Identity attribute set to yes (it is
the identifier column).
- The ID column is the primary key on each table.
- The relationship between Table1 and Tabl... more >>
splitting the string
Posted by babz at 10/2/2004 4:45:03 AM
Hi
I have a table with the following columns
column Name data type
ParentId int
ChildId int
LegacyString Varchar(50)
and data are like this
ParentId ChildId LegacyString
1 1 50, 80, 76
1 ... more >>
SQL bug?
Posted by Richard G at 10/2/2004 1:56:51 AM
create table tbl
(
a numeric( 11, 0 ) not null,
b int not null,
c binary( 10 ) null
)
Column a is a clustered primary key.
Columns b and c each have an index.
There are about a million rows.
Column c contains either a hash or null.
Has anyone had the problem where the follo... more >>
|