all groups > sql server programming > february 2006 > threads for monday february 20
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
create trigger doesnt work
Posted by jen at 2/20/2006 11:41:02 PM
pls help! i have created the following trigger to check if a new record in
table B doesnt exist in table C, it will insert that record into table C. but
it only works when i did a manual insert, but not for imported data using the
import utility (new record in table B is import from another da... more >>
izzit got for loop in transact-sql stored procedure
Posted by yokesanhoo NO[at]SPAM gmail.com at 2/20/2006 9:22:40 PM
Dear all,
i was confuse that izzit there are sql server was support for loop
statement,
i got one section of inner query in my asp program, and i would like
to change in to stored procedure,i using ms sql server as my database.
the following is the asp code with the inner sql
For i = 1... more >>
SQL 2000 Reporting Services Dev Edition
Posted by Bill Murphy at 2/20/2006 5:31:55 PM
I recently purchased the developer edition of SQL Server 2000, which does
not include Reporting Services which ships separately. I also purchased the
developer edition of SQL 2005, which includes Reporting Services, for a
total of $45.
I've searched Microsoft to see if a developer edition of ... more >>
Stored procedure return val?
Posted by João Costa at 2/20/2006 4:16:28 PM
Hello all
I made a stored procedure and I transformed it into a job.
The stored procedure completes ok but the job resullt in enterprise manager
stays red but I returned 1 (SQLDMOComp_Success) . How can I control the
results?
Thanks in advance... more >>
Weird Performance Problem
Posted by Kevin Moore at 2/20/2006 4:01:28 PM
Hi,
I am having a weird performance problem with SQL Server 2000 at a client
site and I was hoping for some advice. Over the course of a number of weeks
performance within the application will degrade.When the entire server is
rebooted, the system and all queries run and execute quickly in exp... more >>
How to tell how many times an SQL executed in v7 or v2000?
Posted by Rick at 2/20/2006 3:57:13 PM
Using the dm_exec_query_stats in 2005, I know I can get the number of
executions for a particular sql_handle, but is it possible to get the
number of execs for a SQL in version 7 or 2000? Also is it possible to
get reads/writes/etc in these early versions?
Thanks.
... more >>
ASP 3.0 Error on SQL Server 2005
Posted by Jim Moon at 2/20/2006 3:46:16 PM
----------------------------------------------------------
Microsoft OLE DB Provider for SQL Server error '80040e14'
The query processor ran out of internal resources and could not produce a
query plan.
This is a rare event and only expected for extremely complex queries or
queries that r... more >>
unicode file bulk insert with Chinese characters
Posted by newbie2 at 2/20/2006 3:40:29 PM
I have this table:
CREATE TABLE [dbo].[Test] (
[ID] [int] ,
[Name] [nvarchar] (50) COLLATE Chinese_PRC_BIN NULL
)
And I have a data file containing two rows:
1,北京
2,上海
The data file is saved as Unicode format.
The bcp.fmt:
8.0
2
1 SQLINT 0 4 "," ... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
SP's or Views
Posted by Ricky at 2/20/2006 3:23:52 PM
Hi
I have some SP's with no params, just Selects query's with many joined
tables. I have been told (by a contractor)that if an SP does not have any
params or SP specific coding, then there is no need to have the query as an
SP and should be created as a VIEW instead and it's a waste having th... more >>
How to write synatax for implementing primarykey in sqlserver2005
Posted by ganu at 2/20/2006 3:12:00 PM
Hi
I have a problem while creating a table using primarykey.Can somebody
help me in writting syntax using primary key in sqlserver2005.
my table columns are pno,pname,pmgr,persons,budget and date.
I want a primary key for pno pname should be unique and budget should
not be null.
pleas ... more >>
Synchronize data between 2 instances of SQL Server Express?
Posted by holysmokes99 NO[at]SPAM hotmail.com at 2/20/2006 2:57:47 PM
I am building an application with a SQL Server 2005 Express backend. I
would like to create a secondary instance the database on another
server that will serve as a fail-over in case the primary server goes
down (there is only the Express version of SQL Server in this picture).
I see that rep... more >>
Database Documentation is important
Posted by frederik NO[at]SPAM dbmanual.com at 2/20/2006 2:07:40 PM
Hi
As a project manager,
=B7 Do you have an up-2-date overview of the database structure?
=B7 What will you do when your database administrator leaves your
company?
=B7 Are you willing to pay extra hours to update the database
information?
As a developer,
=B7 Do you spent too much hours ... more >>
How to update multiple rows with different values in stored porcedure
Posted by ndrdboc NO[at]SPAM gmail.com at 2/20/2006 12:58:27 PM
I have the following table:
CREATE TABLE [dbo].[cms_commodity_focus] (
[company_commodity_id] [int] IDENTITY (1, 1) NOT NULL ,
[company_id] [int] NULL ,
[commodity_type_id] [int] NULL
) ON [PRIMARY]
GO
This table basically stores the chosen commodity id for a company from
our contact ... more >>
Newcomer needs help with a SQL Query
Posted by londonnoise at 2/20/2006 11:58:27 AM
Hi, I’m new to this list and looking for some help (my SQL is not brilliant
to say the least) and information I’ve found on the web is confusing me
further.
It’s related to an SMS Web report, but I think it’s more of a SQL related
question.
I am trying to pull a count of all... more >>
how to avoid redundany in tables
Posted by gija at 2/20/2006 11:17:11 AM
Hi,
I have a small doubt regarding table creation.In sql server whenever i
execute the querry for a table redundant records are comming.I mean if
i insert values into table the same row is repeating twice or
thrice.How can i avoid that problem.I think using distinct keyword all
the time is not... more >>
Avoid Cursor: detect change in a timeline hierarchy
Posted by Mathieu Dumais-Savard at 2/20/2006 11:09:15 AM
Hi everybody,
I was wondering if I have another choice then using cursor here... see
this simple exemple:
Employee,Date,Department
1234,2001-01-01,10
1234,2001-01-02,11
1234,2001-01-03,10
1234,2001-01-04,10
1234,2001-01-05,10
1234,2001-01-06,10
1234,2001-01-07,10
1234,2001-01-08,10
1... more >>
Need to do generic INSERTS
Posted by Jamie Carper at 2/20/2006 11:04:50 AM
I want to do a generic INSERT. What I mean by that is I do not want to
specify any column names. Like so:
INSERT MyProductionTable
SELECT *
FROM MyDevelopmentTable Source LEFT OUTER JOIN
MyProductionTable Target ON Source.ID = Target.ID
WHERE (Target.ID IS NULL)
I do not want t... more >>
New entries in db query
Posted by vm at 2/20/2006 10:31:28 AM
Our SQL guy is off on vacation and I have been asked to write a query that
identifies new entries to our db. We have a table in a SQL 2000 db that has a
list of computer IDs, comments and date of entry. There can, and usually is,
multiple entries of comments for each computer.
What I ha... more >>
full text search on doc files
Posted by qtrsteve NO[at]SPAM yahoo.com at 2/20/2006 10:19:43 AM
I have a list of word files (.doc) I am trying to us the full text
search in sql server to find key words in these word documents. I have
a windows xp and sql server installed on my machine. ( no network
server). I cant seem to get the code to work to do a search on these
files. I would rea... more >>
Trigger performance (inserted/deleted)
Posted by newsgroups.bellsouth.net at 2/20/2006 10:00:42 AM
Hi,
Is there a way to tune the table or server to provide better performance
when accessing the inserted/deleted table.
I'm finding the cost of simply accessing the inserted or deleted tables from
within a trigger is inordinately high in my application. The table is about
8M rows with a... more >>
if exists help
Posted by Ganesh at 2/20/2006 9:41:26 AM
Hi There,
What is the problem here, I can not find out, it always execute sql instead
of printing 'no'
if exists (select * from dbo.sysobjects where id = object_id('dividend') )
if exists (select syscolumns.name
from sysobjects inner join
syscolumns on
sysobjects.id = sysc... more >>
Grouping Problem
Posted by Phill at 2/20/2006 9:19:20 AM
I have a table that contains a region, year, part, and quantity. I want the
query output to be one line per region with the years as columns for the sum
of the quantities. I've tried this, but I get one line per year instead of
one line per region.
SELECT
PART_ID,
REGION,
CASE Rep... more >>
query where Case sensitive
Posted by js at 2/20/2006 9:09:20 AM
hi, how to write query is Case sensitive?
select * from tb where fd like '%Temp'
will only return not "temp" ones? Thanks.
... more >>
need help- case...when not working
Posted by Mad Scientist Jr at 2/20/2006 9:03:17 AM
I am getting the error
Incorrect syntax near 'fValue1_precision'.
from the stored procedure below
Can someone see what is wrong?
Thanks
....
@MyField3 float(8)=NULL,
@MyField3_precision int=NULL,
....
SELECT
MyTable.[ID],
... more >>
Collation Conflict
Posted by Petet Tickler at 2/20/2006 7:45:26 AM
I am trying to move my system from SQL Server 7.0 to SQL Server 2000 and I am
getting a "Cannot resolve collation conflict" on query which joins a table
and a view.
The relevant field in the table is defined thus:
[ST_ACCOUNT] [varchar] (8) COLLATE SQL_Latin1_General_CP1_CI_AS NULL
and... more >>
One for the advanced programmers!
Posted by S Chapman at 2/20/2006 7:07:23 AM
I have a string column but I need to check if it contains any numeric
data ( in a WHERE Clause).
I did the following without any success
WHERE CONVERT(int,geocode) > 0
Gives an error as soon as it finds any non-numeric data.
Thanks
... more >>
using IN()???
Posted by Kjell Brandes at 2/20/2006 6:53:27 AM
Hi all.
Having a problem with function returning a string containing 'int, int,
int....' and so on, I want to use this string to compare with a column
declared as int
ex.
SELECT * FROM TBL_NAME WHERE INT_COL IN(functionName(arg))
Any ideas on how to "deInt" this string?... more >>
Loop / Cursor help
Posted by woodfoot at 2/20/2006 5:40:28 AM
Having a brain cramp here and don't know where to start. I have 2 tables:
vehicles and vehicle_useage. What I would like to do is this:
For each distinct vehicle in the vehicle table, I want to make entries for
each day of the month taken from a given date. This routine will be
scheduled... more >>
Outloook 2002 & SQL Server 2000
Posted by maxzsim via SQLMonster.com at 2/20/2006 4:57:02 AM
Hi ,
I am running SQL server 2000 sp3a and MS Outlook 2002. I have created the
profile and tested it within mail from the ontrol panel which i can received
the email.
From SQL Server , i assigned the profile "Test" to SQL Mail & SQL Mail Agent
and click on the test which said "Successfully... more >>
what's up with SQLCLR then
Posted by BJT at 2/20/2006 3:49:27 AM
when I try to deploy a managed SP or UDF to a SQL 2005 server (my local
machine) I get the error:
"Error: Failed to initialize the Common Language Runtime (CLR) v2.0.50727
with HRESULT 0x80070005. You need to restart SQL server to use CLR
integration features."
I've run "sp_configure 'clr en... more >>
generate performance-column
Posted by manfred_d NO[at]SPAM iname.com at 2/20/2006 3:32:10 AM
It seems to be a easy problem, but I haven't solved it.
I have the following table with two columns:
date, price
2005-1-1, 4.000
2005-1-2, 4.400
2005-1-3, 4.600
2005-1-4, 3800
2005-1-6, 4000
I'm looking for a sql-procedure which generates a new table with a new
price-series. This proced... more >>
Read file info via Transact SQL....
Posted by len at 2/20/2006 2:37:09 AM
Hi there.
Any ideas how I could go about getting a file's "Created" date/time into a
datetime variable using T-SQL? I'm thinking along the lines of using the
results of a call to xp_cmdshell but as to what command I should call....
well...
Any help would be appreciated!... more >>
BCP out contains unwanted NULL(0x00)
Posted by Yuting Kuo at 2/20/2006 2:16:01 AM
My batch file calls bcp out to produce a |-delimited CSV file. The
problem is bcp seems to insert a null character (0x00) if the field is
empty, but I want the empty field to be output as is:
|0x00| <--- bcp output
|| <--- desired output
There doesn't see to be any option in bcp to stop thi... more >>
Stored procedure parameters are missing when debugging in query analyzer
Posted by zone51 NO[at]SPAM walla.com at 2/20/2006 1:52:56 AM
I have a stored procedure with input parameters.
When I try to debug it in Query Analyzer I don't see the input
parameters.
In other databases on that server i am able to give the input
parameters for the stored procedures when i click on debug.
It is something with security or permission... more >>
is there no way ?
Posted by prabodhtiwari NO[at]SPAM gmail.com at 2/20/2006 12:50:36 AM
is there no way i could retrieve value from a trigger variable to my
dataset
i mean ive been on it like a hound for two days and not a single
article or post that really helped me.
heres what i have understood till now.
ALTER TRIGGER lastserial
ON dbo.master
FOR INSERT
AS
begin
selec... more >>
Unable to connect to database via webservce
Posted by Saira at 2/20/2006 12:25:47 AM
Hi all
I have taken on a project from another developer and am experiencing some
problems.
To give some background, the application was running smoothly (client talks
to web service, web service goes to database, web service returns data,
client displays data).
We then upgraded to SQL Serve... more >>
Does SQL Server creates some temporary table during query execution?
Posted by Pushkar at 2/20/2006 12:00:00 AM
Hi,
I want to know when does SQL Server use temporary tables for query
processing?
Does it use for all queries or for some complex queries? Or doesn't use at
all?
Thanks
Pushkar
... more >>
|