Archive | SQL RSS feed for this section

Converting Float to Varchar in SQL Server, In Non Scientific Form

Published on December th, 2013
Andri Kasta Marengga

Converting Float to Varchar in SQL Server, In Non Scientific Form

Recently I got a problem about my data in SQL Server database. Here’s the chronology¬†: I have a data on DB (let’s says this is Table A)¬†that should be updated based on an Excel file from a user Because the Excel file has a huge number of rows, I decide to import this file to […]

Continue Reading →

Saving SQL Server Query Result In Text Format

Published on October th, 2012
Andri Kasta Marengga

Saving SQL Server Query Result In Text Format

Saving query result from SSMS is not easy as it seems, some of my colleague copy from SSMS query result and paste it to Excel. Apparently it’s not a problem, but it can be a problem if your data saved in text data type column but containing numeric data. If you paste this data directly […]

Continue Reading →

Parsing Comma Separated Parameter Inside IN Clause SQL Server

Published on March th, 2012
Andri Kasta Marengga

Parsing Comma Separated Parameter Inside IN Clause SQL Server

Parsing array parameter into SQL Stored Procedure isn’t as simple as it seen. The problem is SQL Server has not array parameter. To outsmart this problem, we can make a SQL Function to delimit our parameter before parsing it to Stored Procedurr, DataSet, etc. Here’s a sample code of this SQL Function Done! Now we […]

Continue Reading →

SQL Operator Equal to Equal (=) For NText Datatype

Published on February th, 2012
Andri Kasta Marengga

SQL Operator Equal to Equal (=) For NText Datatype

This morning, I’ve got a problem with using equal operator (=) in transact-SQL for ntext datatype column. I try this SQL command text And it returns this error message “The data types text and varchar are incompatible in the equal to operator.” After some googling, I found a fact that comparison operator doesn’t match with […]

Continue Reading →