Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x

Microsoft SQL Server 2005

71K

Solutions

25K

Contributors

Microsoft SQL Server 2005 is a suite of relational database management system (RDBMS) products providing multi-user database access functionality.Component services include integration (SSIS), reporting (SSRS), analysis (SSAS), data quality, master data, T-SQL and performance tuning. It includes support for managing XML data and allows a database server to be exposed over web services using Tabular Data Stream (TDS) packets encapsulated within SOAP (protocol) requests.

Share tech news, updates, or what's on your mind.

Sign up to Post

I have a query, when I try to run it commenting a logic defined below, it runs fine.

But I need to include this logic and run the query, the query is taking hell lot of time. 2 hours for 1 lakh record.

PLEASE HELP ME CHAMPIONS.


SELECT
--CASE WHEN (select distinct  1
--from TBL c            
--where EXISTS (SELECT 1 FROM TBL1 leave            
--               WHERE convert(date,c1.DT) = leave.DT
--                 ))
--IS NOT NULL THEN 1 ELSE 0 END AS LEAVE

FROM (select *,
case when test= 'A' then DATEADD(hour,8,Date)  
     when test=  'B' then DATEADD(hour,2,Date)  
     when  test= 'C' then DATEADD(hour,-4,Date)
     else Date end as DT

 from STAGING c
 ) c1
0
Technology Partners: We Want Your Opinion!
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

My question is in the following, I have a profile in my databaseMail (it's another server) this has been working fine, but in the last week many emails are glued and no longer sends anything, I have to stop the database mail service and start it again. This is how it works all morning and falls back down. I've searched all forums and what I find is restart the service.
Or what solution recommends
0
I have a table having varbinary column which is primary key.
Whle trying to retrieve the data as below gives 0 result:

Select count(*) from Trn_Account where cast(TransID as varchar(20)) = '3038D'

below query gives me 1 result:
Select * from Trn_Account where  TransID=  cast('3038D' as varbinary(20))

Below is my table structure:
Trn_Account:

TransID      varbinary      no      20                            no      no      no      NULL
TDate      datetime      no      8                            no      (n/a)      (n/a)      NULL
TrnsNo      numeric      no      9      18      0      no      (n/a)      (n/a)      NULL


Please help.
0
Can anyone give me step-by-step instructions on how to just get this task to successfully execute my stored procedure.  The error messages are getting worse
  • "Value does not fall within the expected range.". Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established correctly"
  • "The query failed to parse. Attempted to read or write protected memory. This is often an indication that other memory is corrupt."
  • "The EXEC SQL construct or statement is not supported."

At this point, I'd just like to get the stored procedure working.  All it's doing is having a parameter string value passed into it from a user defined variable in the package and then assigning a value to the SP output parameter which then gets assigned to a different package user variable.

My environment:  Windows 7 Professional, SQL Server/Visual Studio 2005

Any suggestions?
0
Hi,

I have some users in my company that access our Production SQL instance via SSMS. I would like to know if there a way to block all domain users from using SQL Management Studio, except domain admin, as domain admin has 'sysadmin' rights.

We have software that utilizing Integrated Security.  I would still like our users to be able to utilizing our software using the SQL Windows authenticate, but not able to logon via SSMS.

Thanks!!
0
Hi,

I'm using SSRS designing a report which will show
two different dates only at any one time
comparing activity type and customer engagement.

so like this:

Activity Type           Date1                 Date2
Running                   100                    150
Cycling                      200                    150

Currently I hold these three values in a table and I use SSRS matrix to display these values like the above.
I am trying to figure out how I can add details against each of the dates to show a % difference on activity week over week.
I'm thinking perhaps this can't be done using SSRS matrix?
Maybe  I need to hard code the design and "calculation" column?

What I would like this to look like is
Activity Type           Date1                 Date2         %Diff
Running                   100                    150               + 50%
Cycling                      200                    150              - 25%

Can anyone give me some guidance on this. I have spent time looking online, but I'm not seeing anything that is working for me.
Thank you in advance
P
0
Error:
A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)
Verified that all services were started.
Named pipes were enabled.
TCPIP were allowed.
0
We just upgraded a server running Windows 2003 and MS SQL server 2005 to Windows 2008.  This upgraded the IIS from version 6 to 7.  We were running Windows authentication for the SQL database and we have a number of ASP pages that worked fine under IIS6, but crash with an error 500 under IIS7.  The website reads data fine from the SQL database when but when attempting to write to it, that's when the webpage crashes with an error 500 and in the W3SVC1 folder under C;\Windows\System32\Logfiles, the logfile shows under the lines where it tried to post, an error of 80070005 Access Denied.  I am thinking it's not passing the Windows credentials to the SQL database but it's only doing it for one of the tables.  On other tables, it writes the data to the table, but then bombs out the rest of the page and gives the error 500 on the webpage.  Do I need to rewrite the webpages to be compatible with IIS7 or is there a way to make IIS7 compatible with my webpages?  Any suggestions?

Thanks
0
Thank you all in advance!
We have column (cyclesec) that stores time values in terms of seconds an an nvarchar.
I need to be able to convert this value to  'time'. ideally in the following format.

mm:ss

In other words, the column (cyclesec) currently stores a value of 00:10:00 as an nvarchar.
I need to convert it, move it to a new column (minsecCycletime), and make it show up as a "time" as such:

10:00

Thank you all in advance!
0

Microsoft SQL Server 2005

71K

Solutions

25K

Contributors

Microsoft SQL Server 2005 is a suite of relational database management system (RDBMS) products providing multi-user database access functionality.Component services include integration (SSIS), reporting (SSRS), analysis (SSAS), data quality, master data, T-SQL and performance tuning. It includes support for managing XML data and allows a database server to be exposed over web services using Tabular Data Stream (TDS) packets encapsulated within SOAP (protocol) requests.