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 Mike Lewis 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. sds814

    Simplifying while loop query

    The purpose of CROSS JOIN and CROSS APPLY sound VERY similar except that CROSS APPLY can be used w/ table-valued functions.
  2. sds814

    Simplifying while loop query

    Can I just use CROSS APPLY like below? SELECT ProductCode ,OrderCode ,OrderDescription FROM @ProductCodes PC CROSS APPLY @OrderData OD ORDER BY ProductCode
  3. sds814

    Simplifying while loop query

    In order to improve readability and performance, can I simplify the query below to a select query? DECLARE @ProductCodes TABLE(ProductCode nvarchar(3), IsProcessed bit DEFAULT 0) INSERT INTO @ProductCodes(ProductCode) VALUES('ABC') INSERT INTO @ProductCodes(ProductCode) VALUES('DEF') INSERT...
  4. sds814

    Querying XML data

    I used this: SELECT EmailFollowupID FROM tblEmailFollowup CROSS APPLY OptionalParameters.nodes('//Parameter') R(ref) WHERE ref.value('UserType[1]', 'nvarchar(50)') = 'DonorManager'
  5. sds814

    Querying XML data

    In your example DECLARE @tblEmailFollowup TABLE ( EmailFollowupID int IDENTITY(1,1) ,OptionalParameters xml ) DECLARE @Parameter XML SET @Parameter = '<Parameter><UserType>DonorManager</UserType></Parameter>' INSERT INTO @tblEmailFollowup(OptionalParameters) Values (@Parameter) SET...
  6. sds814

    Querying XML data

    Thanks Boris. What does the [1] do? Also, do you recommend to use nvarchar only when it's required because of the extra memory it takes?
  7. sds814

    Querying XML data

    I'm using SQL Server 2008 R2. I have a table with a xml data type column. I'm trying to query one of the elements from the column's value, but getting the following error: Msg 2389, Level 16, State 1, Line 12 XQuery [tblEmailFollowup.OptionalParameters.value()]: 'value()' requires a singleton...
  8. sds814

    Accessing a control on Content Page from Site.Master

    Below is the structure of my web application. - Site.Master - MappingTable.Master - DataPage.aspx (Content Page) From Site.Master, I need to disable a button on the DataPage.aspx. How would I do that? Thanks!
  9. sds814

    basic custom server control question

    I'm using VS2012. I'm trying to follow an exercise from a book. Here is the code for my custom server control: namespace ServerControl { [ToolboxData("<{0}:menucustomcontrol runat=\"server\"></{0}:menucustomcontrol>")] public class MenuCustomControl : Control { protected...
  10. sds814

    Need to use cursor?

    I have a table with the table name, column name, column values and whether the column values should be included or excluded. This table is used to filter what data should be loaded. Here is an example TableName ColumnName ColumnValue Include/Exclude tblProduct ProductID 1 Exclude tblProduct...
  11. sds814

    SQL query for Unpivot

    I have a table structure (tblmapping) like the following: TableName ColumnName ColumnValue Product ProductID 1 Product ProductID 2 Product ProductName Keyboard Product ProductName Mouse I want to convert from column based data to row based data. I tried the following query, but...
  12. sds814

    algorithm for this code

    If I pass a date and the days that should be subtracted I need to find the next weekday. Here is what I have: static DateTime GetFileDate(DateTime BusDate, int DayLag) { DateTime FileDate; FileDate = DateTime.Today; switch...
  13. sds814

    Converting GMT to EST

    Thanks for the help, George.
  14. sds814

    Converting GMT to EST

    Thanks for your help George. I just fount out a twist on the requirement. The fall DST date is 11/3/2013 and lets say the current date is 11/4/2013. So if I do Select DateDiff(Hour, GetUTCDate(), GetDate()) It should give me -5. Now the date that I need to convert from GMT to EST is...
  15. sds814

    Converting GMT to EST

    I need to write a function that converts a time from GMT to EST taking daylight savings time into consideration. On a high level I was thinking of doing the following: a) a table that holds the daylight saving dates for this year and upcoming years. does anyone know a website that has these...
  16. sds814

    Java books

    Can anyone recommend java books? I have experience in C#.
  17. sds814

    Can SQL Server 2008 R2 be installed on Windows 2003 R2?

    One of our engineers is having a problem installing SQL Server 2008 R2 on a Windows 2003 R2 machine. When we click on setup.exe the installation wizard doesn't show up. Is this because Sql Server 2008 R2 cannot be installed on a Windows 2003 R2 machine? Thanks!
  18. sds814

    disadvantage of views?

    Makes sense. Thanks George and Bill! Very cool app, George! Outside of topic, but do you use the Dijkstra algorithm to optimize the bus route?
  19. sds814

    disadvantage of views?

    Thanks George. Sorry I'm a still little confused on how views work behind the scenes. Is the view (query) stored with the execution plan? And therfore the performance save?
  20. sds814

    disadvantage of views?

    if a view isn't stored in memory then is its performance better than a function?

Part and Inventory Search

Back
Top