Skip to content
Advertisement

Tag: sql-server-2008

SQL Server: Invalid Column Name

I am working on modifying the existing SQL Server stored procedure. I added two new columns to the table and modified the stored procedure as well to select these two columns as well. Although the columns are available in the table, I keep getting this error: Invalid column name ‘INCL_GSTAMOUNT’ Can anyone please tell me what’s wrong here? Answer Whenever

how to convert date to a format `mm/dd/yyyy`

I’m having a sql table with date column named CREATED_TS which holds the dates in different format eg. as shown below Now I want to convert these to format mmddyyyy before as i am comparing the dates in WHERE clause of my SELECT query. I tried using but got the result as, I need the result as eg. 02/20/2012 in

WHERE CASE WHEN statement with Exists

I am creating a SQL query having WHERE CASE WHEN statement. I am doing something wrong and getting error. My SQL statement is like I am getting error as Msg 512, Level 16, State 1, Line 11 Subquery returned more than 1 value. This is not permitted when the subquery follows =, !=, <, <= , >, >= or when

What does SQL Server do with a timed out request?

Suppose that I use C# to run a long running SQL Server stored procedure (lets say 30 minutes). Further suppose that I put a 1 hour timeout period on the query in C# such that if for whatever reason this SP takes longer than expected, I don’t end up monopolizing the DB. Lastly, suppose that this stored procedure has a

Advertisement