|
How to get Date portion of DateTime field?
I'm trying to import an SQLServer table into Visual FoxPro (I'll also post
this in the VFP forum). I need to test the Date portion of a SQL Server
DateTime field against a user-entered Date.
I tried the following:
m_getagsc = SQLPREPARE(gnConnHandle, "SELECT * FROM AgentStateChange "+;
"WHERE AgentSta ...
Wed, 12 Jan 2005 06:13:02 -0800
|
Query performance MS-Access vs. SQL-server 2000
I am evaluating SQL server and therefore I made a benchmark comparing the
search speed between Access (which we are using up to now) and SQL-Server.
I created 2 identical tables on the same Server, once as Access database
file, once in SQL-Server with one Counter as Primary Key and Index and one
string*25 ...
Wed, 12 Jan 2005 05:05:03 -0800
|
T-SQL Debugger
I'm in a problem with T-SQL Debugger..
I'm DBA on a development environment... Most users use Query Analyzer to
Debug procs, and some machines work, and anothers not...
The problem is the following...
The permissions are ok (EXECUTE on sp_sdidebug, dbo of the current
Database)...
The Debugger Run, without ...
Wed, 12 Jan 2005 05:03:02 -0800
|
sp and DNS
Hi,
Anyone know if it is possible (anything's possible??) to perform reverse dns
lookup in a stored proc (or scheduled job if easier??) ie convert a passed
IP address to hostname??
Thanks for thinking about this if you did...
Arth
...
Wed, 12 Jan 2005 12:49:55 -0000
|
Transfer data
I transfer data from one server to other server:
I have this procedure on current server:
declare @timestamp varbinary(16)
set @timestamp=(SELECT max(ID_TIMESTAMP) FROM
[linkedServer].[database1].[dbo].[table1])
INSERT INTO [linkedServer].[database1].[dbo].[table1]
([ID], QUESTIONID,SUBJECTID,PARTNERID ...
Wed, 12 Jan 2005 13:41:43 +0100
|
Putting commas between select statement values
Hello,
This may be a strange request, but I am going to ask about it anyways.
Say for example if I have a table named TEST and in the table there is a
column named NUMBERS, such that it is like this:
NUMBERS
1
2
3
4
How could I use a select statement in a way that a comma would seperate
every re ...
Wed, 12 Jan 2005 04:19:04 -0800
|
Search a String with in Stored Procedure List
Hi,
How can i Search a string ("ABC") with in All Stored procedures in a
Database ?
Thanks,
...
Wed, 12 Jan 2005 17:49:22 +0530
|
Select from a table passed as variable ?
Hi,
I'm tryning to exceute some select on some table which I want to pass a
variable (a follow)
DECLARE @MyVar sysname
SET @MyVar = 'Test'
SELECT * FROM @MyVar.
Each time I get '@MyVar' is nt declared'.
If I do the following :
DECLARE @MyVar sysname
DECLARE @Statement varchar(256)
SET @MyVar ...
Wed, 12 Jan 2005 13:10:09 +0100
|
Update statement performance decreases in stored proc
Hi all,
I'm having some trouble finding out why an update statement that runs in
less than 2 seconds from Query Analyzer takes no less than 24 minutes when
in a stored procedure. Here are the important parts of the stored proc:
CREATE PROC MyProc
AS
-- Create temp table, fill it with starting data
CREATE ...
Wed, 12 Jan 2005 13:04:59 +0100
|
CAST char to date on Japanes server
Hello,
I'm using the following statement to add 1 day to the current date and get
the result with time 00:00:00
SELECT CAST(CONVERT(char(12), DATEADD(d,1,GetDate()),1) as smalldatetime)
When running this statement on a Japanese server I get an error telling that
it can't convert a char to smalldatetime, th ...
Wed, 12 Jan 2005 13:13:37 +0200
|
Insert Fails into a table on linked server database
select, update and delete Ok. But when I want to insert a value into a table
Msgs 7343 returns and operation fails. Source and linked servers are SQL
Server and are linked by OLE DB Provider For SQL Server.
Thanks in advance220 499862
From: "Juraj Rojko"
Wed, 12 Jan 2005 01:51:04 -0800
|
Storing multilanguage character in a database.
For a web application that I'm creating I was required to setup a table
in a way that it can accept multiple language.
So, I created the needed columns as NVarchar and I'm using UTF-8 as
encoding in the asp.net pages.
By copy-pasting characters from here and there, I see, actually I am
able to store and retr ...
11 Jan 2005 23:32:07 -0800
|
using SQLserver, ADO, Delphi: performance issue
We have been considering using SQLserver as the backend for a large
business application developed in Delphi.
We intelinked an ADOconnection, an ADOtable and a DBgrid.
The table is about 200,000 records.
No matter what options we enabled or disabled on the ADOconnection or
the ADOtable, the MSsql Profiler sh ...
Wed, 12 Jan 2005 07:57:45 +0200
|
Comparing Strings and Case-sensitivity
By default, SQL Server does case insensitive comparisons
eg - Select Name1 from Names where Name1 = 'Fred'
will return
'FRED'
'fred'
'Fred' etc...
I have tried to find the Database setting for this or more information with
no luck.
Any help much appreciated. Thanks220 499833 <1105498803.023877.75560@ ...
Tue, 11 Jan 2005 19:07:03 -0800
|
Alternative to nullif
Hi:
I'm using the following code to set Corp_AvgTalkTime to null if there
is a division by zero (see nullif below). I might want to set it to
zero, or in some cases I might want to replace it with '00:00:00'.
Right now I go back over the data and set it using another update, but
I would like to do it all in ...
11 Jan 2005 18:52:59 -0800
|