Dear Group
Just can't see what I'm doing wrong. Any Ideas?
SELECT Address1, Address2, Suburb FROM i2b_address
IsNull (NullIf (Address1 + '', ''), '') +
IsNull (NullIf('','' + Address2,''),'') +
IsNull (NullIf('', '' + Suburb, ''), '') AS PropertyAddress
Server: Msg 156, Level 15, State 1, Line 2
Incorrect syntax near the keyword 'NullIf'.
Thanks for your help & efforts!
Martin 4 2061
SELECT Address1, Address2, Suburb,
IsNull (NullIf (Address1 + '', ''), '') +
IsNull (NullIf('','' + Address2,''),'') +
IsNull (NullIf('', '' + Suburb, ''), '') AS PropertyAddress
-- -> from clause goes here
FROM I2B_ADDRESS
Hi! Well, something we don't notice the obvious! Thanks very much! I
think I need a break!
But still getting an error... Argh!!! What's wrong?
SELECT Address1, Address2, Suburb,
IsNull (NullIf (Address1 + '', ''), '') +
IsNull (NullIf('','' + Address2,''),'') +
IsNull (NullIf('', '' + Suburb, ''), '') AS PropertyAddress
FROM i2b_address
Server: Msg 170, Level 15, State 1, Line 3
Line 3: Incorrect syntax near ','.
Thanks for your help & efforts!
M
Solved It!
IsNull (NullIf (Address1 + '', ''), '') +
IsNull (NullIf (', ' + Address2, ''), '') +
IsNull (NullIf (', ' + Suburb, ''), '') AS PropertyAddress
If you use the Northwind database, Customers table, you'll see that
this also works...
I don't have your data structures and therefore need to use something I
do have...
SELECT ContactName, ContactTitle, Fax,
IsNull(NullIf (ContactName + ' ', ''), ' ') +
IsNull(NullIf(ContactTitle + ' ', ''), ' ') +
IsNull(NullIf(Fax + ' ', ''), ' ') AS PropertyAddress
FROM Customers This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Jeff Magouirk |
last post by:
Dear Group,
I am trying to create a view and keep getting the Incorrect syntax near the
keyword 'Declare'" error.
Here is the code I am writing.
Create view fixed_airs (sid, fad_a2, fad_a3)...
|
by: Carl |
last post by:
Can you tell me what is wrong with this syntax ?
string select = "UPDATE .. " +
"(,,,,,,,
,,,,
,,, ,
, , ) " +
" VALUES
(@id,@clientid,@total,@tps,@tvq,@gtotal,@datefac,@datepay,
|
by: ypjofficial |
last post by:
HI,
I have following terrific confusion.
class test
{
public:
int i;
int * j;
int **k;
|
by: Sandesh |
last post by:
Hello All,
Me saying " has any body come across such error would be
underestimating".
Well I am getting a very peculiar and unique error "Line 1: Incorrect
syntax near 'Actions'."
...
|
by: iporter |
last post by:
In the following code, the two Response.Write statements output exactly
the same - I can copy and paste both into Query Analyzer, and run them
fine. However, if I comment out line 3, the...
|
by: wallic |
last post by:
Hello,
This is my first post and I am a beginner with SQL code. The code below is supposed to update a new table (loctable) with a calculated value based on the original table (hra_data). ...
|
by: roamnet |
last post by:
hi
i created database file with .mdf extention ,sql server as a source
and use grid view to display data
there're no problem in data retrieve and display,but i want to edit it
or insert new...
|
by: arial |
last post by:
Hi,
I am getting this error message:
Incorrect syntax near the keyword 'where'.
Description: An unhandled exception occurred during the execution of the current web request. Please review...
|
by: karenkksh |
last post by:
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. ...
|
by: Faith0G |
last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
|
by: ryjfgjl |
last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
|
by: taylorcarr |
last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
|
by: aa123db |
last post by:
Variable and constants
Use var or let for variables and const fror constants.
Var foo ='bar';
Let foo ='bar';const baz ='bar';
Functions
function $name$ ($parameters$) {
}
...
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
| |