all groups > sql server programming > may 2005 > threads for monday may 9
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
DTS help - using look ups
Posted by RJN at 5/9/2005 10:00:13 PM
Hi
I'm migrating data from the old schema to the new schema using DTS. The
old and new schema are different. In the new schema we have identity
columns as Primary keys and referred as foreign keys in the child
tables. In the old schema Primary keys are not identity columns. So when
I migrate ... more >>
RSS & ATOM Database Schema?
Posted by clintonG at 5/9/2005 8:01:45 PM
I'm fishing for a schema somebody may choose to give me or refer to
documentation for a schema that documents a design for storing RSS and/or
ATOM feeds.
<%= Clinton Gallagher
... more >>
need help with a sql view
Posted by Dougb1102 at 5/9/2005 6:58:05 PM
If someone could please point me in the right direction, I would greatly
appreciate it.
Here's the situation:
Let's say I have two tables. 1 table called Albums and 1 table called
pictures which are linked through primary and foreign keys of course. What
I'd like to be able to do is ha... more >>
How many Jobs ran on a particular database yesterday
Posted by Rajesh at 5/9/2005 6:24:01 PM
How to know how many Jobs ran on a particular database yesterday ??
Thanks in Advance
Rajesh.
... more >>
Modeling a Matrix
Posted by BK at 5/9/2005 5:47:01 PM
What is the best way to model a matrix in terms of table design? I want to
model a sociogram, which is basically a network diagram with weights
assigned to the edges. Once, established I would want to use it to do matrix
computations (matrix algebra). So, the simple version would be something
li... more >>
Need help with BCP
Posted by ajmister at 5/9/2005 3:43:51 PM
Hi
I am new to the BCP utility and have a question for the SQL Guru's. I am
using the following command line BCP statement to output records in a
formatted file.
"bcp "temp..name.sql" out some.rpt -S <database> -U uid -P password -f
test.fmt" and it works fine. I would like to chan... more >>
Choosing Lesser of Evils
Posted by Mike Labosh at 5/9/2005 3:42:43 PM
I have the following SP that is the first step of cleaning bulk inserted
files before matching records against existing ones in the database:
UPDATE SampleSourceArchive
SET CompanyName = LTRIM(RTRIM(ISNULL(REPLACE(CompanyName,'"',''),
''))),
CompanyPhoneArea = LTRIM(RTRIM(ISNUL... more >>
inserting new data into an sql table
Posted by a at 5/9/2005 3:14:02 PM
My apologies if this is not a good place to ask this question, but I didn't
get an answer to it over on the C# board.
I'd like to use C# to insert new data into an sql table from a parsed text
file.
Here's my best guess at how to insert this dataset....
the code runs, but no new records a... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
Stored Procedure executing Trigger failure
Posted by Wm. Scott Miller at 5/9/2005 2:53:28 PM
I have a stored procedure that executes and during its execution it causes a
trigger to fire. The user that is running the stored procedure doesn't have
access to anything but the stored procedure (table access is not given).
The call is failing saying that the user doesn't have select or del... more >>
sql to change from rows to columns
Posted by nicholas gadacz at 5/9/2005 2:15:27 PM
hello all,
what is the best way to write a query to return the following
id_lead, property_type, square_foot
1, 'townhouse', 1000
if i am storing the values in a table like
form_element, form_value
id_lead, 1
property_type, 'townhouse'
square_foot, 1000
if the table which i am stori... more >>
SQL Backup to UNC Path or Mapped Drive
Posted by Lontae Jones at 5/9/2005 1:09:37 PM
Can you backup a database to a UNC path or mapped drive? ... more >>
Error : "Parallel worker query thread was involved in a deadlock" in SQL Server 2000(sp3)
Posted by basharatw NO[at]SPAM hotmail.com at 5/9/2005 12:31:06 PM
We are running four session of application and each session is running
the same stored procedure against SQL Server database running SP3
patch.
All these four session are doing data intense operation and after some
time three of the process are getting completed correctly and the
fourth give ... more >>
queries
Posted by Aaron at 5/9/2005 12:02:48 PM
my function needs to execute 3 queries. is it faster to execute 3 queries
seperately or make a combine query?
update query
execute
update query
execute
insert query
execute
OR
update query;update query;insert query
execute
... more >>
Using Variable in OpenRowSet
Posted by Makarand Keer at 5/9/2005 10:32:08 AM
Hi
I am using OPENROWSET funcition of SQL where by datasource is in form of
variable, but when I pass datasource as parameter it show my syntax error.
This is how I have coded my sp, WHERE @ExcelFilePath is input parameter of
my SP.
DECLARE @DataSource NVARCHAR(50)
SET @DataSource =... more >>
table spool
Posted by Yulin Shi at 5/9/2005 10:20:20 AM
Hi All,
I have a big query with many joins, in the query plan, it shows the table
spool is taking a huge trunk of resources. See the attachment.
The table spool supposed to save the resultset into a temp table and for
further reuse. The explanation of "optimize rewinds"
makes little sense ... more >>
Stored Procedure parameters
Posted by bmsgharr at 5/9/2005 9:58:08 AM
I have a call within a stored procedure:
DECLARE @VALUE INTEGER
spAudit @USERNAME, 'tblTest', 'Column1', NULL, CONVERT(VARCHAR, @VALUE), 0
spAudit parameters:
@USERNAME VARCHAR(255),
@TABLE_NAME VARCHAR(255),
@COLUMN_NAME VARCHAR(255),
@OLD_VALUE VARCHAR(255),
@NEW_VALUE VARCHAR(... more >>
Stored Procedures and OPENROWSET?
Posted by jkharris0 at 5/9/2005 9:55:32 AM
I have been using the OPENROWSET function to allow me to use the SELECT
output from a stored procedure in a SELECT statement the same as if the the
stored procedure were a table or a view. Has been working day in and day
out.
When I added an UPDATE and INSERT to one of my query stored pr... more >>
Acquire NTLM User ID within Trigger or Sproc?
Posted by Carl Perkins at 5/9/2005 9:44:04 AM
I need to acquire the userid that the person signed on at their Windows
workstation. I need to do it from within a Trigger.
How?... more >>
query performance
Posted by Chris at 5/9/2005 9:32:11 AM
2.7 Million rows in accounting_tran table
3.1 Million rows in charge table
Following query only returns 333 rows.
SELECT c.accounting_tran_id
FROM accounting_tran at
JOIN charge c on at.accounting_tran_id = c.accounting_tran_id
WHERE at.lctn_id = 'VA437'
and at.acct_tran_status_ty... more >>
Changing date and keeping time
Posted by Alar Pandis at 5/9/2005 8:12:01 AM
Hi! I'm using MS SQL server 2000. How can I change date in date field keeping
time the same (datetime field)? I'm using SQL Enterprise Manager for that.
Please help with syntax. More thanks, Alar. PS! Can You suggest some book or
other source I can find hints about MS SQL syntax?... more >>
Help in Query
Posted by Boomessh at 5/9/2005 8:08:11 AM
Hai all,
Help need to solve this situation.
Admit table:
MemberID FacilityID ADMITDATE
100 200 04/31/2005
101 201 04/31/2005
101 201 05/03/2005
102 202 05/01/2005
102 202 05/03/2005
103 203 05/02/2005
103 204 05/03/2005
Discharge ta... more >>
cdosysmail to SMTP server authenticated with user & password
Posted by andrea favero at 5/9/2005 6:38:10 AM
I wanto to use store procedure cdosysmail (
http://support.microsoft.com/default.aspx?scid=kb;en-us;312839&sd=tech) to
send mail to me for any failed jobs.
My SMTP server require user password and use base64 crypt algorithm for
authentication.
How I must modify the stored procedure??
Thank... more >>
Question on SP_MakeWebTask
Posted by joef at 5/9/2005 5:47:00 AM
I'm using SP_MakeWebTask it's working OK. The problem is that if a
particular query returns no records, the string that gets written from
the:
<%begindetail%>
<%insert_data_here%>
<<%enddetail%>
part of the template file is: "The specified statement did not generate
any data"
Is th... more >>
Nested Stored Proc
Posted by Mustafa at 5/9/2005 4:03:01 AM
Pleaseet me know the Advantages and Disadvantages of nested Stored porc in
sql server 2000.... more >>
Windows Authentication and VBScript
Posted by Adam Sankey at 5/9/2005 3:44:03 AM
Hi
I'm guessing then that if I have the sql server and the webserver running on
different machines then IUSR_<machinename> on the webserver would have to be
a member of a domain? Then <Domain Name>\IUSR_<machinenname> could be given
access to the machine runing sql server and granted acces... more >>
Cursor Loop
Posted by marcmc at 5/9/2005 2:54:01 AM
Hi, I wonder can someone help me. I have a cursor that will drop a number of
weekly tables if a monthly table is being generated. I have to keep the
previous weeks data but can drop the remaining tables. I have tried it as
below but it will only drop the wk214 table as calculated and does not ... more >>
Complex Select statement advise needed please
Posted by Stephen at 5/9/2005 2:46:07 AM
Hey there. I was wondering if someone could advise me whether or not i've
writted an effective/efficent stored procedure.
Basically the below procedure will be run from a .net application and the
values passed the the parameters will be 1 or null. It will allow the user
to select as many ... more >>
Stored Procedures in SQL Server 2000
Posted by ailing at 5/9/2005 1:39:18 AM
Hi, i want to create a stored procedure named GetSavedPassword. But I get the
error states that " Invalid syntax near user".( "User" is the name for table
).
CREATE PROCEDURE GetSavedPassword As
SELECT *
FROM dbo.User
GO
Can somebody show me how to solve it? Thanks!
ailing... more >>
Returning Value from stored procedure
Posted by wrytat at 5/9/2005 12:13:02 AM
I wrote a Stored Procedure as below:
CREATE PROCEDURE sp_AssignActPass (@CustID varchar(4), @UserID
varchar(7),@ActPass varchar(45),@LastUpdate datetime)
AS
UPDATE MemberSET ActPass = @ActPass, LastUpdate = CURRENT_TIMESTAMP
WHERE CustID = @CustID AND UserID = @UserID AND LastUpdate = @LastU... more >>
Calculation for FIFO
Posted by Kriste L at 5/9/2005 12:00:00 AM
Hi Everybody,
I've provide a sample Purchase Order with some data. I need to maintain =
a FIFO (first-in-first-out) for the the sale of item and at the end of =
the day, will generate a report which are the Purchase Order with item =
still unsold.=20
Example, sold 150 items (80 from id=3D1, 2... more >>
synchronization
Posted by alex via SQLMonster.com at 5/9/2005 12:00:00 AM
How can i synchronize 2 tables on 2 different sql servers 2000
i mean TABLE1(col1, col2, col3, col4) and
TABLE1(col1, col2, col3, col4, col5, col6)
the first 3 colums are the same in rwo tables.
Thanks
--
Message posted via http://www.sqlmonster.com... more >>
Constraint Question when referencing a Parent-child structured table
Posted by Allan Wissing at 5/9/2005 12:00:00 AM
I have a Location Table, which has a ring constraint, so that I can map out
a parent-Child relationship. I use this table to create a treeview in my
application.
==========
CREATE TABLE [J_Location] (
[LocationID] [int] NOT NULL ,
[LocationName] [nvarchar] (30) COLLATE SQL_Latin1_General_... more >>
One parameter too many
Posted by Michael C at 5/9/2005 12:00:00 AM
I was looking over some code that calls a stored procedure from C#. I have
specified one more parameter than necessary but the code still works. Does
anyone know why it works? This is on a PDA connecting to SQLServer.
Thanks.
eg
sqlCommand command = new SqlCommand(connection, "INSERT IN... more >>
temporary Table
Posted by madhavi at 5/9/2005 12:00:00 AM
How Can i select Data from temporary table which is in a stored Procedure
--
Thanks and Regards
Madhaviv
... more >>
Compare SP 's content ?
Posted by Agnes at 5/9/2005 12:00:00 AM
Besides buy a third-party program, any way to compare the content of the SP
in two different SQL server ??
Thanks a lot
... more >>
SQL & EXCEL...
Posted by Chris Marsh at 5/9/2005 12:00:00 AM
I can use Excel to read existing SQL data all day long and it's a wonderful
tool! But, if I want to use Excel to update SQL data is that possible? I
just don't appear to be doing something correctly if it is possible. I am
always working with what appears to be non-updateable data, so when ... more >>
select mycolum from @tablename ??
Posted by Alfonso at 5/9/2005 12:00:00 AM
Hi all,
I want to execute a select from a table which his name is contained in a
variable not using "sp_executesql" procedure
declare @tablename varchar(30)
set @tablename = 'mytable'
select mycolum from @tablename
Can anyone help me?
Thanks
Alfons... more >>
Select statement
Posted by simon at 5/9/2005 12:00:00 AM
I have table advertisements:
advertName advertLength position
---------------------------------------------
adv1 10 1
adv2 20 2
adv3 130 3
..... more >>
how many field is rational in one table
Posted by redha at 5/9/2005 12:00:00 AM
Hi there,
I have a program whose database is in SQL.
My fields numbers are more than 250 and as I normalized it one of my tables
has 250 fields.
Is that rational and possible to have 250 fields in only one table and is
that affects the speed of my program?
Thanks in advance
Redh
... more >>
Newbie: stored procedure stops and exits prematurely
Posted by Kaycee Heyer at 5/9/2005 12:00:00 AM
Well thanks to a lot of reading and experimentation, as a newbie, I've made
it to stored procedure writing...But my inexperience is showing, I'm
afraid...Can anyone point out what I should be doing here? Thank you...
I'm pulling several steps together into one stored procedure, but the
proced... more >>
how to config server as a Distributor
Posted by zizi via SQLMonster.com at 5/9/2005 12:00:00 AM
how to config server as a Distributor?
thnx
--
Message posted via http://www.sqlmonster.com... more >>
|