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. jdgonzalez

    Multiple transactions in an stored procedure

    Personally, I would suggest using a single sp to perform a teak. Doing it this way allows you to treat the task as a single transaction even though there may be multiple inserts, updates, etc taking place. If insert fails within the sp, you can then rollback the transaction to maintain data...
  2. jdgonzalez

    Doing a ALTER and/or porrible UPDATE for a comma delimited......

    ...or you could also do: update prodTable set myField = '0' + myfield This assumes that myField is set to varChar.
  3. jdgonzalez

    Doing a ALTER and/or porrible UPDATE for a comma delimited......

    There are two way to go about this (at least that I can think of). 1. Use active-x scripting in the ETL process to insert a '0' at the beginning of the data. 2. Load the data to a staging table then from there do something like insert into prodTable select '0' + cast(tmpField as...
  4. jdgonzalez

    Fill Factor

    mrdenny, Thanks for the explanation and a star for you. I've always been a bit confused by this as well. What is a good percentage to set for the fill factor?
  5. jdgonzalez

    Error when using Stored Procedure and DateTime

    Can you print the exact error message? I remember I had something similar happen.
  6. jdgonzalez

    Error when using Stored Procedure and DateTime

    try changing: cmd.Parameters.Append cmd.CreateParameter("InvDate", adDBDate, adParamInput, , "6/1/2005 8:53:27 AM") to cmd.Parameters.Append cmd.CreateParameter("InvDate", adDBDate, adParamInput, 25, "6/1/2005 8:53:27 AM") It may be because the length is not specified.
  7. jdgonzalez

    Filter by URL parameter

    Sounds like it's more of an asp question rather than SQL Server. You could try something like: where <<whateverfieldyouwanttofilteron>> = request.querystring("id").value or pass the URL parameter as a stored procedure parameter.
  8. jdgonzalez

    Restoring backup error

    Jay and SQLBill, Thanks for your help. What's in BOL now makes sense:)
  9. jdgonzalez

    Restoring backup error

    Thanks. Luckily, this is a development environment I built so time is not an issue. I'll restore the db using it with 'with norecovery'. Now that I think about, I didn't specify an option, so it used with recovery. Aside from that, once the restore completes, I should be able to restore...
  10. jdgonzalez

    Restoring backup error

    Hi everyone, I'm hoping someone can help me out here. I'm starting a process of practicing my restoration of backups using query analyzer. I've been able to perform the restoration of the backup, but restoring the transaction logs is not working. My scenario assumes that the backup is being...
  11. jdgonzalez

    Importing DateTime from TXT File

    Depending on the size of the file, you could use active x in your ETL process. However, you'll take a performance hit in importing your data. In the DTS designer, there's a date time wizard you can use in your transformation.
  12. jdgonzalez

    Group by v. Distinct

    So what you're saying is that if you're using either group by or distinct to get distinct rows, use 'distinct' as a best practice. From a performance standpoint, SQL server doesn't care. Correct?
  13. jdgonzalez

    Group by v. Distinct

    Thanks vongrunt... That's what I meant to say.
  14. jdgonzalez

    Group by v. Distinct

    I'm hoping someone can answer this for me. Which is worse to use: group by or distinct? I took a peek at the execution plans for both and they are identical. In this example, group by and distinct serve the same purpose, to remove dupes from a dataset. Does SQL Server know this and just...
  15. jdgonzalez

    FILTER BASE ON DATE

    In this example, you could. But if you needed to add more fields from PROFILES.dbo.ps_job, you'd get dupes on the emplid.
  16. jdgonzalez

    FILTER BASE ON DATE

    or more specifically: select a.emplid, a.action_dt from PROFILES.dbo.ps_job a join PROFILES.dbo.ps_job b on a.emplid = b.emplid and b.action_dt = (select max(t.action_dt) from profiles t where a.emplid = t.emplid) where a.Action in ('PRO','XPR')...
  17. jdgonzalez

    FILTER BASE ON DATE

    Try this: select a.emplid, a.action_dt from profiles a join profiles b on a.emplid = b.emplid and b.action_dt = (select max(t.action_dt) from profiles t where a.emplid = t.emplid) You could also write this using a derived table rather than the...
  18. jdgonzalez

    Last 5 business days query

    Hi everyone, I'm hoping someone can help me out here. I have got a table that holds call tracking information. The table looks like this: note_id, note_desc, call_date, entry_date What I'd like to do is to be able to pull the notes for the last 5 business days from today. Any help would...

Part and Inventory Search

Back
Top