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 TouchToneTommy 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: cfw2
  • Content: Threads
  • Order by date
  1. cfw2

    datetime field with a getdate() default

    I have a stored procedure that runs nightly, called by a batch command on my database server. The procedure logs everything it does into a log table: create table log_tab ( logdate smalldatetime ,logevent varchar(200) ) both fields are populated through the procedure as such: insert...
  2. cfw2

    More Efficient Trigger

    Hello, I am adding a trigger for a table that updates a "status" field on the table being updated, as well as the update ID and update date. In addition, I need to log the updates in a separate table to track all changes, not just the most recent. Here is what I have. This works, however I...
  3. cfw2

    Importing a Flat File with records importing sequentially

    I am trying to import a flat file into a new table and I need the records to insert into the table in the same order they appear in the file. There are about 30,000 records total, and I think they start getting out of order in the 20,000 or so. I am importing the file into a 1 column table...
  4. cfw2

    Need help with a more efficient cursor

    I am trying to run the below cursor to sequentially number the records for each "rectype" in a transaction each starting at 1. The problem is this took 35 minutes to run on my sample of 46,000 records. I could potentially have over a million at a time in production. Thank You in advance for...
  5. cfw2

    image data-types

    I have a table that has approx 14,000 records in it. 2 of the fields are image fields. The table takes up more than 8 gigabytes, and the database has only been in production for 3 months. Data will be retained in the table for close to 5 years. I am trying to identify which records have the...
  6. cfw2

    record size in table

    does anyone know of a way to identify the size of a or each record in a table? I have a table that is used as a central storage place for different types of files. There are 2 fields in the table that are image datatype. I am able to identify the size of the table, I would like to go into...
  7. cfw2

    help with a query - count(distinct x)

    I am trying to perform a count distinct, however I would like to count a distinct grouping of columns like so: select count(distinct field1) ,count( distinct field1, field2) from x anyone have any ideas? thank you, cfw2
  8. cfw2

    group by clause in a where exists subquery

    I am running a query similar to the one below, and it is not providing the information that is needed. select tdate ,store ,register ,cashier from table1 where exists (select 'x' from table2 where table2.tdate = table1.tdate and table2.cashier = table1.cashier and...

Part and Inventory Search

Back
Top