all groups > sql server programming > september 2003 > threads for monday september 15
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-DMO: SQL Agent Job cannot be found in Job Collection
Posted by Khor Xiang Yi at 9/15/2003 10:32:04 PM
Hi experts,
I am using SQL DMO in my program to call a SQL Server
Agent Job. This SQL Server Agent Job is used to run the
replication process at the subscriber.
Basically my program will:
1. Read the name of the agent job saved in a database
table.
2. Run the above agent job (with the... more >>
Excluding Noise Words from search
Posted by Dino M. Buljubasic at 9/15/2003 10:29:07 PM
How can check if a search phrase contains a noise word and let the user
about it so he/she can do search again without the noise word.
Thanks,
--
Dino Buljubasic
Software Developer
http://rivusglobal.com
... more >>
How can I feed a parameter to a View for use in the where statement?
Posted by jack at 9/15/2003 9:14:48 PM
Hello,
It's me agian.
How can I feed a parameter to a view for use in a where part of the
statement?
This is the view(Thanks to John Gilson), with minor changes by me:
CREATE VIEW dbo.TotalsForLast10WeeksIMP
AS
SELECT S.d AS end_of_week, COUNT(D.IMPCLK) AS weekly_total
FROM ... more >>
Pseudo code advice
Posted by imani_technology NO[at]SPAM yahoo.com at 9/15/2003 9:02:53 PM
My new employer is CMM Level 3. As part of the CMM/Personal Software
Process, I am required to create pseudo code for my stored procedure
and UDF design. Has anyone done this? If so, can anyone give me some
advice?... more >>
Wild card search
Posted by Dino M. Buljubasic at 9/15/2003 8:40:32 PM
I am trying to simulate wild card search like for example:
cran* would return any word containing 'cran' at the begining
*cran would return any word containing 'cran' at the end
*cran* would return any word containing 'cran' in the middle
Here is whay I am doing but it does not work
SEL... more >>
FROM clause in DELETE and UPDATE
Posted by Rob Rutherford at 9/15/2003 8:17:12 PM
Can anybody explain how the FROM clause works when used with
DELETE and UPDATE (or point me to a good explanation)?
While experimenting I tried the following:
DELETE [Order Details]
FROM Employees
JOIN Orders ON Orders.EmployeeID = Employees.EmployeeID
WHERE Employees.EmployeeID = 1
I t... more >>
Named Instance SQL 7 / SQL 2K
Posted by Shamim at 9/15/2003 6:48:46 PM
We have a server by name TEST and SQL 7 installed and exists a login 'xx'
and password 'xx'
Recently we installed a named instance SQL 2K on TEST by name TEST\TEST2K
and with a login 'xx' and password 'abc'
I created an alias for TEST\TEST2K as TEST2K
From TEST, Executed sp_addlinkedserver T... more >>
export through query result
Posted by Sharif at 9/15/2003 6:10:07 PM
Hi everyone,
I need some resources on how to export query result to
excel through query analyzer using T-SQL
I will be very thankful for any help
... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
A SQL Statement
Posted by ɵ±Æ at 9/15/2003 6:05:44 PM
Greeting all,
I want to compare if the content of two tables is the same.
Certainly the two tables have the same structure.
Also I want know which records are in the one table but not in
the other table.
The following steps can help you to setup your test environment.
CREATE TABLE [tes... more >>
A really DUMB question...
Posted by petersen_cp NO[at]SPAM hotmail.com at 9/15/2003 5:16:40 PM
I have 4 tables (AA,MAIN,CC,DD)
Everything that is not in AA but is in MAIN I want put into CC
Everything that is not in MAIN but is in AA I want put into DD
Add everything in DD to MAIN
Clear AA CC and DD
Thanks in advance... more >>
How can I uninstall MDAC 2.8?
Posted by Price Brattin at 9/15/2003 5:02:48 PM
I made the mistake of installing MDAC 2.8 and now my VB6
apps blow up. I want to go back to 2.7. How can I
uninstall 2.8?
... more >>
Query string for connecting to an instance
Posted by Waren Sappe at 9/15/2003 4:51:55 PM
I have an instance of an SQL server called servername\instancename.
How do I pass it to connect to a SQL server from an ASPX page.
The successful string without instance for a server called "servername"
is as follows
Dim ConnectionString As String =
"server=servername;database=Northwin... more >>
SELECT INTO Help
Posted by Scott C. Reynolds at 9/15/2003 4:36:58 PM
Hi all,
I have a table, and I basically want to duplicate all of the rows in the
table into the same table, but changing one field while doing so. I
think I have to use SELECT INTO, but not sure how to form the query so I
can change the one field as it runs
... more >>
Using views to merge data from linked servers?
Posted by Ian Boyd at 9/15/2003 3:29:23 PM
i have some queries that run in less than a second on two servers
individually.
Now on one server, i use Views to UNION ALL the data from a local table and
from the other linked server.
Now the query after 10 minutes complains about something to the effect of
"too many resources used, query... more >>
sql query help
Posted by liz cooper at 9/15/2003 3:22:45 PM
Table A
column id,
column w,
column x,
column y,
column z,
column a,
column b,
column Timestamp
Table B
column m,
column p,
column x,
column y,
column z,
column a,
column b,
column timestamp
I use a cursor to get each of the records from table B and
to fill certain colu... more >>
sp parameter default values
Posted by John A Grandy at 9/15/2003 2:21:59 PM
is specifying default values for sp parameters the same as optional
parameters in other languages?
... more >>
Change names of columns in a view
Posted by d.flakowski NO[at]SPAM megalith-software.de at 9/15/2003 2:21:30 PM
Hello,
I have a table containing 18 columns named Col1-Col18 (I assume the
example a little easier as it really is). Now I have one record in it
with e.g. the following values (NULL means column is not defined / is
empty):
Col1=Test1
Col2=NULL
Col3=Test3
Col4=Test4
Col5-7=NULL
Col8=Tes... more >>
timestamp problem
Posted by Carlo at 9/15/2003 2:13:41 PM
hi
i need to control a timestamp field using php, if i read timestamp the php
cant manipulate the field... can anyone help me??
Carlo
********************************************
... more >>
select only record that match on the left table
Posted by LamP at 9/15/2003 1:59:30 PM
Help please,
I thought if I do LEFT JOIN, it will only pull records
from the left table. I ran this query and I got more
records than I should get. Basically I get duplicated
ssn. I just want distinct ssn.
SELECT a.ssn, b.acct, + other fields
FROM
(
SELECT SSN FROM test
GROU... more >>
Error 1023: What is it and why am i getting it?
Posted by Paul Rhoades at 9/15/2003 1:43:04 PM
Using: SQL Server 2k, Win XP Prof.
Task : Write an SP to extract data from the event table based on the year
and quarter of StartDate ordered by StartDate
Query: Using SQL Query Analyser, the following query generates correctly the
desired result...
SELECT
*
FROM
dbo.Event_Details
WHE... more >>
TEXT DATATYPE, PLS HELP!
Posted by Lori at 9/15/2003 12:50:08 PM
I'm pulling my hair out and I'm hoping someone can help me!
For my table, I have one column that I need to use for
large amounts of text. Whats the best first step? Also,
I don't understand how to use the TEXTPTR.... more >>
searching for perticular records?
Posted by new at 9/15/2003 12:35:22 PM
Hi all
I need to search exact data "ABCED" in any fields and any tables in a
database.
Does anyone have T-sql script to do so?
Thanks in advance.
... more >>
Table Row count ??
Posted by William Orova at 9/15/2003 12:25:16 PM
The question I have today is? Is there a way to extract out of a sys or
shema table the row count for a user table?
I know this can be accomplished through the select count (*) but I need
to be able to view all or several different table at the same time.
Bill
*** Sent via Developersdex h... more >>
Unicode/ANSI in xp_sendmail
Posted by Nikola Milic at 9/15/2003 11:55:19 AM
Hi,
Is it possible to set attached file produced by xp_sendmail to be ANSI
encoding instead of Unicode?
I'm using SS2000 Enterprise edition SP3 on Win2000 Advanced Server SP4
Thanks in advance
Nikola Milic
... more >>
how to use IN clause in query
Posted by Sean at 9/15/2003 11:54:47 AM
I wonder how to combine these 2 queries into 1. First I get the latest
employee record. Then I use SSN and year to get employee's full data. I
tried to use IN clause for 2 fields, but somehow it is not working.
select SSN, max(year) as year
into ##temp
from Employee
group by ssn
order by ... more >>
String manipulation
Posted by GriffithsJ at 9/15/2003 11:18:55 AM
Hi
I have a VARCHAR field called 'location' that contains the UNC location of a
particular file, for example:
'\\myServer\myFolder1\myFolder2\myFile.txt'.
One any particular day, the PATH part will be identical for every row, e.g.
'\myServer\myFolder1\myFolder2\' will be the same for ev... more >>
Problem running SQL script
Posted by SQL_SAM at 9/15/2003 11:12:44 AM
Hi
Please excuse the newbie question.
I am running a SQL script through query analyzer on SQL 7.
It creates a few of the tables but gives me a syntax error
on the keyword 'COLLATE' in the following SQL
The message is 'inncorrect syntax near COLLATE'.
Can you please give me some ideas as ... more >>
Query
Posted by Sean at 9/15/2003 11:12:26 AM
I have an employee table as :
SSN EMPNAME YEAR
---- ---- ----
123456789 Joy J Smith 1999
123456789 Joy Smith 2003
I only want to return employee's lastest year records. My query is:
Select SSN, EMPNAME, YEAR
from EMPLOYE... more >>
Is it faster to delete and insert or update records.
Posted by Charlie at 9/15/2003 10:59:06 AM
Let say I have a table with 300000 records and 20 attributes. Of the 20
attributes there are 10 non-clustered indexes. If I need to update 500
records would it be faster to delete the 500 records and insert the updated
records or just update the existing records?
... more >>
Implicit conversion of datatype - ccollation conflict
Posted by Baris Ergün at 9/15/2003 10:30:37 AM
What coluld be the cause of the following message from the query analyser
for the procedure that does not have any other syntax error...
Server: Msg 457, Level 16, State 1, Procedure trial_sp, Line 143
Implicit conversion of varchar value to varchar cannot be performed because
the collation of... more >>
SOUNDEX Function
Posted by Se archer at 9/15/2003 10:29:26 AM
Hi Everyone,
I have a database table in Turkish character setting. I would like to select
smilar sounding name and surnames from my table using soundex function but;
it returns 0000
for my fields if field has turkish character. For example "çakmak" and
"cakmak" are the same but soundex ignores ... more >>
Nulls and zeros
Posted by Joe at 9/15/2003 10:21:15 AM
Hello all.
I am having a problem with a select query that sums a possibly null field.
Can anyone tell me how to tell SQL Server2000 to treat NULLs as zeros?
eg: Select acct, sum(totalpaid) from paymentmaster group by acct
Thanks for any help you can provide.
Joe
... more >>
question about transaction in cursors
Posted by Mike at 9/15/2003 10:04:48 AM
I don't know if this is a stupid idea,
In my procedure, I have a cursor, in the cursor I have a lot of
transactions, basically,
every row is a transaction, based on the @return_value, if -1 is failure,
0 is success.
I'm not familiar with using transaction in the cursor, I'm afraid that I
c... more >>
Which table design more is correct - more cols/less rows or less cols/more rows?
Posted by Rich at 9/15/2003 9:06:30 AM
Hello,
I want to create the following table
CREATE TABLE [dbo].[tbl1] (
ID int IDENTITY (1, 1) NOT NULL ,
Datefld datetime,
Cat nvarchar (50),
Itm nvarchar (50),
tCount int
)
GO
Data would look like this:
ID Datefld Cat Itm tCount
1 1/1/03 A itm1 3
2 ... more >>
Embed stored procedures?
Posted by Chris Williams at 9/15/2003 8:37:10 AM
I've written some stored procedures that I want to use in my vb.net program.
I know how I can add them to SQL by entering the stored proc as a string and
then use the ExecuteNonQuery command to add them to the SQL server.
However, I was wondering if there was another way to embed them into my vb
... more >>
Group by question.
Posted by Random at 9/15/2003 6:38:06 AM
Hello all. I have a problem trying to run this select statement. I
realize that this is not the proper way to go about doing this, so if
anyone has any suggestions they would be greatly appreciated.
Select Count(Cname), (Case when StHour < 7 then 'Early' when StHour
>17 then late else '' en... more >>
Table data type using
Posted by Sergei Horaskin at 9/15/2003 6:26:43 AM
Hi,
Is it anyhow possible use "table" data type in the stored
procedures parameters list?
For example like this:
DECLARE @t TABLE(i_col INT)
INSERT INTO @t VALUES(1)
INSERT INTO @t VALUES(2)
EXEC my_sp @t
Sergei Horaskin... more >>
Query help
Posted by Peter Newman at 9/15/2003 3:46:10 AM
I am trying to run a query to return the form Name from
Table 1 where the operator in table 2 has security access
ie if the operator ghacs security access 2 & 3 but not
1, then only the formNames that have a security level 2
or 3 should be returned.
can anyone assist me
Table 1
... more >>
Linking database tables
Posted by Paul Simpson at 9/15/2003 2:35:26 AM
Hi,
Apologies if this is thw wrong forum - please advise of
the correct one if so!
In Access, it is possible to refer to tables which are
external to the current database. (Known as linked tables
if you are not sure of what I mean!)
My question is fairly simple, can you do the same wi... more >>
|