0

I am working with SQL Server 2008 and have a select query that I am trying to create a Null column in.

The query is being used to create a tab delimited text file to be imported by a different system. I am using

Select data1 as col1, data2 as col2, '' as col3, data4 as col4

The problem apparently is that the other system does not see Col3 as NULL even though when I open it in Notepad++ it shows a NULL in that column. The vendor says there is something in that column. I assume they are seeing it as an empty string and not null.

What is a different/better way to put that NULL column in?

Thanks,

0

1 Answer 1

2
Select data1 as col1, data2 as col2, NULL as col3, data4 as col4 FROM tamble_name
Sign up to request clarification or add additional context in comments.

2 Comments

We tried the "NULL" as col before and they said no, hence we went with empty string/null This is what I just received from them.. They said there was specific characteristic NULL code with 1 byte. Are there any ways to put really “Nothing” (0byte) in place of that NULL code with 1 byte ?
@user2941811: Don't use 'NULL'" but NULL. NULL means undefined as opposed to an empty string '' or the string 'NULL' which are clearly defined.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.