all groups > sql server programming > april 2004 > threads for saturday april 3
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
parameter passing via global temp table with unique name
Posted by toylet at 4/3/2004 11:13:51 PM
Is there an easy to pass a result set (ie a table) from one stored
procedure to another via a uniquely named ##global_temp_table? Or is
there a better method?
The reason to use a uniquely named table is because the stored procedure
would be called by multiple parties. SO a fixed table nam... more >>
addressing a table indirectly
Posted by toylet at 4/3/2004 11:10:36 PM
How could I do something like this without dynamic SQL?
declare @table_name="shippers";
use northwind;
select * from @table_name;
--
.~. Might, Courage, Vision. In Linux We Trust.
/ v \ http://www.linux-sxs.org
/( _ )\ Linux 2.4.22-xfs
^ ^ 11:08pm up 8 days 15:22 lo... more >>
recordset and store.. some problems
Posted by Carlo at 4/3/2004 7:28:03 PM
hi
this is my code
rec.Source = "cins_event " & "'" & evDate & "'" & "," & rLat & "," & rLon
rec.Open
rec.MoveFirst
CREATE PROCEDURE cins_event
@time as datetime,
@lat as real,
@lon as real
AS
INSERT boll (etime,lat,lon)
VALUES (@time,@lat,@lon)
SELECT @@identity as id
GO
when ... more >>
insert rows : generating sequence numbers
Posted by John A Grandy at 4/3/2004 6:03:09 PM
Regarding generating sequence numbers ...
I need to create Table2 based on Table1.
Table1 contains some rows where Table1.Col1 char(7) matches the pattern
'555mmmm'
but 'mmmm' is not an increment-by-1 sequence (sample data : '5550001' ,
'5550017' , '5550100' )
I need to insert one row ... more >>
Please help me populate a table
Posted by Learner at 4/3/2004 1:13:30 PM
Hi,
I have a table called TIME and it contains the following columns:
1. TimeID
2. TheDate
3. Year
4. MonthName
5. QuarterOfTheYear
6. DayName
7. IsWeekEnd
Currently I have about 10,000 rows in my table and only the Date field
contains values. What I need help with is how to popul... more >>
optional parameters in stored procedures ?
Posted by Chris at 4/3/2004 11:50:14 AM
Hi,
I have a stored procedure :
CREATE PROCEDURE sp_MySelect
@ID int,
@city varchar(6),
@ccountry varchar(6)
AS
SELECT * FROM MyTable
WHERE
(ID = @ID or (@ID is null))
AND (City = @city or (@city is null))
... more >>
redirect output
Posted by toylet at 4/3/2004 11:31:16 AM
could I redirect the output of a stored procedure (for example, `execute
sp_lock`) into a #temporary_table?
--
.~. Might, Courage, Vision. In Linux We Trust.
/ v \ http://www.linux-sxs.org
/( _ )\ Linux 2.4.22-xfs
^ ^ 11:28am up 8 days 3:42 load average: 1.00 1.00 1.00... more >>
Uniqueness
Posted by RM at 4/3/2004 11:23:45 AM
Hi
I've 2 tables with following structures in SQL Server 2000
and want to check the uniqueness values of number1 and number2
between these 2 tables,for example if 101 is inserted in
table "recept",it should be checked that it can not be inserted into table
"isue" by user and visaversa.
(I s... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
returning @@RowCount
Posted by Shaul Feldman at 4/3/2004 10:17:03 AM
Hello,
I'm trying to receive from my stored procedure a ReturnCode that will =
actually represent the number of select records in select query. For =
instance,
alter procedure stp_Family
(
@FamilyName char(50),
@cnt int =3D -1 output=20
)
as
select *
from=20
tblCust
where=20
c... more >>
Character Selet
Posted by RS at 4/3/2004 9:21:02 AM
I have a record that contains a field (MajorKey) which stores multiple alphabetical characters (A,B,D,E...). I am trying to build a query that would select that record if it finds one of the alpha characters in it such a "D" in the field (MajorKey). How can I do this?... more >>
cursor instance
Posted by chris at 4/3/2004 8:41:02 AM
hello
if i create a cursor in my stored procedure and several instances of that procedure is running will the cursor names be conflicing
... more >>
SQLSum\Help
Posted by JR at 4/3/2004 8:03:34 AM
Below is the sql statement I am using to get my qty onhand and total
cost, associated to the records in the qtyonhand, records from different
tables.
the table structures are:
inv
itemid
receipts
receiptid itemid qtyrecvd recdate modifieddate
issues
issueid re... more >>
Cell auto expand
Posted by Mark Goldin at 4/3/2004 6:12:54 AM
Can a cell auto expand vertically when I type text into it?
I mean when it goes to the next line I want the whole row to adjust to show
new text line.
Thanks
... more >>
save data to sql data tables
Posted by sachin7ul at 4/3/2004 1:01:07 AM
I am using sqldataadpert and saving some data rows to sql table using Update command on sqlDataAdapter
My dataset is having several hunderd rows and i am saving them .... it takes lots of time for saving since no of rows are huge.. Can better way of doing it so that I can get faster performance?... more >>
|