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: *

  • Users: duchovnick
  • Content: Threads
  • Order by date
  1. duchovnick

    sql server2000 search a table

    Hi, I'm looking for a table which name is, say, "mytable". It is located in one of my databases but i dont know which one. Is there some "search" command to find a table through its name unknowingly its database ? Thanks.
  2. duchovnick

    sql server 2000 - backing up tables

    Hi , This is a "very beginner's question" but i still need help with that. I need to copy a table to a disk or send it to a remote computer via email. Where do i find a "sql server table" on the disk ? What is its extension ? Name ? does it carry the same name given to it in SQL Server on the...
  3. duchovnick

    SQL SERVER 2000 assigning a querry result into a parameter

    Hi, I'd like to assign the number of rows in my table into a parameter like this: DECLARE @myparam INTEGER SET @myparam=SELECT COUNT(*) FROM myTable or DECLARE @myparam INTEGER SELECT COUNT(*) INTO @mypara FROM myTable but both do not work. Is there a third way that works ? Thanks.
  4. duchovnick

    sql server2000 a string that contains digits only

    Hi, In my table there's a string type column. I want it to contain digits only. I want to see all lines with that string having any other character but a digit. I search a code that will do something like SELECT myStringCol WHERE All characters>='0' AND all_characters<='9' "All charcters" is my...
  5. duchovnick

    sql server2000, i try to use function

    Hi, I try to work with functions but i end by working with errors. The following is the code to make a function CREATE FUNCTION aaa (@myDigit INTEGER) RETURNS INTEGER AS BEGIN RETURN @myDigit END and the following is the code calling that function: CREATE PROCEDURE bbb @hisDigit INTEGER AS...
  6. duchovnick

    sql server 2000 finding the decimal value of a number

    Hi ! I'd like to know the decimal value of my number. Say, if i have a "26" i'm looking for the function to return "2". Thanks !
  7. duchovnick

    importing file to an existing file (excel)

    Hi, I want to add to my existing excel page many more pages from variuos files of identical structure. Is there a safer and faster way than "copy-paste" ? thanks.
  8. duchovnick

    sql server 2000, dynamic sql, error message

    hi, i send 2 parameters to my procedure: one for identification (flag), the other is a file's name. I want my procedure to operate a "select" querry including a "where" statement based on those parameters. my code is: /*exec dbo.Dynamic '1','march_3_07'*/ alter PROCEDURE dbo.Dynamic @myparam...
  9. duchovnick

    SQL SERVER2000 A &quot;WHERE&quot; statement under condition

    Hi, In my procedure I have a query where i select the same columns dependentless of the parameter the procedure accepts. What changes is the "where" statement. My procedure looks something like: create PROCEDURE dbo.myproc @myparam varchar(10), @mytable varchar(10) AS BEGIN TRANSACTION DECLARE...
  10. duchovnick

    sql server2000: passing date as parameter to dynamic sql

    Hi, I try to make a procedure within which there is dynamic sql and pass a date as parametert as follows: /*exec myDynamic 2007*/ ALTER PROCEDURE dbo.myDynamic @dyear DATETIME AS BEGIN TRANSACTION DECLARE @dynSQL VARCHAR(2000) SET @dynSQL= ' SELECT lastname FROM contact1 WHERE...
  11. duchovnick

    sql server2000, counting characters in a string

    Hi, I have a string which i want to be displayed only if its' number of characters is greater then, say, five. My code is: SELECT CASE number_of_characters(mytable.mystring) WHEN GT 5 THEN mytable.mystring END can anyone help me with the right code to: ? Thanks
  12. duchovnick

    sql server2000: join querry on one table

    Hi, My table contains rows where husband is located in a separate row from as well as wife. I'd like to create a query of which the results will be husband and wife at one row. Common column is "phone". I write: select a.name , b.name, a.phone from table1 as a left join table2 as b on...
  13. duchovnick

    Thinking of using &quot;front end&quot; language

    Hi, Could anyone give me a recommendation of which language is best for cooperating with sql server 2000? "Best" means: does more then others, being used by more then others. Thanks a lot!
  14. duchovnick

    sql server 2000, problems with dynamic sql

    Hi, I'm having problems with dynamic sql. I have a table which name i send as a parameter to a stored procedure that runs dynamic sql code. I also send a number as a second parameter to that procedure. What i want the procedure to do is to create a new table that would contain as many rows as...
  15. duchovnick

    word: copy a table

    My table is a bit complex with merged cells' all kinds of borders etc.. I'd like to copy it and paste it elsewhere. When i do it the merged cells turn out to be of different size and i get a wrinkled table. Can anyone tell me how to do it right ? thanks
  16. duchovnick

    sql server 2000, adding rows from table1 to table2

    Hi, I'm trying to add records from table2 to table1. Table1 has more columns then table2 (two tables are of different structure) and table2's column names of columns exist in table1 carry different names. I use the following code:INSERT INTO table1(firstname, lastname, city, address1, address3...
  17. duchovnick

    sql server 2000 dynamic sql: passing tables' names

    Hi, The following code works OK /*EXEC dynamic_table create v_9, f_9, 9*/ CREATE PROCEDURE dynamic_table_create @t1 VARCHAR(15), @t2 VARCHAR(15), @m VARCHAR(5) AS BEGIN TRANSACTION DECLARE @myDynamicSQL VARCHAR(900) SET @myDynamicSQL = ' SELECT accountno "accountno", phone1 "phone1", phone1...
  18. duchovnick

    sql server 2000 a missing &quot;commit&quot;

    I wrote a procedure as follows: /*EXEC complete_month_magazin v9*/ /*DROP PROC complete_month_magazin*/ CREATE PROCEDURE complete_month_magazin @table1 VARCHAR(10) AS BEGIN TRANSACTION DECLARE @myDynamicSQL VARCHAR(900) BEGIN IF EXISTS (SELECT * FROM sysobjects WHERE name=@table1)...
  19. duchovnick

    sql server 2000 stored procedur: how do i stop a process

    Hi, I'd like my stored procedure to stop processing when a certain condition is not fulfilled. For example, if a table doesn't exist, i want it to show some message and cease processing. Code should be something like: /*EXEC mysp table1, table2, 9*/ /*DROP PROC mysp*/ CREATE PROCEDURE mysp...
  20. duchovnick

    sql server 2000 dropping tables recieved as parameters

    Hi, I need a stored procedure to recieve 2 table names as parameters and to delete those 2 tables. My code is: /*drop proc deleteTables*/ /*exec deleteTables j_11, j_12*/ CREATE PROCEDURE deleteTables @table1 VARCHAR(10), @table2 VARCHAR(10) AS BEGIN TRANSACTION declare @xxx varchar(200) set...

Part and Inventory Search

Back
Top