Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. rtdvoip

    Help- function not returning my value- why

    Can someone shed some light on this and tell me why when I do an 'exec rtd_voip_ret' in a query window that I do not get a return value? When I run it ouside the function it works fine. Create Function rtd_voip_ret () Returns varchar(20) as begin Declare @next_id varchar(20) set @next_id =...
  2. rtdvoip

    LDF file management Question

    Hiya Fellas, Can anyone shed some light on how I may backup/delete the LDF data file on my database that has grown to be about 1.4 Gig. I have tried serveral options but no go. Thanks in advance for the help, rtdvoip
  3. rtdvoip

    inserting from 1 sql server onto another

    Hiya fellas, is it possible, and I am somehow sure it is, to do an insert from a sql database on 1 physical server onto another seperate physical server? If so could someone shed some light on how it may be done. Thanks in advance for your help. rtdvoip
  4. rtdvoip

    how can i get only 1 select from a subquery in a function.

    My problem is as follows, My sub query in the update of @rate_hier is returning multiple values. I only need on value returned at a time. If i try to do a simple join i still get multiple values. Any thoughts on how I can get around this? code... [code/] Create Function fn_AtoZ_Prices(...
  5. rtdvoip

    Setting a table for write abilities

    What is the quickest procedure for setting a table to be read-wite? thanks in advance, rtdvoip
  6. rtdvoip

    can I use a global var. in a query with several batches?

    I did not set it up in a SP = SQL Procedure? just in a text query that I import into the query analyzer where I want to run it. If I try to create a procedure then the code after the first go is missing.
  7. rtdvoip

    can I use a global var. in a query with several batches?

    Hiya fellas, Is it possible to set a global variable that will remain until a second batch query is executed... delcar @@var int set @@var = <something> go query.. go query... It says that the var is not declared. Is there some way around this? thanks in advance for your help, rtdvoip
  8. rtdvoip

    How do i update 1 field by using 3 tables?

    Here is how I was able to resolve my situation. Thanks for all the help. -- code follows below-- create procedure bill_amount as create table #temp (voip_id varchar(128), amount money); insert into #temp (voip_id,amount) select voip_id,sum (call_cost) from services,bt_test where...
  9. rtdvoip

    How do i update 1 field by using 3 tables?

    I used a temporary table to handle the problem. so if you read this, when do temporary tables get released?
  10. rtdvoip

    How do i update 1 field by using 3 tables?

    hiya fellas, Can anyone help me with this? I need to get current costs into the customer_record table. Three tables 1 - customer_record 2 - Services 3 - traffic Customer_record has a unique pin:voip_id and current_bill Services has: voip_id associated with multiple...
  11. rtdvoip

    Insert Into - can it work faster

    Is there anyway for this to be enhanced so that such a query will run faster in SQL? ----code below---- Insert Into bt_tmp(Clarent_pin, service_code, duration, bill_type, phone_number, start_time, disconnect_reason, extended_reason_code, ip_addr_egress...
  12. rtdvoip

    using MAx

    It is all string compares not integer. I will look into the soundex as well. thanks.
  13. rtdvoip

    using MAx

    Is there a way to use MAX in the following situation? I have a string '902124543456' I need to get the closest match in a table with a known index. ex. '902124543456' - compare value table values index prefix 1 90 1 90 1 90212 any thoughts...
  14. rtdvoip

    How can I step through a table.one by one

    Good Monday, AS I have shown the database program and the computing is correct, I greatly realize SQLSister's reply. I am running my program against 5000 records and it is taking 3 minutes. As I was going to now try a hash table, I am wondering if I can. If I create a hash table with Pin...
  15. rtdvoip

    why is my loop not looping?

    Ok it is late in the day but can someone help? declare @x int, @prefix char(30) declare @breakout_no char(10) set @breakout_no = '19999999' set @prefix = '' set @x = len(@breakout_no) print @prefix while @prefix <> @breakout_no begin print @x set @breakout_no = substring...
  16. rtdvoip

    How can I step through a table.one by one

    LogicalmanUs I just about have it working. now all i need to do is revisit my string manipulation problem from yesterday. It was not what I was thinking. It works ok if you set the @variables but I need to get the call_price from the rate_plan table by using the rate_plan_index that I have and...
  17. rtdvoip

    How can I step through a table.one by one

    dmhirsch It is almost exactly what I did...check this out. GO Declare @pin varchar(128) Declare @duration int,@r_r_indx int,@billing_factor int declare @duration_factor int, @duration_factor_comp int DECLARE clarent_cursor CURSOR FOR SELECT Clarent_pin, duration FROM b_t_cp2 ORDER BY...
  18. rtdvoip

    How can I step through a table.one by one

    Everything was steping through fine but now that I am trying to [code] update traffic [code] set duration=@duration [code] where CURRENT OF clarent_cursor I am getting the following error... Server: Msg 16929, Level 16, State 1, Line 51 The cursor is READ ONLY. The...
  19. rtdvoip

    How can I step through a table.one by one

    SQLSister, Thanks for the info on performance. I just need something to show on Monday. It is not on a live system but just an example of how the database will function. rtdvoip
  20. rtdvoip

    How can I step through a table.one by one

    LogicalmanUS Here is what I have put together so far. It is stepping through but now I need to do some other computations. I suppose I need to do these computations whhile in the while @@FETCH NEXT = 0. Any suggestions? /* Begin code for Fetch */ USE phase1billing GO Declare @pin varchar(28)...

Part and Inventory Search

Back
Top