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 wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Recent content by ninelgorb

  1. ninelgorb

    Comma Separated Parameter in Stored Proc

    I have a comma separated input parameter @EmployeeId that contains the following values: '123','234','246'. How can I break them up into a temp table(#Employees) so that I can then write a query against them. Something like this: SELECT * FROM SALES s INNER JOIN #EMPLOYEES e ON s.empId =...
  2. ninelgorb

    Executing Dynamic SQL Statement

    Can I select into a #TEMP table using dynamic sql? For example: SET @sSQL = 'SELECT * INTO #TEMP FROM ' + @sTable EXEC (@sSQL) I'm getting an invalid object name error when trying to select from #TEMP. Thanks, Ninel
  3. ninelgorb

    Executing Dynamic SQL Statement

    Thank you so much. I love it when it's such a simple fix.
  4. ninelgorb

    Executing Dynamic SQL Statement

    I have the following dynamic statement: SET @sSQL = 'INSERT INTO ' + @Table + ' (sCalldate, sAgentid, sProject, sLogIn, sLogOut, sCallTime, dCallSec) ' + ' VALUES ( ''' + @sCalldate + ''', ''' + @cursorAgentId + ''', ''' + rtrim(ltrim(@sProject)) + 'z' + ''', ''' + @sStartTime + ''', '''...
  5. ninelgorb

    Cursor question

    Thank you all for helping me out. I really appreciate it. I'd like to add something else... How can I update the PunchOut with the PunchIn time, but minus a second? Declare @Temp Table(EmpId Integer, Project VarChar(10), PunchIn SmallDateTime, Punchout SmallDateTime) Insert Into @Temp...
  6. ninelgorb

    Cursor question

    I have a table that contains employees punchin and punchout times. An employee can punchin and out multiple times during day(Lunch/Breaks). Sometimes they forget to punch out, but punch in again. So I can have records that look like this: EmpId Project PunchIn PunchOut 1 A...
  7. ninelgorb

    Executing SELECT statement dynamically

    I need to execute the following select statement dynamically: SELECT @RC = count(*) FROM @sTable WHERE Calldate = @sCalldate When I write it like this I get errors.. EXEC ('SELECT ' + @RC + ' = count(*) FROM ' + @sTable + ' WHERE Calldate = ' + @sCalldate) IS there any way I can do this...
  8. ninelgorb

    Asp.net account --Access is denied

    I have a web page that creates a text file and saves it to a network folder. The problem is that I am getting access is denied errors. Does this have to do with the asp.net account? I gave the netowrk folder read/write rights to the asp.net user. Am I missing something? Do I need to write...
  9. ninelgorb

    Transaction Log

    I have a database whose transaction log is 22867.367 mb. I need to truncate it. I used the following command: backup log mydatabase with truncate_only and the only difference I noticed was that the Log Space Used went down. The Log size didn't change. What commands should I be using to...
  10. ninelgorb

    Exists OR In ???

    Which is better to use in a query for conserving resources, IN or EXISTS? Thanks, Ninel
  11. ninelgorb

    Showing selected value in dropdown as well as data returned from db

    I actually found other code that worked: ddlDept.SelectedIndex = ddlDept.Items.IndexOf(ddlDept.Items.FindByValue(iMsDepartmentId)) Thank you jbenson001 for all your help. I really appreciate it. Sometimes I think I don't know where I would be without all the help I receive from the forums.
  12. ninelgorb

    Showing selected value in dropdown as well as data returned from db

    I'm really sorry to keep bugging you about this. If you take a look at my code above, I'm populating a datareader with the info from my database. Would the datareader work? What would I put in the parenthesis with thw datareader? I am soo confused....can you tell?
  13. ninelgorb

    Showing selected value in dropdown as well as data returned from db

    What am I supposed to have in the parenthesis of .FindByValue(???) imsDepartmentId is the value returned from the database for department.
  14. ninelgorb

    Showing selected value in dropdown as well as data returned from db

    Am I misunderstanding this? I want the the position "IT" to appear selected in the dropdown, but when clicking the dropdown to see the other positions, I want to see the list that came back from the database. The .FindByValue will do this for me?

Part and Inventory Search

Back
Top