all groups > sql server programming > january 2007 > threads for friday january 5
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
俱
Posted by Sunil Virmani at 1/5/2007 11:04:00 PM
Hi All,
Create a table , and put in some row åã© and 俱
and fire a query something like SELECT * FROM mytable WHERE
(myColumn = 'åã©')
it gives me right result.
But if i fire
SELECT * FROM mytable WHERE (myColumn = '俱')
It does not return any result f... more >>
Disable Constraint command not working on SQL 2005
Posted by ConfNoob at 1/5/2007 10:26:40 PM
hi all,
im doing a project for my school - i created a Constraint on a table
using ALTER TABLE (tabname) WITH NOCHECK.
later when i do
ALTER TABLE cm_032 CHECK CONSTRAINT all
it doesnt seem to enable it
[ I have checked this with SSIS , under Object Explorer > Database >
(table) > "... more >>
Simple Query
Posted by lara169 at 1/5/2007 8:55:21 PM
SET NOCOUNT ON
DECLARE @EndDate DATETIME
--SET @EndDate = '2007-01-01 00:00:00.000' --dec 11
DECLARE @tab TABLE(Emp_Id int , planName varchar(10), start_Date datetime,
End_date datetime )
INSERT INTO @tab SELECT 1,'p1','20061231','20070101'
INSERT INTO @Tab SELECT 2, 'p1',NULL,... more >>
Beta testing a cross database integrity tool for SQL Server
Posted by Tom at 1/5/2007 6:58:19 PM
Hi,
We are in search of beta testers for our new software tool for SQL Server :
Remote Keys allows you to define and enforce cross databases integrity
constraint. With Remote Keys, you can create a foreign key between to SQL
tables located in distinct databases.
New version (beta 2) can be ... more >>
Timeout expired error in DTS with an ActiveX Script task
Posted by stjulian at 1/5/2007 6:26:36 PM
(SQL Server 2000)
I have a Data Transformation Service package which is an ActiveX Script task
to create an XML file output (see below).
It fails during execution. With
Error Code: 0
Error Source=Microsoft OLE DB Provider for SQL Server
Error Description: Timeout expired
... more >>
EXECuting (>4k) command dynamically
Posted by Evan Camilleri at 1/5/2007 6:22:22 PM
I need to EXECute a command dynamically inside a stored procedure.
My PROBLEM is that the text of the command is inside a text field and can
sometimes be larger than 4k or the limit of varchar.
What can I do?????
Evan Camilleri
www.holisticrd.com
... more >>
Need to find records that have consecutive numbers
Posted by vseshan204 NO[at]SPAM gmail.com at 1/5/2007 5:25:30 PM
I need to find records that have 6 distinct consecutive numbers. I have
a data like this....
Name Batch Sequence
A S1 4
A S1 5
A S1 6
A S1 7
A S1 8
A S1 9
A S1 ... more >>
XML Help
Posted by Ed at 1/5/2007 5:01:00 PM
Hi,
I am new to XML and I have received a XML file like the following
<?xml version="1.0" ?>
- <INITS>
- <MONTH NAME="JAN" YEAR="2006">
<AEIR>2</AEIR>
<AMARR>1</AMARR>
</MONTH>
- <MONTH NAME="FEB" YEAR="2006">
<AEIR>1</AEIR>
<AIBANK>1</AIBANK>
... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
Security best practice for linked servers/cross-database queries
Posted by googleThis NO[at]SPAM nadolna.net at 1/5/2007 4:23:52 PM
I have a remote SQL Server 2000 server that will pull data from our
local SQL Server 2000 server's database "A". On the local server, I
set up a database container "B" that holds only a set of views that
reference tables in database "A". (DB "A" is kind of a kitchen sink of
tables and views an... more >>
Replication Triggers on replicated tables.
Posted by ChrisR at 1/5/2007 3:32:47 PM
Howdy all. I set up Immediate Updating replication on AdventureWorks on 2005
Person.Address and AddressType tables. When this type of replication is
created, a replication trigger is created on the Publisher. However, this
replication trigger fires off the other (User) trigger on the table whe... more >>
Nested While Loops
Posted by zwieback89 at 1/5/2007 12:58:57 PM
Hi,
I am getting stuck in a nested while loop. I am successful in building the
lft and rgt values for a org tree for an individual manager who has multiple
managers and subordinates under him. However I want to build the left and
right values for a another manager who is a different employee i... more >>
Set DateFormat YYYYMMDD
Posted by Jay at 1/5/2007 12:35:51 PM
Hey guys,
I think this will be an easy one for you guys.
If I use the Set DateFormat statement in a proc will the scope of this
statement be limited to the current session and therefore be switched
back to the default after the proc is finished?
Thank in advance for any help.
Jay
... more >>
Db Comparison and Synch tool
Posted by Sugandh Jain at 1/5/2007 11:54:42 AM
Hi,
Pointers to any free db comparing and synchronisation tool if available will
be highly appreciated.
Regards,
Sugandh
... more >>
First letter Uppercase rest word Lowercase
Posted by gv at 1/5/2007 11:54:20 AM
CREATE TABLE A (City varchar(50) )
INSERT INTO A (City ) Values ( 'WeSt COLUMBIA')
INSERT INTO A (City) Values ('SPRING VALLEY')
INSERT INTO A (cITY) Values ('MT PLEaSANT')
SELECT City FROM A
DROP TABLE A
Results:
City
--------------------------------------------------
WeSt COLUMB... more >>
SQL 2005: Adding parentheses for Defaults and Check Constraints
Posted by Dr. Network at 1/5/2007 11:45:53 AM
I'm a little perplexed. I posted an earlier thread but am expanding it. SQL
2005 appears to be forcing syntax to add parentheses around things where it
seems that it thinks it is needed. Here, for example, is a script:
select @@version
go
use tempdb
go
CREATE TABLE [dbo].[test](
[TESTIN... more >>
How to call a View from a Stored Procedure
Posted by Kirk at 1/5/2007 10:48:11 AM
First off, I realize that this question may have been answered
elsewhere, but I could not find it - if it is out there somewhere, I
would appreciate a link.
That much said, here is my scenario. I have created a SQL View that
gets a set of records based on my criteria. However, I need to do s... more >>
Are Cross Joins Valid?
Posted by Bob McClellan at 1/5/2007 10:45:49 AM
I have a scenario where Timesheets are generated from
one application using it's legacy Unit Number. These
Timesheets are then processed manually into another system
using a different syntax of the legacy unit number. I have built
a cross reference table. My question is, can this cross refere... more >>
HELP with Grouping View
Posted by Mary at 1/5/2007 10:44:43 AM
Hi All,
I am new to this group and semi-new to SQL views. I am experienced with
Access queries and always compare the two. I created a view that would be
what Access refers to as a crosstab query. I have accomplished the task but
would like to further refine it. I am currently returning a c... more >>
Unable to add INCLUDED columns along with Primary Key Constraint NONCLUSTERED Option
Posted by venkateshgovind NO[at]SPAM gmail.com at 1/5/2007 10:41:19 AM
Have anyone ever added a primary key constraint with NONClustered Index
option and added "INCLUDE" Columns i.e non key columns in SQL 2005?
Any help is appreciated.
... more >>
Duplicate orders
Posted by simonZ at 1/5/2007 9:57:14 AM
I have asp page for orders. When user clicks button on page, the page is
submited and executes stored procedure, which inserts user order.
Sometimes it happenes that this order is inserted twice.
I tried everything - refreshing page, try to click more than once on button,
but never happends to... more >>
int or Numeric
Posted by gv at 1/5/2007 9:09:37 AM
Hi all,
sql 2000 sp4
Int or Numeric datatype for identity column?
A table could have 100 million rows, I have always used int but,
JDBC programmer wants me to use numeric.
Any reason not to?
thanks
gv
... more >>
Weird behaviour with Clustered Index and Distributed Query Inserts
Posted by ado at 1/5/2007 8:31:23 AM
Hi All,
Can any one shed somne light on the following behaviour for me. I have
2 sql DBs. One a staging server and the other the production box. I
have created a linked server on the staging box to the production box.
On a nightly bases I ingest data from different sources in to the
staging D... more >>
Safe or Unsafe SQL Refactoring?
Posted by Mike Hofer at 1/5/2007 7:42:19 AM
I could use some advice from all you database gurus. Please note that
I'm using SQL Server 2000, with no plans to move to 2005 any time in
the near future.
The code to check for a foreign key's existence is usually written like
this:
IF EXISTS(
SELECT id
FROM sysobjects
... more >>
union
Posted by Bert at 1/5/2007 7:40:56 AM
Hi,
Question:
Following is a fragment of a stored procedure.
how do i make this query working ? basically the goal is to return a union
of those to queries
thnks, B
--
create procedure sptest
(
@intcase as int
)
as
if @intcase =1
begin
select lastname
into #temp1
from emp... more >>
Connection Leak.
Posted by malkeshsheth via SQLMonster.com at 1/5/2007 6:47:07 AM
Hi
I have written my code in C++ and its a Multithreading program.
Three cases of my problem:
Below 1st & 2nd cases will be executing on Production machine. And 3rd case
will be on my local machine.
1) When application using "Data Source= (local) in the connection string,
connection l... more >>
SSIS forking a process and then exiting??
Posted by jobs at 1/5/2007 6:32:42 AM
Soliciting design suggestions..
Im looking to develop an SSIS process that will cycle every minute or
so checking a table for pending processes and launch them and then log
off. Some of the processes are t-sql some are pl-sql on a remote
oracle server.
Using vb/ado or possibly t-sql, how d... more >>
date without time
Posted by harp at 1/5/2007 4:32:14 AM
I am just trying to deliver a date without time part...
When I try the following:
select dateadd(day, datediff(day,0,getdate()),0)
I get: 2007-01-05 00:00:00.000 (which is okay)
So because I want to include it in a stored procedure, I tried it this
way:
declare @eintrittsdatum datetim... more >>
|