Quantcast
Channel: Transact-SQL forum
Browsing all 12890 articles
Browse latest View live

Reg SQL server -this is my first question

Hi,I am a new user .I belong to sql sever category .I know i am posting under wrong place .But Please help me ..create table club_values (iccid varchar(20), flagint ) insert into club_values...

View Article


Problem using "CASE" (trying convert from IIF in access)

I try convert a function IIF from ACCESS, replacing "IIF" for a "CASE", and get me a error in "SELECT line 19", can any1 help me ?-----------------PROCEDURE  [GetInfo_ASN] @P1 smalldatetime     -- Data...

View Article


error when try a "cast" in a char(13) to get a varchar....

AVAB_Codigo it's a "char(13)", get me a error :"Invalid operator for data type. Operator equals boolean AND, type equals varchar."when i use a cast...  the error still appear,.....  what should i do...

View Article

SQL Server Management Studio experiences lock timeout when using SELECT INTO

Whenever I execute a long-running SELECT INTO statement and while it is running I try to use the SQL Server Management Studio object browser to view tables or other objects, I get a lock timeout error....

View Article

Computed Column Adding 3 columns together

HiI am trying to create a computed column in a SQL table to show 3 columns in the same table joined together to make a long string.I currently have the...

View Article


how to save the result set of a SELECT in a variable ?

declare aVal int, bVal int;select min(d.DateValue) begindate, max(d.DateValue) enddate from dbo.dimDate dwhere d.BusinessYear = 2014 what I want to do is to save the result of the select statement in...

View Article

Select query for grouping

I need to create email and send it with all channels together the users are subscribed to, This is my source table:CREATE TABLE [dbo].[test_email]([email] [varchar](50) NOT NULL,[channel_id] [int] NOT...

View Article

Bringing back a value that meets a criteria.

Hi,How do i bring back all the fields that only meet the fallowing criteria: Field4 is all NULL. So i would get back all the fields and rows for value (82930017). Thank you for your...

View Article


SQLServer 2008 R2: The SCHEMA LOCK permission was denied on the object

Hi all,I encounter the following error while developing a SSRS project that connects to a SQL Server Database view:"Msg 229, Level 14, State 71, Procedure sp_getschemalock, Line 1 The SCHEMA LOCK...

View Article


formulating a count query - sql server 2012

Hello,I am quite new to SQL and even though I can handle simple queries I have run into a problem. Maybe you can help :-)This is how the table I want to query from is structured:   id  From...

View Article

Help with query

Hi,I have a table which has columns that records the logon and logoff times of the users every thime they do so. here are the column descriptionsMSG DATE - DATE of the Logon\logoffMSG TIME - TIME of...

View Article

Image may be NSFW.
Clik here to view.

Validating different DATE FORMATs

Hi Friends...I get in trouble again, I have different flat files with a DATE column in string format, but, the problem is that each file has a different DATE FORMAT in that column, for example:...

View Article

Image may be NSFW.
Clik here to view.

Use Pivot & Unpivot in SQL

Dear All,I have a data under Table in below shape.. 1 - means this user is setup on that feature, & 0 means not.But, I want to see this output in that way..Means - If multiple e-mails are configure...

View Article


Need help to delete DB instance in 2008 R2 Server

HiThe help click link didnt help me trying to solve my problem in removing a database instance in MS SQL Server Management Studio of Server 2008 R2Is there a solution to this ? TITLE: Microsoft SQL...

View Article

Dynamic Function

I want to write a function, which accept 3 parameters, 1 TableName 2 ColumnName 3 DateValue,and returns number of records in that table for that particular date(in parameter date), I have written below...

View Article


Automatic Refresh Local Cache? (SSMS IntelliSense)

Can it be done automatically?Reference: SQL Server: How to Refresh Intellisense CacheManual refresh is a time waster.  Thanks.Kalman Toth Database & OLAP Architect SQL Server 2014 Design &...

View Article

Image may be NSFW.
Clik here to view.

What different between these database designs in term of performance and HD...

I have designed the database about sale order and i realize that these two designs provided me the same result.Could you tell me that What different between these database designs in term of...

View Article


Bringing back specific rows.

Hi SQL Gurus, The first 3 columns are nvarchar(500) and the last one is a column i generated with a LEN function so its an INT and can have NULLs or 0. Below is the sample.  Field2 will be grouped...

View Article

Sum Query From 6 Tables

I need to in SQL if possible sum the total from 6 different stores, who are all stored in a different database.  I would prefer not to use a make table (again if possible) would just like a direct...

View Article

Single Row Values

Hi All ,I have a table with below output Value1 Value2 Value3 ID Department NULL NULL 97100 Type NULL NULL 63957 Department NULL NULL 177164 NULL State  NULL 97100 NULL Center NULL 63957 NULL Center...

View Article
Browsing all 12890 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>