all groups > sql server programming > june 2007 > threads for friday june 22
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
SQL Server 2005 - can't connect with ADO.NET
Posted by Jen at 6/22/2007 7:14:52 PM
I'm testing my application with SQL Server 2005. For some reason none of my
code can connect. I get a "SQL server does not exist or access denied"
exception. I'm using the "sa" user. Never had this problem with SQL Server
2000.
I can connect to my database just fine with Management Stud... more >>
sp_executesql problem
Posted by mike at 6/22/2007 4:46:48 PM
I'm getting an error that @Callout must be delcared, but as you see it
is. What might I be doing wrong?
begin
declare @Sql nvarchar(2000)
declare @LinkedServerName nvarchar(35)
declare @DatabaseName nvarchar(35)
set @LinkedServerName='camdev0'
set @DatabaseName='ttrax'
declare @Callout... more >>
Unique number within two tables
Posted by Joachim Hofmann at 6/22/2007 4:45:38 PM
Hello,
I have two tables which need a column with an identity number which must be
unique within the two tables.
i.e.
T1 T2
__ __
1 3
2 5
4 7
6 8
9
What is a proper way to do this?
An (After-) Trigger? Or does another mechanism exist
which is already ... more >>
Changing ownership
Posted by Ed at 6/22/2007 4:37:00 PM
Hi,
I have a co-worker who left the company. How can I change the ownership
of all objects that he owns?
Thanks
Ed... more >>
best approach/setup for SSIS management/deployment?
Posted by === Steve L === at 6/22/2007 3:59:35 PM
i have been wondering about how one can manage all the
packages effectively with SSIS (with each
server has its own ssis, like some companies I know of,
they imported the SSIS packages (usually w/ .dtsx extention) to the
database. Then set up a job that points to the ssis package and a
conf... more >>
Import data truncate my data
Posted by fniles at 6/22/2007 3:36:05 PM
I am using SQL 2005. I have a table defined as decimal(12,4).
I import data like 1.99305 to it, and the value in the database becomes
1.9930 instead of 1.9931.
But, when I edit the the database like
update myTable set price = 1.99305 where id = '12345'
the value of the Price becomes 1.9931.
... more >>
varchar(max)
Posted by Ed at 6/22/2007 3:27:00 PM
Hi,
If varchar(max) can hold up to 2GB of data, why wouldn't we ceate all the
string datatype in varchar(max)? Does it affect the performance or indexing
if if have a varchar(100) compare to varchar(max). Thanks
Ed... more >>
Converting field with $
Posted by David C at 6/22/2007 3:21:13 PM
Can I convert a field that contains a dollar sign in it so that it reverts
to a common number? For example, I have a value $3,000.00 in a parameter
(ASP.Net page) that I want to be 3000.00 in my UPDATE SET statement.
Thanks.
David
... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
Repost: Query question
Posted by Jack at 6/22/2007 3:13:18 PM
Hello,
A query question please. I have a query that I am sure can be done in a
much easier and efficient
way. Just don't know how...
CREATE TABLE [dbo].[Users]( [UserID] [int], [Name] [varchar](50))
CREATE TABLE [dbo].[Orders]( [OrderID] [int], [UserID] [int] NULL,
[OrderDate] [datetime]... more >>
Query question
Posted by Jack at 6/22/2007 3:08:00 PM
Hello,
A query question please.
..
I have a query that I am sure can be done in a much easier and efficient
way.
CREATE TABLE [dbo].[Users]( [UserID] [int], [Name] [varchar](50))
CREATE TABLE [dbo].[Orders]( [OrderID] [int], [UserID] [int] NULL,
[OrderDate] [datetime])
insert into User... more >>
Funcion
Posted by seema at 6/22/2007 2:49:12 PM
I have the following funtion. Suppose I pass a date like 1d 24h 24m
when I calculate it should be >25 hours but it is not doing right
calculations.
ALTER FUNCTION [dbo].[GetHours22June](@startTime DATETIME, @endTime DATETIME)
RETURNS VARCHAR(20)
AS
BEGIN
DECLARE @Hour INT
DECLARE @Minu... more >>
how to check if value is not numeric?
Posted by Rich at 6/22/2007 2:45:19 PM
Select * from tbl1
where Right(Alpha_Numeric, 5) ... Is not numeric
a value for Alpha_Numeric might be 'abc12345' or 'abc123mm'
I need to retrieve the row where Alpha_Numeric Like 'abc123mm'
How does Tsql determine if a char string is numeric or not?
Thanks,
Rich... more >>
multiple rows to columns
Posted by DJ Ink at 6/22/2007 1:51:01 PM
I am working with SQL2000 and need to report the columns as rows. I have a
table like
specialty table
empid specialtycode
100 10
100 14
100 19
100 33
101 10
101 22
101 50
105 12
105 10
105 18
105 25
107 20
I need to report it as:
e... more >>
Need help on CTE
Posted by Bhaskar at 6/22/2007 1:24:00 PM
HI,
I need some help on common table expression. i have #ContractCust table
with following data.
CREATE TABLE #ContractCust (ContractNumber VARCHAR(100),CustomerId INT)
INSERT INTO #ContractCust VALUES ('001',1)
INSERT INTO #ContractCust VALUES ('001',2)
INSERT INTO #ContractCust VALU... more >>
brain teaser for the gurus
Posted by jamesd at 6/22/2007 1:13:58 PM
Ok, I have a very challenging brain teaser for the sql gods.
We have a very simple sql table that lists every city in the world,
like this
*cityname*, *lat*, *lon*
baltimore, 111.333, -38.3333
boston, 112.11111, -22.2222
rio , 23.01007 ,33.7233963
(etc, 3 million rows)
I am tasked me w... more >>
Date conversion
Posted by FARRUKH at 6/22/2007 12:59:02 PM
I have a date n this format n my database '39205.43063657407'. how would I
convert this date ?... more >>
nested query issue, maybe?
Posted by Chris G. at 6/22/2007 10:55:01 AM
I'm looking to list a business unit's expense line items and show
BusUnit, QtrAct values, and QtrPlan values
like this...
BusUnit LineItem 1 QtrAct QtrPlan
BusUnit LineItem 2 QtrAct QtrPlan
BusUnit LineItem 3 ... more >>
Status at point in time?
Posted by Linn Kubler at 6/22/2007 10:54:03 AM
Hi,
I'm running SQL Server 2000 and I have been asked to report the state of a
number of inventory items on a particular date. The database has a table
that records history of each item. It records the serial number, the new
state code, the date the state change was made and the user ID w... more >>
Weird deseializing problem in CLR
Posted by Michael.Goit at 6/22/2007 9:00:01 AM
So, I'm trying to deserialize an object from XML back into itself in a CLR
Stored procedure.. I've used SGen to make the xmlserialization assembly of
the target type, but when I try to create the xmlserializer object I get the
famous "Cannot load dynamically generated serialization assembly" e... more >>
Dynamic string
Posted by Jaco at 6/22/2007 8:53:00 AM
Hi,
I am building a dynamic string that is larger than varchar (8000). I am
trying to push it into more than one variable and join them at the end but it
is not working as it should for some reason. Could someone shed some light
please?
Many thanks.
DECLARE
@SQL1 VARCHAR (8000),
... more >>
SqlBulkCopy problems
Posted by phancey at 6/22/2007 6:58:53 AM
When I issue the WriteToServer command I get an error eventually
"cannot access table .....".
If I use sp_who2 it shows that my process is using a "SET OPTION ON"
command and it is blocked by another connection.
My program starts a TransactionScope with a database connection, does
a couple ... more >>
Problem Extracting Image From Database
Posted by cypherus at 6/22/2007 6:08:44 AM
Hi,
I work for a non-profit organization that uses software to keep track
of it's clients. This software has the ability to store photos with
the clients file. The photo gets copied into a database table in the
Microsoft SQL Database. We need to get at that file and I came across
a command th... more >>
Simple COUNT select ....
Posted by Roger Tranchez at 6/22/2007 4:41:03 AM
Hello,
I have a table like this
id COD field2 field3....
1 cxxx
2 c234
..
33 cxxx
..
..
I want to return all the rows that contains repeated values from column COD,
and its count as...
id COD count_cod field2 field3
1 cxxx ... more >>
So simple COUNT question
Posted by Roger Tranchez at 6/22/2007 4:33:00 AM
Hello,
I have a table like this
id COD field2 field3....
1 cxxx
2 c234
..
33 cxxx
..
..
I want to return all the rows that contains repeated values from column COD,
and its count as...
id COD count_cod field2 field3
1 cxxx ... more >>
histogram use in creating optimised query plan
Posted by codefragment NO[at]SPAM googlemail.com at 6/22/2007 3:42:17 AM
Hi
We have a number of tables which hold as unique ids, codes. e.g. an
employee table
which holds an employeecode. This is a number we assign rather than an
autonumber, guid
or similiar.
The system has one code int which is used for all the tables, so we
might have a employee
with code... more >>
Help me for simple query
Posted by vincentmca NO[at]SPAM gmail.com at 6/22/2007 2:25:27 AM
hi,
Help my queries.
My table name student
following the fields
clss name cast
1 ram sc
1 ravi st
1 arun sc
1 siva obc
1 maha obc
2 ravi ... more >>
Differente result SQL code and store procedure with exactly same
Posted by Alfy at 6/22/2007 1:13:00 AM
Hello, i'm trying to write some sql code to get file space usage for all
databases in a SQL server. The strange thing is that if the code is execute
dierctly it works but if the code is put in a stored procedure it does not
work anymore it always return the same info related to file maxsize ... more >>
is there a way to search entire database?
Posted by trint at 6/22/2007 12:00:00 AM
I need to search for a mispelled word that I can't find in our 136
tables.
How can I do a search on the database?
Thanks,
Trint
... more >>
Query help
Posted by Nic at 6/22/2007 12:00:00 AM
Hi,
I would appreciate some help with a SQL Query - Sample data provided below.
I have a table with results and I would like to create a query that returns
the lowest (fastest) datetime value for each eventID that exists for a
specific Athleteid passed in as a parameter
In the sample be... more >>
Permissions question
Posted by Mike at 6/22/2007 12:00:00 AM
I have an ASP.NET app for which I have created an SQL Server user who is
granted EXEC on the procs required to run the application and nothing more.
I found a piece of SQL that purports to offer a slightly more advanced
search result than a simple Where... Like '%'+@SearchTerm+' %' and have ... more >>
Web Service vb5
Posted by VesnaSA at 6/22/2007 12:00:00 AM
Hi!
Is it possible to use a Web Service component written in VB .NET
(using
SOAP) in VB5?
How ???
Thanx a lot in advance!!
... more >>
|