all groups > sql server programming > august 2007 > threads for tuesday august 14
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
How to get DEFAULT_SCHEMA for the login?
Posted by Zhou Xiang at 8/14/2007 11:28:01 PM
In the database(SQL Server 2005), I want to get the DEFAULT_SCHEMA for the
Login(or a user), how I can get it easily?
Thanks.... more >>
How can I get the run-time value of SQL task property
Posted by Jorvin NO[at]SPAM gmail.com at 8/14/2007 10:37:22 PM
For example,I want to get the run-time value of SqlStatementSource
property,and record it into a log table.
Can I do it in the script task component?
... more >>
SQL Date Ranges Help (corrected)
Posted by at 8/14/2007 8:28:22 PM
Greetings Usenet group!
I desperately need your help with this one.
I have seven data elements. They are:
Account Number, Account Start Date, Account End Date, Account Code,
Account Code Start Date, Account Code End Date, Account Code
Commission.
The Data looks like this in the order ... more >>
Extract a binary file in T-SQL
Posted by Hayato Iriumi at 8/14/2007 4:32:48 PM
Hello,
I'm in need of finding out a way to extract a binary file that's
stored in SQL Server 2005 using T-SQL, not .NET code.
I understand that Microsoft included an executable called textcopy.exe
in SQL Server 2000, but I can't seem to find it in SQL Server 2005. Is
there any equivalent tool... more >>
conversion of a char to adatetime resulted in out-of-range datetim
Posted by mitra at 8/14/2007 4:06:03 PM
Hi All,
I have two tables that I need to insert data from one into the other one.
When I execute the following INSERT INTO statement I get an out-of-range
datetime value error message.
INSERT INTO tmp_review ( nMessage, sContent, nReview, dReviewed )
SELECT nMessage, sContent, nReview, d... more >>
Update anamoly due to trigger
Posted by rohitnayak NO[at]SPAM gmail.com at 8/14/2007 3:13:55 PM
I have a situation that is simlar to one described below. Two tables:
Table byState (
state_code int
amount int,
lock int
)
Table byCounty (
county_code int,
amount int,
lock int
)
An update trigger updates byState.amount = sum(byCounty.amount)
An update state... more >>
Stored Procedure from Application_start
Posted by geo039 at 8/14/2007 3:02:36 PM
Does anyone know how I can execute a stored procedure from application
start?Seems like it would be an easy answer to find from online
reading but it's not?!
... more >>
How return newly created GUID (primary key) from an INSERT proc?
Posted by Ronald S. Cook at 8/14/2007 1:59:34 PM
How can I return the the newly generated GUID value when inserting a record
into a table?
Back when we were just using identity Ints for the PK we could just do a
SELECT @@IDENTITY but that doesn't work for GUIDs.
Thanks,
Ron
... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
Subtracting Dates from Two Different Records
Posted by molsonexpert at 8/14/2007 1:52:41 PM
Using SQL 2000.
I have a table containing rental tenant information, and need to build a
query that displays the length of time a unit has been vacant before being
filled again. The only way I can think of getting this info is by
subtracting the moveout date of the previous tenant from the ... more >>
What is wrong with my sql?
Posted by Al at 8/14/2007 1:50:02 PM
I am running the following in the qry analyzer:
use movetracking
go
INSERT dbo.tblkpEmployees
(
Emp_ID, Emp_DeptCode, bl_id, fl_id, Emp_FirstName, Emp_LastName
)
SELECT dbo.tblkpEmployees1.em_id, dbo.tblkpEmployees1.DeptCode,
dbo.tblkpEmployees1.bl_id,
dbo.tblkpEmployees1.fl_id, dbo.t... more >>
Foreign Key Relationships
Posted by Max at 8/14/2007 1:15:40 PM
Hello,
I have 3 tables that I would like to link together. Table one has S/W and IPP Tag
information where the primary key is the pair (S/W + IPP Tag). Table two has H/W
and IPP Tag information where the primary key is the pair (H/W + IPP Tag). Table
three is a compatibility table with t... more >>
Inconsistent results from SELECT COUNT(*) FROM DEVICEENTITY
Posted by Siegfried Heintze at 8/14/2007 12:40:19 PM
When I type in my query (see subject line) to osql.exe, I get different
results. I was expecting 2025 records and instead I get 1643, 1744 and 1822.
There was nothing else adding records -- could this be true?
I remember years ago when teaching ODBC with C++ and MSAccess, the count
returned... more >>
Best way to Learn T-SQL Performance Tuning
Posted by Dragon at 8/14/2007 12:32:41 PM
Hi,
I want to learn how to get the most performance out of T-SQL code.
essentially I want to learn to be able to rewrite T-SQL code to get better
performance out of stored procedures. What would you recommend is the best
AND fastest way to learn that? I am more interested in leaning perform... more >>
sp_send_dbmail executed from a power builder app
Posted by jaylou at 8/14/2007 12:06:02 PM
Hi all,
I have a power builder application that I need to send emails from. I
created a SP which I attached below. If I remove the attachment it works,
but with the attachment the mail does not go thru. The application uses
window auth. and I am a domain admin, so I don't believe this is a... more >>
Conversion failed when converting datetime from character string
Posted by Rudy at 8/14/2007 11:28:01 AM
Hello All!
So I have this wierd problem. On my developer machine, using VS2005/asp.net,
I'm calling this SP in program.
ALTER PROCEDURE [dbo].[SearchActive]
-- Add the parameters for the stored procedure here
@FName nvarchar(50),
@LName nvarchar(50),
@DOB nvarchar(50),
@Acct nvarch... more >>
SQL 2K5 SP Runs All Night... Doesn't Finish
Posted by Mike C# at 8/14/2007 11:22:28 AM
Hi all,
Can't post code for this one, but I have a general question about SQL2K5
SP's. I have an SP with an INSERT INTO ... SELECT ... statement that inner
joins about 10 tables. I kicked off the SP last night and it ran all night
long without finishing. I came in this morning and it was... more >>
One table or four?
Posted by miwebster NO[at]SPAM gmail.com at 8/14/2007 10:24:51 AM
I'm trying to refine the data sturctures of my tables to improve
efficiency, and have a question.
Assuming my base table is like this:
Create Table t1 (ItemID int, dataID int, FisMo int, Qty float)
With a unique index on ItemID, DataID and FisMo. ItemId and DataID
are foreign Keys from oth... more >>
Assign permissions have creation of stored procedure.
Posted by rfreiberg NO[at]SPAM geosolinc.com at 8/14/2007 10:22:11 AM
I have a user that is db_owner. When I create a new stored procedure,
this user cannot execute the proc until I re-grant the user
permissions. Why does this occur? If the user is dbo, shouldn't it
have permission on any newly created objects in the database?
... more >>
Execution Plan and Indexes (Indecies, Inde...oh you know)
Posted by Offeral at 8/14/2007 9:22:01 AM
I'm getting odd results from an execution plan. In a query that joins
several tables, I get an execution plan that uses an index when I have one
clause in the where, and does not use an index when I have two in the where
clause. Which clause comes first does not matter - the plan still shows... more >>
Please help with updating/insereting in a table
Posted by Al at 8/14/2007 8:04:03 AM
I am working in sql server 2000. I need to accomplish 3 things:
1) I have a table called “tblkpEmployees†that I want to update from another
table that is on a linked server. The other table name is “emâ€. The full path
is
“fm.fmspace.dbo.emâ€
Both tables have (employee ID) “... more >>
sp_cursor
Posted by Equality72521 at 8/14/2007 7:04:03 AM
Hi,
I discovered something interesting today regarding sp_cursor* stored
procedures and SET NOCOUNT ON and wondered if anyone else had experienced the
following:
By SETting NOCOUNT ON in an SP used by an application via ODBC that
references a linked server, the NOCOUNT appears to suppres... more >>
Call MS Access Report drom TSQL
Posted by Harry at 8/14/2007 6:00:03 AM
Hi I wont to call a MS Access Report from a TSQL Statement can be SP or
function
Im using Access 2003 ADP and SQL Server 2000... more >>
Implment class inheritance in DB
Posted by ×™×•× ×™ גולדברג at 8/14/2007 4:16:04 AM
Hi,
I started my design with class diagram, i have entities and the relationship
between them. I have:
1.Person (id, name)
2. Employee (one additional attribute: salary) which extends (derives from)
person
3. Customer (one additional attribute: credit) which extends (derives from)
person ... more >>
filegroup
Posted by farshad at 8/14/2007 3:58:02 AM
What is the advantage of having two secondary files inside a filegroup.
For example, I can create a table and place it inside a filegroup which
obviously will use the secondary files.
Not sure why some DBAs create just one but otherscreate more than one
secondar files in a filegroup.
I have r... more >>
T-SQL Variables
Posted by Tom Costanza at 8/14/2007 3:20:01 AM
I'm trying to use a variable for the target of an IN clause. Like this:
Select * From MyTable Where SomeVarCharField IN (@someVarCharVariable)
Is there a trick to this, because I can't get it to work. Or is this syntax
not supported?
Thanks in advance,
Tom Costanza... more >>
delete subquery
Posted by marcmc at 8/14/2007 2:24:01 AM
select distinct client_ref, cl_eff_date, cl_seq, count(*) from
Get_bcp_h_climis group by client_ref, cl_eff_date, cl_seq having count(*) > 1
returns....
client_ref cl_eff_date cl_seq
----------- ----------- ------ -----------
37091626 20070810 1 2
What is the d... more >>
Tricky problem
Posted by Peter Larsson at 8/14/2007 12:00:00 AM
Hi all!
I have kind of a tricky problem here, I have a big advanced (performance)
stored procedure which fetches data from different tables in my database.
This procedure fetches details about users.
I have several queries that need to use this procedure, these calling
procedures produce... more >>
|