all groups > sql server programming > august 2006 > threads for friday august 11
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
DBC to SQL Server
Posted by Nick at 8/11/2006 11:35:33 PM
I have a database in VFP. How to generate a database in Sql Server with same
structure? Is there any tools?
... more >>
Stored Procedure Help
Posted by Mike Voissem at 8/11/2006 10:01:01 PM
I'm trying to attempt to tie promotion information to orders based on dates.
So, if someone received an e-mail promotion of 1/1/2006, 2/1/2006, and
3/1/2006 and ordered something on 2/5/2006, I want to apply the e-mail
promotion from 2/1/2006 to the order. Below is the only way I could come ... more >>
Deadlock at trigger
Posted by alex121 at 8/11/2006 9:28:01 PM
Deadlock at trigger
a trigger need to insert or update record at the other table in high traffic
environments
however, the deadlock happens; ie, a trigger running twice at the same time
want to need to insert record at the table.
i trid to change isolation as SERIALIZABLE or REPEATABLE , ... more >>
EXEC Function........
Posted by Tam OShanter at 8/11/2006 9:12:44 PM
Hello All,
I'm looking to use the EXEC function to execute an SQL Command made up of
concatenated varchar(8000) variables.
I was of the belief that the EXEC function could handle upwards of an 8000
character SQL Statement, however, my statement keeps getting truncated at
8000.
EXEC (@i... more >>
How to analyze SQLProfiler trace result ?
Posted by krislioe NO[at]SPAM gmail.com at 8/11/2006 8:37:34 PM
Hi All,
I plan to run SQL Profiler because my SQL Server 2000 get the users
timed out after running some time, and happen every day.
(see
http://groups.google.co.id/group/microsoft.public.sqlserver.programming/browse_thread/thread/fc287e2b9eb78b92/a05b0496982d258b?lnk=st&q=&rnum=24#a05b0496982... more >>
insert identity and master/detail within t-sql transaction
Posted by miapjp NO[at]SPAM chartermi.net at 8/11/2006 5:55:40 PM
I've looked and looked and can't find the answer (except for ADO).
This has to have been asked before but I can't find the answer. I
need to insert a row, grab the PK (identity column) and then use that
for a child row. There's a foreign key between the two tables on that
PK. I've tried SET T... more >>
query
Posted by tom taol at 8/11/2006 5:10:43 PM
table1 have fields of 1
fld1
aa
bb
table2 have fields of 2
fld1 fldx
aa 1
aa 3
aa 8
bb 1
table3 have fields of 2
fld1 fldy
aa k
aa b
aa c
bb g
i want to make following table using query.
fld1 fldx fldy
aa 1 k
aa ... more >>
Connection options
Posted by simonZ at 8/11/2006 5:01:35 PM
When I create some stored procedure in enterprise manager and then edit the
syntax in sql query analyzer, I always get the folloewing 2 lines in front
of procedure:
SET QUOTED_IDENTIFIER OFF
GO
SET ANSI_NULLS OFF
GO
ALTER PROCEDURE .....
Why?
Because this 2 options are set to O... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
Pull a range of records from a char(8) field
Posted by TCHolzer at 8/11/2006 4:59:11 PM
I need to pull a range of records based on the street number. The number
field is char(8). The problem occurs when a letter was entered in the number
field as well as in 300A, 3505B, etc. Both of the examples below return an
error:
Conversion failed when converting the varchar value '3505A ... more >>
identity not for replication
Posted by Liannekwock at 8/11/2006 4:29:01 PM
Hello,
Does any one know how to alter the column propterty from identity (yes) to
identity(not for replication) via TSQL.
Many thanks,
Lianne... more >>
Hide Result Panel in 05
Posted by Ed at 8/11/2006 4:22:01 PM
Hi,
This could be a very stupid question.
How can I hide/close the result panel in SQL 05 after running the query.
e.g. Select * from ErrorLog
I see the result in Result Panel but I could not find any Tool/Button to
close it.
I remember in 2000 - QA, there is a button on the top right h... more >>
Accounting work days
Posted by zzx375 NO[at]SPAM cox.net at 8/11/2006 3:10:02 PM
If anyone is familiar with the accounting concept of work days, that is
what I am trying to accomplish.
As an example of what I am mean, 9/1/06 is work day 1, 9/2, and 9/3
would both be work day 1 (weekend), 9/4 would still be work day 1
(holiday). 9/5 -9/8 would be days 2-5 followed by 9/9 a... more >>
Saving a word document to a table and retreiving it
Posted by Merdaad at 8/11/2006 3:05:02 PM
Hi,
I am using SQL 2000.
I have a web application (asp file using VB Script) I am trying to find a
way to save a word document in a sql table and then later retrieve the
document and display it in a web browser.
I guess I need to use the image type column.
Via my user interface, I need to... more >>
subquery or cursor needed here?
Posted by Steve Hershoff at 8/11/2006 3:02:56 PM
Hi everybody,
I have a table with three columns-- empno (int, primary key), transtype
(int) and transdate (datetime). I'd like a listing of all empnos that have
identical transtype/transdate pairs, along with the count of how many times
such pairings occur. I'm not so interested in what t... more >>
how to specify criteria for update value of Update query?
Posted by Rich at 8/11/2006 2:27:02 PM
Hello,
I need to update the following table. ID2 is updated to the value of ID1
except if ID1 has a Prefix of 'TCC' that must be replaced with 'SEC'. If ID1
does not have a prefix of 'TCC', then 'SEC' must be added to the ID2 value
plus the value of ID1.
CREATE TABLE tmp1(ID1 varchar(2... more >>
ODBC insert of SQL_TYPE_TIMESTAMP
Posted by LDJ at 8/11/2006 1:16:01 PM
Hi,
I'm trying to insert a time stamp into SQL Server (2005) and can't figure
out the right combination of column type and arguments to SQLBindParameter().
My C code currently looks like this:
rc = SQLBindParameter(hstmt, 7, SQL_PARAM_INPUT,
SQL_C_TYPE_TIMESTAMP, SQL_TYPE_TIMESTAMP, ... more >>
Conversion failed when converting datetime from character string.
Posted by Kyle Thering at 8/11/2006 1:09:50 PM
i am having some problems with a stored procedure that i created its
giving me an
Msg 241, Level 16, State 1, Procedure AS400ImportCSSCT, Line 19
Conversion failed when converting datetime from character string.
error any information would be helpfull, what the SP is sposed to do is
delete all ... more >>
is there a ' combination join' of left outer and right outer join
Posted by SQLken NO[at]SPAM gmail.com at 8/11/2006 11:52:23 AM
I have two tables as follow:
Table1 Table2
StudentID StudentName 6 StudentID StudentName
1 Ken 1
Ken
2 John 2
John
3 Dennis ... more >>
Dynamic Where Clause using COALESCE() question
Posted by glen at 8/11/2006 11:26:01 AM
I have a stored proc with 6 input paramaters, 4 of which I want to build the
where clause. The first 2 work fine, the second 2 when used cause an empty
recodset to be returned. There are no NULL values in any of the fields
concerned. I'm at a loss, I'm also sure it's something basic as this is... more >>
Rowcount
Posted by Rob at 8/11/2006 10:56:01 AM
SQL newbii here. I am working with Reporting Services with an Oracle DB. I
want to know how to determine how many rows are returned in a query. For
example:
select *
from company
How do I get a parameter or something that shows me how many rows the query
returned?
I have seen seve... more >>
Comparing two tables
Posted by gv at 8/11/2006 10:05:37 AM
Hi all,
Trying to compare two tables for Changes and new rows.
I keep getting an error near Where? And is this a correct way of doing this?
SELECT old.*
FROM (SELECT * FROM table1 old
LEFT OUTER JOIN
(SELECT * FROM table2) new
WHERE (CASE WHEN old.col1 = new.col1 an... more >>
Merge tables
Posted by joseph.chewning NO[at]SPAM targacept.com at 8/11/2006 9:48:05 AM
I am trying to merge 12 tables that have 6 columns in common and the
rest are unique to that table. I want to merge them into a table that
has all the common and unique columns. Is there a script or product
that can do this????
... more >>
Cross tab
Posted by Ric at 8/11/2006 9:26:02 AM
I have two tables: Task and TaskType. One Task always has three TaskTypes:
create table task (taskID uniqueidentifier,taskname varchar(20))
create table tasktype (taskID uniqueidentifier,tasktypename varchar(20))
insert into task values
('EC02ED43-265C-47BC-9575-4C62F55A24E3','Documentatio... more >>
Dynamic SQL > 4000 Characters Issue
Posted by RitaG at 8/11/2006 9:11:02 AM
Hello.
I have a Stored Procedure that has a required argument passed to it. This
argument is then used to create dynamic SQL which is then exectued via the
EXEC
statement. I'm using an nVarChar(4000) since nVarChar has a limitation of
4000.
However, my SP has > 4000 characters.
What ca... more >>
ID Column Question
Posted by robken at 8/11/2006 8:47:19 AM
Hi all,
Does anyone know if theres a way to add an identity column into a
SELECT...INTO Query? Either that or can you add one into an existing
table.
Thanks Alot!
Rob.
... more >>
security loophole for the TargetServerRole ?!
Posted by === Steve L === at 8/11/2006 8:41:31 AM
I'm really surprised not hearing anything back about this. to me, this
is a serious security loophole, it allows users to hop servers and
access the databases and info restricted to them and went unnoticed.
is microsoft even monitoing this newsgroup?!
even a simple 'thanks to inform us about t... more >>
Need Query help with JOIN
Posted by mavrick_101 at 8/11/2006 8:11:25 AM
Hi,
I am trying to get rid of an old query which used *= to fetch results from
three tables.
Here is the problem
Table 1
--------
NewsCatid
NewsCatTitle
NewsCatDesc
Table 2
--------
NewsId
NewsCatId
NewsTitle
NewsUrl
Table 3
---------
UserId
NewsId
I am trying to get ... more >>
Variable table name in a cursor declaration
Posted by joseph.chewning NO[at]SPAM targacept.com at 8/11/2006 8:06:35 AM
Hi all,
I have been trying to get this to work but keep getting an error. Can
you use a variable table name in a cursor declaration? Like so:
declare mysub cursor for select SUBJID from @SubTable
If not how can I get around this problem???
... more >>
SSAS - Can it do this?
Posted by Andy at 8/11/2006 7:31:01 AM
Sorry of this is an odd question, but I’m trying to see if SQL Server
Analysis Services can help us out.
Basically we want to recommend products to customers based on
Three random titles that they have rated highly themselves in the last 3
months
Using these 3 titles,
Look at others cus... more >>
Insertion into IBM DB2 from SSIS task
Posted by Faiza Ashraf at 8/11/2006 7:00:02 AM
Hi ,
I am trying to insert data from SQL server 2005 source into DB2 table.
I am using OLEDB command transformation with a connection(successfull) on
DB2 This is the Syntax i am using inside OLEDB command task:
Insert into MMTSTLIB.INTIIF
(IIFDTA)
values
(?)
The query gets parsed suc... more >>
Querying from and xls file all format of data in one field (date,
Posted by pontitt at 8/11/2006 4:36:02 AM
Hello,
I would like to ask how it is possible to make a query in MSQuery that can
retrieve all format of data from an Excel file, ie:
In a spreadsheet I have the following data:
A B C
1 New Worksheet
2 234 23 April
3 Apple ... more >>
tree sort??
Posted by dave NO[at]SPAM bigcompany.com at 8/11/2006 4:00:02 AM
I am unfortunately limited in what i can control in this case. At best i
will be accessing this data using msde with the data imported from an xml
dump from another program... other possibilities are from the same xml
imported to access, or directly with and odbc driver for xml. So stored
... more >>
Is there an eval() function in sql server 2000?
Posted by Steve'o at 8/11/2006 3:25:02 AM
SQL Server 2000 SP4
I would really like to allow users (admin only) to create custom
calcuilation columns by entering the calculation in a field as text eg
calc_1 varchar(100)
calc_1 = ((([col1]+[col2])/[col3])*100)
So the actual calculation is stored as plain text, then the views are si... more >>
Finding "invalid" characters in a string
Posted by Jim Coyne at 8/11/2006 2:40:18 AM
We have a column whose data is suppose to start with a "P" and then contain
7 other digits to make up the entire code. There was no checking on insert
to make sure the code followed these rules. So in order to clean up the
data, we need to find out which codes need to be fixed.
I thought ... more >>
random select a row based a weight column.
Posted by Guoqi Zheng at 8/11/2006 12:39:19 AM
Dear sir,
We have a banner system which we like to show banner based on a weight
assigned to it. The more weight a banner received, the higher possibility
this banner will be selected.
So the table is:
BannerId, Content, Weight.
1 xx22 4
2 xx333 6
So for ev... more >>
SQLPerformance:datavolume over the network per connection?
Posted by mabra at 8/11/2006 12:36:45 AM
Hi All !
I am trying to find the amount of volume of data each connection is
reading/writing. I initially looked into Perfmon, but it does not have
such counters. I am looking for something like "sp_who/2", which give me
this results. With "sp_who/2" I can get only cpu and memory.
Any he... more >>
what is the difference between truncate and delete
Posted by SQLken NO[at]SPAM gmail.com at 8/11/2006 12:03:40 AM
Hi,
i've been using both delete and truncate a table, but don't know
exactly the differences between them.
Thanks
Ken
... more >>
11 Aug 2006 : Custom Sequencing/auto increment for SQL server db/table
Posted by Sham Yemul at 8/11/2006 12:00:00 AM
Hello ,
I am new to SQL server news group, not sure its a right place for my
question.
We need a custom sequencing solution for Patient's OPD no, the number has
two parts Unique Number in financial year and year tag for e.g. 1200/06
where 1200 is unique number in the financial year 2006.
W... more >>
Merge dateranges ?
Posted by KL at 8/11/2006 12:00:00 AM
Is there an easy way to merge overlapping dateranges from several tables ?
Thank you
KL.
... more >>
HOST_NAME() oddness
Posted by CyberDwarf at 8/11/2006 12:00:00 AM
Hi y'all
Does this make any sense??
SELECT HOST_NAME()
gives correct workstation name when run within QueryAnalyzer on my
workstation, BUT....
We have a stored proc which uses HOST_NAME() to store a logon record.
When the stored proc is called from VBA code (we have to pass it a User ... more >>
4 key as primary key.then can't link up to another table as foreign key ?
Posted by calvin at 8/11/2006 12:00:00 AM
bug is studio expess ?
... more >>
|