Need help with date subtract from 3 business days. I need to subtract 3 business days. Exclude Sunday but include Sat. ex: if today Monday 07/26/10 then count 22, 23, 24, 07/27/10 then count 26, 24, 23 Thank you in advance. DECLARE @EnterDt DATETIME SET @EnterDt = GETDATE() SELECT * FROM t WHERE EnterDt > @EnterDt ?? ... 28 Jul 2010 14:05
converting number to string in hex Hello there I have table with bigint values. I need to convert them to string as hex for example: 209 = C9 when i do select convert(binary(3), 209) it set on screen 0x0000C9 which is what i want. but when i try to enter it to string it set an empty string. Is there a way to enter "0000C9" to string... 27 Jul 2010 18:24
bit datatype displays as 'true' Hi I am trying to display as '1' at the Reporting Service, but it keeps coming out as 'True.' Is there anyway I could display as number - '1' ? When I do a query from MS SQL Server Mgmt Studio 2005, it displays as '1' but when the same sp runs from the Reporting Service, it displays as 'True'. Any comments w... 28 Jul 2010 14:05
"pivoting" when the column selectors are inequalities? A table lists multiple events where each event has four attributes (columns), call them A, B, C, P It would be simple to pivot to get a table with columns for A, B, C, P=1, P=2, P=3, etc. However, I need the columns to be A, B, C, P<1, P<2, P<3, etc. In other words, if a row of the "simple" way were X, Y, Z... 28 Jul 2010 05:18
Nested Set Model - finding the level 1 parent node of a child node Hi all, Using the "Nested set model" how do you find the level 1 parent node in the highest point of the tree no matter how deep the child node is? thanks CELKO for the several post on nested set model.. thanks gv ... 26 Jul 2010 13:51
Cast Numeric data type gain during Sum Hello I have a table which has a column called 'Area' which is defined as Numeric data type. I have some calculation on this area field and I made a view which has three fields related to Area. Let the fields be Area1, Area2 , Area3. This area fields are mapped across various Divisions. So Division is also a... 2 Aug 2010 06:00
Temp table and table variable Hi, I have table variable with about 10 columns in my query and I'm using it only once. It has about 2000 rows. Query executes about 5 seconds. If I just change table variable into temp table and leave everything the same, query executes 100ms. How is that possible that it is so big difference in executio... 30 Jul 2010 05:21
GHD IV Salon Styler History Barbershop in Bucharest around 1842. Woodcut. As shown in this image, the barbershop also provides an opportunity for social contacts. The barber's trade is an ancient one. Razors have been found among relics of the Bronze Age (circa 3500 BC) in Egypt. Shaving, either of the head or face, was not alway... 25 Jul 2010 23:49
"Cannot generate SSPI context." I am working on a win form C# application. I am using visual studio 2005, ..net 3.5, SQL Server 2005 Express. Windows XP sp3. when the application starts and executes at the command of databaseNotSet = _dirSettingTableAdapter.Fill(_filesDatabase.DirSetting) == 0; DirSetting is a table in the database (fileDate... 25 Jul 2010 20:34
problem in getting nulls Hello there I'm running this code: declare @ProductType int set @ProductType = 0; select @ProductType = ProductType from dbo.Products where ProductID = 6; If there isn't any productID 6 @ProductType remains 0 However if there is ProductID 6 and ProductType is null @ProductType becomes null. Is ... 25 Jul 2010 19:28 |