Solved

Problems altering a complex SQL code, always get an error

Posted on 2008-10-08
2
158 Views
Last Modified: 2012-05-05
Hello,

Will be a mircale if someone could help with this one, been driving me crazy all afternoon. I'm trying to extend someones SQL code who has now left the business. I have attached the script to the thread in notepad. The problem I have is if I change the smallest thing like the output in an iif statement I get an error message which I have attached. Even if I put the script back to how it was and try and run it again I still get the same error message.

Does anyone know why it is happening? not expecting you to know what the script is fully doing just how I can correct the error or avoid it.

Finishing work now but back 8am GMT time, would be great is anyone has any ideas

Thanks
Ian
SQL.txt
error.JPG
0
Comment
Question by:ShockUK
2 Comments
 
LVL 8

Accepted Solution

by:
mikainz earned 500 total points
ID: 22670495
Hi please
replace the brackets [ and ]
with the following brackets ( and )

see attached file
sql2.txt
0
 

Author Closing Comment

by:ShockUK
ID: 31504254
So simple but so great.
I would give you more than 500 points if I could for this

Thanks
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
SQL Update Query 23 79
SQL syntax error in VBA 11 32
complicated query 15 43
ms sql stored procedure 22 77
Confronted with some SQL you don't know can be a daunting task. It can be even more daunting if that SQL carries some of the old secret codes used in the Ye Olde query syntax, such as: (+)     as used in Oracle;     *=     =*    as used in Sybase …
This article describes how to use the timestamp of existing data in a database to allow Tableau to calculate the prior work day instead of relying on case statements or if statements to calculate the days of the week.
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

706 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now