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 bkrike 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. RiddleMeThis

    SProc takes MUCH longer than raw code

    Could someone please explain to me the difference in how a stored proc runs compared to just raw sql outside of a stored proc? I created a query which creates 2 temp tables and loads them with data, then creates a 3rd temp table, inserts some rows with titles in the first column, and populates...
  2. RiddleMeThis

    Dynamic Columns AND Rows ?

    Hi Guys, I'm hoping someone can help here because this has caused a lot of head scratching over the past few weeks. I know of the PIVOT function to switch rows into columns, but this means the columns also become rows, therefore the row number is fixed, I would like to create a report that will...
  3. RiddleMeThis

    TAB being represented as a SPACE in the output

    Hi there, I'm trying to insert a TAB into my output in SQL Server 2005 but it just represents it as a SPACE. First I tried the following syntax with the TAB manually put in the string: SELECT 'test1 test2' And also using CHAR(9) like: SELECT 'test1' + CHAR(9) + CHAR(9) + CHAR(9) + CHAR(9) +...
  4. RiddleMeThis

    Why would you use cast over convert?

    When and why would you ever use 'cast' over 'convert'? I presume there is a slight difference in speed as cast doesn't do quite as much as convert, but surely the difference would be so small that it is insignificant. Would you only use cast to make scripts more portable for other SQL...
  5. RiddleMeThis

    Access VBA - date of previous monday or tuesday etc

    Im trying to get the date of the previous day as specified at code level (i have a form for each day of the week so it will change from form to form). Basically I want a variable containing the date of the previous monday for example (but could be any day), including today, so if this is monday...
  6. RiddleMeThis

    Why are GOTO statements bad ?

    Why are GOTO statements bad? I've been writing SQL without any GOTO statements but recently became aware that they can be used in SQL Server 2005, but when I try to research it, people just flame the use of it. Everyone says it's bad practice, and there are almost always more elegant...
  7. RiddleMeThis

    What does N do?

    What does N do? I'm looking at some code which I understand for the most part, but if I were writing it I wouldnt use N in it, I don't know what N does so was just wondering if someone could explain it to me please. EXAMPLE: SELECT * FROM sys.objects WHERE type IN (N'P', N'PC')

Part and Inventory Search

Back
Top