all groups > sql server programming > november 2004 > threads for friday november 26
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
Import data from database A to B (with error)
Posted by Agnes at 11/26/2004 6:56:46 PM
I need to import data from A To B ,There is 3 option to choose the "import
type"
(1) I choose option 1, all data are imported succesfully BUT there is no SP
(2) so I choose option 3, imports all object , sp , and some scrpits
Finally, I got an error, it said 'Failed to copy objects from Microsof... more >>
Reestablish broken connection after sleep
Posted by Michael Tissington at 11/26/2004 5:05:56 PM
I have an application on a laptop that runs with several ADO objects open at
a given time (Connection, Recordset etc) - most all use client side cursor.
The database is on another machine.
If the application is running (sitting idle) and the laptop goes to sleep
and then resumes, all the a... more >>
Copying values from ColA to ColB
Posted by Patrick at 11/26/2004 4:51:31 PM
I have a tblMember table with a fldFirstName field. I have now added a
fldNickname field to the table. Is there a SQL command I can run (without
writing a TSQL stored procedure) which would copy values from the
fldFirstname fields of existing records into the fldNickname field?
... more >>
How to filter getdate() to 11/26/2004 00:00:00
Posted by Andreas Klemt at 11/26/2004 3:49:48 PM
Hello,
when I use SELECT getdate() my result is
11/26/2004 13:38:42
What do I have to set to become only the date like
11/26/2004 00:00:00
Thanks for any help in advance
Andreas Klemt
... more >>
Returning a list of records and choosing either one or the other for each record if two matches exist.
Posted by Ken Dopierala Jr. at 11/26/2004 3:36:18 PM
Hi,
I have this procedure:
ALTER PROCEDURE WS_Carrier_GetAutoQuoteListByServiceTypeID
(
@ServiceTypeID integer,
@ShipperID integer
)
AS
Select
*
From
CarrierAutoQuotes
Where
ServiceTypeID = @ServiceTypeID AND
(ShipperID = @ShipperID OR ShipperID = 0) AND
Enabled = 1
... more >>
Copying data from one row to another within the same table.
Posted by Re Fo at 11/26/2004 3:32:20 PM
Hi NG,
I've to copy data from one row to another within the same table:
Example: Row with ID=2 (Type=3) gets the value of row one (Type=3)
ID; Val; Type
1; 4711; 1
2;4711; 3
Do I need an intermediate statement or can I do that within one SQL Call?
thanks for support
... more >>
Executing stored procedures
Posted by Robin Boyd at 11/26/2004 3:21:50 PM
Hi all,
I have run into a problem when executing a stored procedure that has got me
totally stumped, and I hope that some here can help me out.
The senario is that I am populating a set of fact and dimension tables to be
used by an Analysis Server server, to enable parameteristion of the
ap... more >>
Audit trail..
Posted by heruti NO[at]SPAM lycos.com at 11/26/2004 3:16:47 PM
Hi...
A much lamented question, I guess..
I'm trying to create a simple audit trail.
log the changes to an SQL 2000 table, so that they are written into a
mirror table. The entire record, only the updated one, i.e. if say
only one field changes, the audit table will be inserted with one
rec... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
Can't use MDX function
Posted by Paul Pedersen at 11/26/2004 2:50:41 PM
The statement
alter table people add persname as CoalesceEmpty(nickname, firstname) + ' '
+ lastname
returns
Server: Msg 195, Level 15, State 10, Line 1
'CoalesceEmpty' is not a recognized function name.
CoalesceEmpty is described in the documentation as an "MDX function". What
is... more >>
WISH: expression dialog
Posted by Ing. Branislav Gerzo at 11/26/2004 1:54:51 PM
Hi again,
I know expression dialog will be changed, I want also suggest:
there is replace, insert, append button, nice would be copy to clipboard.
Now I must append field, cut it, and paste it in right place_s_.
--
Ing. Branislav Gerzo... more >>
ETL tools
Posted by Arjen at 11/26/2004 1:50:35 PM
Hello,
I need to transfer (copy) and transform data from one database to an other
database.
Now I have hear about ETL tools, maybe someone here can give me some advice.
What is a good, easy to use and graphical, ETL tool?
Do you know the name or internet address?
Thanks!
... more >>
Cannot Import data into SQL Server database from FileMaker Pro 5.5
Posted by marina.sukhnev NO[at]SPAM thinknet.com at 11/26/2004 1:38:37 PM
Hi everyone,
I've got some strange problem,
I need to import file from Filemaker Pro 5.5 into SQL Server
database,using dts package and I'm getting error: "An attempt to fetch
forward has failed for table:XXX. Unknown error. Error in row.
Context: your provider doesn't support all interfaces/... more >>
SQL Server To Oracle
Posted by Robert E. Flaherty at 11/26/2004 12:53:53 PM
I'm looking for a book(s) that will detail how to develop in both SQL Server
and Oracle for the same application. The two-three web page will not do the
trick. I did the bitter details.
In particular, I need to find out how to return a result set from a stored
procedure in Oracle.
... more >>
Cleaning up data
Posted by Munch at 11/26/2004 12:05:04 PM
Here is some sample data.
ID INITIAL NAME SEX HIREDATE STATDATE STA ACT REA ENDDATE
123456 AA SMITH M 19680513 19680513
123456 AA SMITH M 19680513 20030115 A
123456 AA SMITH M 19680513 20030215 A
12345... more >>
Backup Maintinance
Posted by Peter Newman at 11/26/2004 11:43:02 AM
Im trying to set up a Backup Maintiance plan for one of our SQL 2000 Servers.
Using Enterprise Manager i create the backup job, but when trying to run the
Job, it fails with the following error;
'The Job failed. the Job was invoked by User sa'
Any Idea's as to why the jobs are failing... more >>
SQL Variable
Posted by Justin Drennan at 11/26/2004 11:42:39 AM
How would one go about selecting from a table, which is a variable ? The
following query doesnt seem to work:
DECLARE @TableName varchar(255)
SELECT @TableName = 'Table1'
select count(*)
from @TableName1
Will i need to build up a SQL string and exec it?
thanks,
Justin
... more >>
T-SQL BUG?
Posted by Frans Bouma [C# MVP] at 11/26/2004 11:24:24 AM
Hi,
below are 2 queries as a proof of concept. The query represent a
real-life situation in which there is a sortclause based on 2 fields
with the same name in 2 tables. The SQL is generated.
Query A:
SELECT customers.CustomerID as customerid,
customers.CompanyName as companyname
FROM... more >>
Changing Date Format
Posted by Marinus Willemstijn at 11/26/2004 11:04:50 AM
When I run a query on my database teh datefield retunrs a format 2004-11-26
while I require it to be in a format 2004-11-26 for specific interface I am
writign using DTS. I do not want to change teh database date format - How in
a normal select query can I cange the display format of this date fi... more >>
help needed for Query
Posted by Aneesh at 11/26/2004 10:46:33 AM
create table testVisit ( VisiID int identity(1,1), UserID int, VisitCount
int, VisitDate Datetime )
insert into testVisit (userID, visitCount,visitDate)
Values (1, 1, '01-01-2004')
insert into testVisit (userID, visitCount,visitDate)
Values (2, 1, '01-01-2004')
insert into testVisit (userID, v... more >>
VB->SQL: Date Format Problem.
Posted by CJM at 11/26/2004 10:09:40 AM
[Apologies for earlier post - twitchy trigger finger!]
I have a VB6 application that links to an SQL Server 2000 DB (via ADO)
I recently had to change it to add a date field to one of the features,
which although it worked on my development machine, it wouldnt work on the
live system. I norm... more >>
Can you tell me if the SQL SERVER CE 3.0 (2005) is available ?
Posted by Marc Lefebvre at 11/26/2004 10:05:57 AM
Can you tell me if the SQL Server Ce 3.0 is available ?
Thanks
Marc
... more >>
VB->SQL: Date format
Posted by CJM at 11/26/2004 10:03:22 AM
I have a VB6 application that links to an SQL Server 2000 DB (via ADO)
I recently had to change it to add a date field to one of the features,
which although it worked on my development machine, it wouldnt work on the
live system. I normally format my dates for SQL as follows: YYYY-MM-DD, and... more >>
Procedure instancing
Posted by Mal at 11/26/2004 7:55:05 AM
Hi
I just want to know how does it work when SQL runs stored procedures.
When I run a procedure, halfway during the run of that procedure I alter it
with some other content, will I get funny results.
As far as I know, when it's executed an instance is create of it in memory,
and that sp... more >>
Select Statement with using Top and Distinct
Posted by bwalke NO[at]SPAM lbrspec.com at 11/26/2004 7:50:18 AM
Hi All,
I am trying to pull data from a table which tracks each time a user
runs a report. I am trying to retrieve a users TOP 5 most frequently
used reports. However, I would like the TOP 5 that are retrieved to
be distinct. What I have posted below pulls the TOP 5 but it
retrieves duplic... more >>
Sub Query Help
Posted by Paul Ilacqua at 11/26/2004 7:39:12 AM
The SQL below produces the following result set...
SELECT PARTNUMBER, i.LINE , COUNT(*) AS BUILT
FROM INVENTORY..V_BC i INNER JOIN INVENTORY..VALID_LINES v
ON V.LINE = I.LINE
GROUP BY i.PARTNUMBER, i.LINE
PART LINE BUILT
-------------------- ---- -----------
1282... more >>
synatx error
Posted by robert at 11/26/2004 7:23:03 AM
ALTER TABLE mgadr DROP PRIMARY KEY
Incorrect syntax near the keyword 'PRIMARY'.
why????... more >>
Insert SP result into Table (New)
Posted by Pedrito Portugal at 11/26/2004 6:45:04 AM
HI FRIENDS!!!
I HAVE THE THESE TABLES:
--------------------
CREATE TABLE [TBL_SaldoDiario] (
[T_Data] [datetime] NULL ,
[T_Saldo] [numeric](18, 0) NULL ,
[T_C_ID] [smallint] NULL ,
[T_ID] [bigint] IDENTITY (1, 1) NOT NULL ,
CONSTRAINT [PK_TBL_SaldoDiario] PRIMARY KEY CLUSTERED
(
... more >>
Can not make connection while a DTS package runs
Posted by Vince P at 11/26/2004 6:12:35 AM
SQL Server 2000 Sp3a, Windows 2003
In the morning, I have a rather invokved DTS package that runs (It imports a
huge flat file and then does several INSERTS/UPDATES with other tables that
are in the 50,000 row size)
At this time in the morning no one else is using the database. The DTS
... more >>
Stored procedure programming tutorial ?
Posted by SPaquin at 11/26/2004 5:53:03 AM
Hi
I am looking for a stored procedure tutorial somewhere on the web. Ideally,
it would propose best practices for select, insert, update and delete proc.
It would also show error handling. All this in a 30-40 pages document easy to
read. Please help me find this jewell.
I have already looke... more >>
Row data in a column
Posted by John Jayaseelan at 11/26/2004 4:29:48 AM
Hi,
Please select how to put row data in a single column with a delimiter.
For example consider the following data
Col1 Col2
AAA A
AAA B
AAA C
BBB D
BBB E
CCC F
DDD G
The data should be presented as follows
Col1 Col2
AAA A;B;C
BBB ... more >>
Bulk Copy (bcp) comment lines
Posted by Justus at 11/26/2004 12:25:06 AM
Hi,
We use bulk copy (bcp) in a large Swiss Social Insurance Project to import
data from different other software systems.
The 'other' Programs have to provide data in a ascii file for bcp.
(Something like:
D;A;1;567890;0;702;378;Lastname;Firstname;20070511259;19700111;F;3;CH;1;
......
... more >>
|