all groups > sql server programming > april 2005 > threads for wednesday april 13
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
find tables
Posted by js at 4/13/2005 10:52:16 PM
hi, how to find the user table begin with "abc"(abcTB1, abcTB2...) use
query?
... more >>
bcp api and error handling
Posted by Stephen Davies at 4/13/2005 7:27:02 PM
I have implemented a VB.NET application which uses the ODBC BCP api to bulk
insert data into a Microsoft SQL 2000 database. I have included error
handling as it is important to trap and log any errors when they occur. The
import works fine, and the error handling works fine for any ODBC errors... more >>
Help with sql script
Posted by ishaan99 via SQLMonster.com at 4/13/2005 7:18:28 PM
I am in the process of writing a script which gives me all database details
ona server. I am trying to get this work on multiple servers when i have a
linked server set up to all my other servers. Somehow since i have an
insert in a cursor that deosnt work when a linked server is used as it
sho... more >>
Server Explorer Timeout
Posted by Brad McDonald at 4/13/2005 6:48:01 PM
All commands in Server Explorer timeout after 30 seconds, how do you increase
this limit.
thanks,
Brad... more >>
Problem to check for identical
Posted by Adam K at 4/13/2005 6:14:01 PM
Hi friends,
First of all sorry for my english.
I'll be very happy if someone can help me.
I am doing web page with vb.net and sql server, the problem is with
registration.
I am using user name and password which the user can set. The problem is
that if I already have user with user n... more >>
Inserting into an ErrorLog table from within a transaction???
Posted by Verizon User at 4/13/2005 5:09:16 PM
Hey all,
I have a question about ms sqlserver 7 that I was hoping for some help
with...
I want to create a transaction that will process a group of rows... as part
of this process, it will validate the values in those rows and update
several related tables.
During the processing - wi... more >>
Update and Output problem in Stored Procedures
Posted by Bruno N at 4/13/2005 5:04:07 PM
Hello All,
strConSituacao is not getting the new value when i update it :( Is there a
way to fix this line ` @NotaSituacao = strCONSituacao = ` ) ?
Thank you all,
Bruno N
ALTER PROCEDURE dbo.[Estornar Conta]
(
@ContaID As Integer,
@NovaSituacao As VarChar(50) = null O... more >>
Selecting from a table in a different database
Posted by Carl Imthurn at 4/13/2005 4:58:15 PM
I need to select from a table in a different database than the one where the stored procedure doing the selecting resides.
Fairly straightforward: SELECT col1, col2 FROM Database2..MyTable and so on . . .
Here's the catch: the stored procedure doing this gets executed by hundreds of users (studen... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
Summarizing/Sorting Data
Posted by stjulian at 4/13/2005 4:45:48 PM
I have a table of values that I wish to get a sorted summary. Fields 1-3
vary in value and may be null. I have tried UNION SELECTs but I keep getting
a list of each 3-column variation. At this point, I'll seven settle for it
not being sorted.
What I would like to do is take values like this... more >>
Query Question
Posted by Steve Schroeder at 4/13/2005 3:43:41 PM
I have a query that includes several tables. A value may not exist in a
related table, but because my Where Clause needs to include criteria from
that related table...I get no results. Any way around this? Am I making
sense?
Here is a sample of what I'm doing:
Select mmatter From matter
In... more >>
question about how to access column/field information
Posted by Richard at 4/13/2005 3:29:23 PM
Hi,
I am just starting out in SQL Server and, as always, I am throwing myself in
at the deep end by trying more advanced things. I understand the basics like
INSERT, DELETE, UPDATE, SELECT etc What I am trying to do is pass some kind
of SQL object to a function which will then extract the... more >>
mutiple selections
Posted by Hrvoje Voda at 4/13/2005 3:04:05 PM
I have selected more then one user.
I would like to insert it into table but with only one insert into table...
Is there a way to do it exept with For Next Function?
Hrcko
... more >>
copy tabes?
Posted by js at 4/13/2005 2:56:01 PM
Hello, I have one set of tables (AMembers, AOrders) and have reference,
constrains between them.
How to make a copy of to (BMembers, BOrders) or (CMembers, COrders)? Please
advance.
... more >>
Querying Hierarchical structures
Posted by Duncan M Gunn at 4/13/2005 2:43:04 PM
Hi,
I have the following table structures:
Department: (Hierarchical - use CalculatedPath and LIKE to easily query the
children of a given department)
ID Name CalculatedPath
1 A A
2 A1 A\A1
3 A2 A\A2
Actions:
ID Name DepartmentID
... more >>
Why is EM SOOOO RETARDED!!!
Posted by Mike Labosh at 4/13/2005 2:37:40 PM
In addition to the need to vent, I thought I'd pass this along to save the
rest of you the same torturing bloodshed, should you bump into this.
I have this view:
SELECT cmrp.SampleSourceArchiveKey, cmrp.SampleSourceKey,
cmrp.CompanyLocationKey, cmrp.Rank, cmrp.CompanyName, cmrp.CompanyAddre... more >>
Several update trigger on same table ?
Posted by guhar1 NO[at]SPAM yahoo.com at 4/13/2005 2:15:22 PM
It looks like i have two after update trigger on the same table. Is
that possible? Which one get fired first?... more >>
What is the ampersand for
Posted by guhar1 NO[at]SPAM yahoo.com at 4/13/2005 1:51:36 PM
What is the ampersand char for in front of variables names?... more >>
Returning Multiple Values to a Stored Procedure
Posted by jamiemcc NO[at]SPAM yahoo.com at 4/13/2005 1:09:11 PM
Hello,
I would like to call a Stored procedure (B) from another stored
procedure (A). Stored Procedure (B) returns the results of multiple
select statements. Is there a way to handle these multiple results in
the calling stored procedure (A)?
Procedure A
exec B
--after B is called, i ... more >>
Foreign key ddl fails
Posted by larzeb at 4/13/2005 12:58:56 PM
I am trying to add a foreign key, but it fails. When I check on the
failure using sp_helpconstraint, it does not appear. Where else can I
look?
alter table AddressValid
ADD CONSTRAINT FK_AddressValid_UseCode
FOREIGN KEY (CountyCodeFips, UseCodeID) REFERENCES
UseCode(CountyFipsID, UseCodeID)
... more >>
Problem Creating SP
Posted by Wayne Wengert at 4/13/2005 12:49:44 PM
Thanks to some help from this NG I now have a query that works in
identifying duplicates in a selected table. Now I am trying to build a
stored procedure so that I can automate the testing of multiple fields in
several tables. I am building the query using dynamic SQL and when I execute
it I get... more >>
Group by problem I think.....
Posted by doc at 4/13/2005 12:39:11 PM
Hi,
I have a table called Eyeballs.
Within it I have the following fields.
EyeballID
CustomerID
EyeballDate
Price
Width
Lenght
I need to extract a list of all customers latest eyeball.
I have tried various group by statements but cannot seem to nail it.
Any help much appreciated.... more >>
Blank vs. Space
Posted by Steve Deering at 4/13/2005 12:03:49 PM
Hello, it seems to me that T-SQL is having a hard time
distinguishing a blank from one or more spaces. When I run
the statements below, the SELECTs always give 1
as a result. This seems completely wrong to me.. or am I
missing something?
CREATE TABLE TempTable (Value VARCHAR(10))
INSERT ... more >>
Estimated Execution Time
Posted by DMP at 4/13/2005 11:32:39 AM
Hi,
Is it possible to know the Estimated Execution Time of a stored procedure
before actual execution from VB/SQL Server Application ?
... more >>
Normalization and sales levels
Posted by DWalker at 4/13/2005 11:04:17 AM
When certain purchases are made, the commission rate depends on the size
of the purchase. We get data from an external source that shows the
expected commission rate, depending on the size of the purchase.
The commission rate/sales level data comes to us in an Excel file, and I
need to c... more >>
Error Calling SQL Stored Procedure from Access
Posted by Joe Williams at 4/13/2005 10:52:31 AM
I am getting an error when I try to call a stored procedure from Access. The
error is as follows: "[Microsoft][OBDC SQL Driver][SQL Server] Invalid
length parameter passed to the substring function."
It has been working fine for months until yesterday, with no code changes
being done. I tho... more >>
get resulset from stored procedure
Posted by Alfonso at 4/13/2005 10:40:24 AM
Hi all!
I have one stored procedure than returns a resulset (select). I want to
execute this in other stored procedure and get the resulset.... How can i
get it?
TIA
Alfonso
... more >>
Drop Database
Posted by Joaquim Meireles at 4/13/2005 10:39:24 AM
I want to drop a database but there are still users online from several
computers.
Is there any way of deleting it???
... more >>
THE GREATEST NEWS EVER! °º·._._.·º°`°º·._._.·º°`°º·._._.·º°`°º·._._.·º°`°º·._._.·º°`°º·._._.·º°`°º·._._.·º°`°º·._._.·º°`°º·._._.·º°`°º·._._.·º°`°º·._.
Posted by RonGrossi_38_2508 NO[at]SPAM yahoo.com at 4/13/2005 10:37:49 AM
The Greatest News Ever!
http://groups-beta.google.com/group/alt.politics.bush/browse_thread/thread/=
f9b35b05a72da1e1/66f1a43881a0fe82#66f1a43881a0fe82
=B7._._.=B7=BA=B0`=B0=BA=B7._._.=B7=BA=B0`=B0=BA=B7._._.=B7=BA=B0`=B0=BA=B7=
.._._.=B7=BA=B0`=B0=BA=B7._._.=B7=BA=B0`=B0=BA=B7._._.=B7=B7._._.... more >>
set vs. select
Posted by Keith G Hicks at 4/13/2005 10:36:34 AM
Can someone explain when and why to use one or the other?
Declare
@x as int,
@y as int
Set @y = 1
Set @x = @y + 1
or
Select @y = 1
Select @x = @y + 1
Both of these work. What's the difference? I see people use both almost
interchangeably.
Thanks,
Keith
... more >>
Using Robust Plan or Keep Plan Options
Posted by Marcos Flávio de Oliveira at 4/13/2005 10:21:40 AM
I have a big update command. When i try execute it appear the error: "Cannot
create a worktable row larger than allowable maximum. Resubmit your query
with the ROBUST PLAN hint.".
I tried change including the clause "OPTION (ROBUST PLAN) but it failed.
Appeared the error: "Warning: The query pro... more >>
How to assign string value to TEXT output parameter of a stored procedure?
Posted by Thilo-Alexander Ginkel at 4/13/2005 10:02:34 AM
Hello,
I already posted this in comp.databases.ms-sqlserver but am also trying
my luck in this newsgroup as it seems to be better frequented. I will
let you know if I receive a solution in c.d.ms-sqlserver.
Currently I am trying to assign some string to a TEXT output parameter
of a store... more >>
Help wit Query to list duplicates
Posted by Wayne Wengert at 4/13/2005 9:44:11 AM
I am trying to create a list of those cases where a specific field value was
duplicate with a set of rows. The query I am trying is shown below (it is
listing all rows instead of just those where there is a duplicate value in
the field Eqp1Voc.
ID is an unique key for each row.
What did I o... more >>
BCP to comma separated Quote surround text file.
Posted by Roger Twomey at 4/13/2005 9:43:08 AM
I have a need to export (regularly) a large table. I need to export to a
comma delimited file with quote surrounds around text fields (or all fields
for all that matters).
I can export the data with no problem, I can't figure out how to get the
quote surrounds however.
Here is what my bc... more >>
Distinct for different columns
Posted by E B via SQLMonster.com at 4/13/2005 9:39:54 AM
Hi everebody.
I need your advice, suppose i have 4 colums
col1, col2, col3, col3
e.g.
col1 | col2 | col3 | col4 |
aa | 1 | 3 | 4 |
aa | 1 | 2 | 1 |
bb | 2 | 2 | 1 |
cc | 3 | 2 | 1 |
so on ...
i need to distinct col2 so i my result se... more >>
Help with Horizontal View for Vertical Data
Posted by Rob at 4/13/2005 9:29:45 AM
I need to create a horizontal view for a vertical table. The result should
look as follows...
Only TableType A should be considered, B should be ignored...
KeyValue Column1 Column2 Column3
123 25 48 99
789 96 259 458
Table structure ... more >>
Trigger on View is not fired
Posted by Martin at 4/13/2005 9:29:26 AM
Hi,
I write a trigger instead of update on a view, which is only a "select *
from T_PRODUCTS"
But this trigger is not fired, when I change data in the view. The trigger
had only the line RAISERROR(...).
Following is the trigger:
CREATE TRIGGER V_Product ON [dbo].[V_PRODUCTS]
INSTEAD O... more >>
string functions not found
Posted by Keith G Hicks at 4/13/2005 9:15:55 AM
There are 2 functions I need and can't find in the string functions section
of SQL 2000. I can write them myself as UDF's, that's not a big deal, but
I'd rather use built in if they exist. So I'm just asking if they are in SQL
2000 anywhere and if so where?
1. a function that would find the nu... more >>
FK "this or that" case best practice
Posted by David J Rose at 4/13/2005 8:11:09 AM
If I have a table that can either have a FK to one table or another, what is
the best way to design it?
eg.
create table template
(
id int not null primary key,
description varchar(50) not null,
roleId int null references role(roleId),
userId int null references user(use... more >>
return @count rows from SP
Posted by David J Rose at 4/13/2005 8:03:05 AM
Is there a way to limit the number of rows returned by a SP, where the limit
is a @parameter?
Similarly, can the next x rows be returned by passing a @startIndex and
@Count?
I can see how it could be achieved with a IDENTITY column, but only if not
deletes occur. Otherwise, I am at a los... more >>
subquery in FROM
Posted by kamel at 4/13/2005 4:41:31 AM
Is it possible to use two subqueries in T-SQL?
example that does not work:
select
tt.mm,
rr.nn
from
(select 5 as mm) as tt
JOIN
(select 6 as nn) as rr
TIA,
Kamel
... more >>
Granting Permissions to a stored procedure
Posted by Malachy O'Connor at 4/13/2005 4:35:09 AM
I have a stored procedure sp_LogError that it self executes the
xp_cmdShell procedure.
When I execute the procedure using a 'normal' acount with only public
acces to the database i get an error:
EXECUTE permission denied on object 'xp_cmdshell', Database 'master',
owner 'dbo'
sp_LogError is ... more >>
To find the number of connections an application is making
Posted by balacr NO[at]SPAM gmail.com at 4/13/2005 4:08:36 AM
How can I find the number of connections a client application
makes to my database?
... more >>
Single table containing multiple "virtual tables"
Posted by Scott Marquardt at 4/13/2005 2:07:04 AM
I'm using a single table to store "virtual tables", whose fields are stored
as rows in a data table. Records (virtual fields) are added by VBS scripts
that require varying numbers of fields with differing kinds of data.
Therefore, the scripts use a fieldmap table (schema) to determine their
inse... more >>
|