Who is online?
0
guests and
0
members
Member login
|
Become a member
Home
Articles
Forums
Blogs
Jobs
Events
Files
Spaces
People
login
register
Home
» search results
Search Results: Varchar
141 results found
Sorting
Varchar
as Number with T-SQL and SSIS
Learn how to sort a Varchar or any string column as numeric even when there are multiple separators between the varchar numbers. Learn how to do this in T-SQL as well as SSIS.
Author:
MikeDavis
Date: 8/16/2010 Section:
Article
tags :
Number
,
SSIS
,
T-SQL
,
Varchar
,
Sorting
Break Stream of Comma Seperated string to columns
Hi Vineet. Can this be an approach? DECLARE @t TABLE(ModelName VARCHAR(25),Descr VARCHAR(50)) INSERT INTO @t VALUES ('ABC XYZ','10,12,13,40,20,50'); INSERT INTO @t VALUES ('ABC XYZ','11,13,14,45,21,55'); ;WITH cte (ModelName,Prod_Attributes)AS ( SELECT [M
Author:
marcoadf
Date: 1/11/2012 Section:
Forum
tags :
Column
,
columns
,
convert
,
converting
,
CTE
,
delimited
,
model
,
row
,
rows
,
values
,
XML
SSIS HELP
You just need to pay attention if your varchar column has dot "." or comma ",". Here is an example converting varchar to float whereas the varchar column has dot instead of comma: Table I've created with varchar column (notice the dot): Now, in the packag
Author:
marcoadf
Date: 12/4/2010 Section:
Forum
tags :
data conversion
,
derived column
,
float
,
varchar
,
varchar to float
Insert Unknown Row to Dimension Table
When building a warehouse there is a common practice of adding an Unknown row to the Dimension tables. For me, this is a monotonous task that I hate doing. I was recently on a project that had a large number of dimensions and I refused to write a T-SQL St
Author:
PatrickLeBlanc
Date: 6/15/2010 Section:
Blog
tags :
Dimension
,
Script
,
T-SQL
,
Warehouse
Passing a parameter to an SSRS DataSet using an EXEC ... AT query against a linked server
I created a report that is using an EXEC ... AT query to a linked server. The code below works like a charm in the dataset: DECLARE @myPatIEN AS VARCHAR(8) = '646040' DECLARE @myStartDate AS VARCHAR(25) = CAST(CAST(GETDATE()-1 AS DATE) AS CHAR(10)) + ' 00
Author:
Christian
Date: 4/5/2012 Section:
Forum
tags :
EXEC AT
,
linked server
,
parameters
dynamic date range label with hidden cascading parameters
Would this work? I only created 6 entries in the dropdown but copy/paste/modify for the other 14 Create a connection to a Microsoft SQL Server database (dummy needed for dataset) Create a dataset with the following query and base the parameter on the this
Author:
syale
Date: 4/2/2012 Section:
Forum
SQL Server 2012 - IIF Function
In earlier versions of SQL Server, when you were writing T-SQL, how many time you asked yourself "is there a if function?". Even when you used CASE function, how many time did you said "if there was a if function, this was a lot easier". Well, finally wit
Author:
marcoadf
Date: 12/19/2011 Section:
Blog
tags :
case
,
function
,
if
,
IIF
,
limitation
,
nested
help for text file destination with every row having different column definitin
Yes the requirment is such that, I should have a single fixed width text file, I will used the "Ragged Right option" , so I believe the fixed width issue will be solved. But the daunting task is, to accomodate the different rows with different column name
Author:
domshar
Date: 6/13/2011 Section:
Forum
Passing a filepath in SSIS
Hi Kylewalker, Could you please provide me the screenshots on how to configure Excel Connection Manager with an expression that uses a package variable ? and this is the procedure that i have created by using dtexec utility. -- exec dbo.import_data 'C:\Do
Author:
nicky_river
Date: 8/24/2010 Section:
Forum
OpenRowSet with variables as parameters
Recently I've had to write a generic stored procedure to query a DMV using OPENROWSET. much to my chargrin I discovered that OPENROWSET will not take variables as its parameters, so what i initially thought would be a trivial matter turned into a 2 hour b
Author:
Maxui
Date: 1/12/2012 Section:
Blog
tags :
OpenrowSet
How to drop/delete all the user define tables within a SQL database.
Hello all, Firstly on this lovely Valentine’s day esp, I wish Happy Valentine’s day to all the loved ones :) . I would like to post some another blog which might be helpful to the one who works in SQL. Sometimes we might need to delete all the
Author:
Anil
Date: 2/14/2012 Section:
Blog
tags :
T-SQL
FINDSTRING, SUBSTRING and REVERSE question
-- Change the @input and @anwser variables, where you put the answer you are looing for. declare @input varchar(100), @answer varchar(100), @result varchar(100); select @input = 'abcde(fg'; select @answer = 'abcde'; select @result = case when patindex('%(
Author:
SteveFolkerts
Date: 3/25/2012 Section:
Forum
tags :
patindex
,
SUBSTRING
Utilizing Two Related DataSets on one Report
Why not use a function? Create function that take in a parameter and then report it in the select statement. Function getCount (PhysicianFile.ID) Select select ... getCount(ID) from PhysicianFile table. Working example below that replace text, but you can
Author:
chanluongbus
Date: 2/8/2011 Section:
Forum
tags :
New to SSRS
Field Parsing Help
Another ( admittedly more complex ) method would be to query it at the source. If you have no ZIP Plus 4 zipcodes, something like this might work. This query uses the REVERSE() function to flip the address around, TRIM() and LTRIM() It, then find the firs
Author:
KeithHyer
Date: 9/1/2011 Section:
Forum
tags :
CHARINDEX
,
REVERSE
,
SUBSTRING
SSRS Report Catalog Path
This has a few loops in it ( not cursor, but a WHILE loop ) - but it might do what you're after: NOTE: The contents of the ReportPaths table gets modified with this method - so make sure if you use this method, you're using a COPY of your report paths tab
Author:
KeithHyer
Date: 10/25/2011 Section:
Forum
tags :
CHARINDEX()
,
REVERSE()
,
SUBSTRING()
Displaying Dynamic Columns in SSRS Report
vgone said: Dear Marco, I have created a stored procedure with your query i.e.: “ SELECT 'SELECT '+cast((SELECT c.name + ',' FROM sys.columns AS c INNER JOIN sys.tables AS t ON c.object_id = t.object_id WHERE (t.name IN ('TABLE_NAME')) FOR XML PATH(
Author:
marcoadf
Date: 3/8/2012 Section:
Forum
tags :
procedure
,
sp
,
SQL
,
stored
Data format
Since you're in the Integration Services forum, I would suggest that you use the "Execute SQL" task to modify your data using T-SQL. In your case, would would use something like the following: IF EXISTS( SELECT TOP 1 1 Result FROM tempdb..sysobjects WHERE
Author:
KeithHyer
Date: 8/12/2011 Section:
Forum
tags :
data cleansing
Running DOS command from SSRS
I believe I can only return an integer from a stored procedure and I want a datetime. Here is my first attempt that is failing: create PROCEDURE [dbo].[usp_TimeZone] @ServerName as varchar(20) AS SET NOCOUNT ON DECLARE @TimeFromDC varchar(30), @XP_Cmd var
Author:
syale
Date: 7/22/2011 Section:
Forum
help for text file destination with every row having different column definitin
That is a bit my fault. I didn't look closely enough at the data sources. I was using stored procedures as data sources and when I dug a little deeper, I found my data sources were formatting the data to have trailing spaces. Here is example code that sho
Author:
KeithHyer
Date: 6/20/2011 Section:
Forum
ssrs error
DECLARE @nextmembercheck varchar(15), @nextprovidercheck varchar(15) DECLARE @currentmembercheck varchar(15), @currentprovidercheck varchar(15) SELECT @nextprovidercheck = nextcheck FROM qfund (NOLOCK) WHERE fundid = 'QTXID78290' SELECT @nextmembercheck =
Author:
veni
Date: 10/31/2010 Section:
Forum
SSIS Data Types
For all of its life, there have always been a lot of questions circulating around about data types in SSIS. What does an int in SQL map to in SSIS? What about a varchar? nvarchar? The questions could just go on and on. But, finally, we have an answer. In
Author:
ChrisSchmidt
Date: 12/27/2012 Section:
Blog
tags :
data types
,
ssis
,
SSIS 2012
,
ssis data types
T-SQL to return disk space in a table
I often need to know how much free space is available on a drive before and after a cube has been updated. The code below returns a table with Total and Free space per drive. It relies on OLE Automation procedures being configured correctly. SET NOCOUNT O
Author:
Maxui
Date: 5/23/2012 Section:
Blog
tags :
Disk space
,
Ole Automation Procedures
,
T-SQL
,
useful
Stored Procedure with CTE Used to Check for Two Transaction Types on the Same Date of Service
Good Morning All, I need to check our charge detail transaction table for any account that has the same transaction code on more than one date of service. I've defined the stored procedure as follows: CREATE PROCEDURE getERAcctsMultLevels -- Add the param
Author:
schilders
Date: 6/13/2011 Section:
Forum
Command text was not set for the command object
Are you using SQL Server as a data source or are you using a different SQL Engine as the source for this query? ** If ** it's SQL Server: The issue is probably that there is no "TO_CHAR()" function in T-SQL. Nor is there a "substr" function. In their plac
Author:
KeithHyer
Date: 2/7/2012 Section:
Forum
tags :
oledb
,
SQL command from variable
ssis package exec by stored procudure
hi i create a tsql to run ssis package like this: Declare @FilePath varchar(2000) Declare @Filename varchar(1000) Declare @cmd varchar(2000) DECLARE @ package_name varchar(200) SELECT @ package_name = package_NAME FROM table_detail WHERE PROC_START_DATE =
Author:
lakshmi_anand
Date: 2/16/2012 Section:
Forum
Page 1 of 6 (141 items)
<< Prev
1
2
3
4
5
6
Next >>
Go to page:
[Go]