Monday, March 26, 2012
Images and PDF Export POST SP2
View, Excel View and TIFF View, but when exported to PDF they are not
displaying properly (they appear garbled, much like a scrambled TV signal).
Any ideas or thoughts?On Follow Up.. this appears to be images other than JPEG's, which according
to documentation are all rendered as PNG's.
"Rob Johnson" wrote:
> After installing RS SP2, images included in my reports display fine in HTML
> View, Excel View and TIFF View, but when exported to PDF they are not
> displaying properly (they appear garbled, much like a scrambled TV signal).
> Any ideas or thoughts?
image won't show up
I have an image to put into a report. It's a jpg. I can see it in
layout view, but in preview or when deployed, i get a red "x" - any
idea why or how to fix it? Thanks!!
jenrI have experienced the same problem in 2005 - NEVER in 2000!
I don't know what is happening!
"jenr" wrote:
> Hey all,
> I have an image to put into a report. It's a jpg. I can see it in
> layout view, but in preview or when deployed, i get a red "x" - any
> idea why or how to fix it? Thanks!!
> jenr
>|||Well -
Is the image in your "project" ?
Was the image deployed to your server with the "deploy" of the project?
That is all I have ever done in the past - but I am speculating "here" and I
think there are some weird issues with the GDI of 2005! As I have said in
previous posts a graphical report in RS2000 works perfectly and taking the
same report to 2005 - some graphs are never rendered - a GDI+ error. Maybe
not the same with a *.jpg - but something for sure is funny somewhere.
Warm REgards,
joe
"code_slayer_bkk" wrote:
> I have experienced the same problem in 2005 - NEVER in 2000!
> I don't know what is happening!
> "jenr" wrote:
> > Hey all,
> >
> > I have an image to put into a report. It's a jpg. I can see it in
> > layout view, but in preview or when deployed, i get a red "x" - any
> > idea why or how to fix it? Thanks!!
> >
> > jenr
> >
> >
Wednesday, March 21, 2012
Image in DB tout.
Does anyone know how to put images in side of a Grid View Database, or know of a torturial.??
Thanks
Yes, we have four tutorials on this very topic. Please read theWorking with Binary Files tutorials.
ServerMayhem:
or know of a torturial.??
image files
the image in RS/RM, it does not display. Only a red X displays.
I'm using RS 2000 with Form based authentication.
Please Help!!!!On Mar 13, 2:56 pm, Nikki <N...@.discussions.microsoft.com> wrote:
> I've uploaded a gif file to RS using Reports Manager, but when I go to view
> the image in RS/RM, it does not display. Only a red X displays.
> I'm using RS 2000 with Form based authentication.
> Please Help!!!!
I would suggest embedding the image in the report itself. Hope this
helps.
Regards,
Enrique Martinez
Sr. SQL Server Developer|||how do I embed an image?
"EMartinez" wrote:
> On Mar 13, 2:56 pm, Nikki <N...@.discussions.microsoft.com> wrote:
> > I've uploaded a gif file to RS using Reports Manager, but when I go to view
> > the image in RS/RM, it does not display. Only a red X displays.
> >
> > I'm using RS 2000 with Form based authentication.
> >
> > Please Help!!!!
> I would suggest embedding the image in the report itself. Hope this
> helps.
> Regards,
> Enrique Martinez
> Sr. SQL Server Developer
>
Monday, March 19, 2012
Im sure this is an easy one...Error trap to skip over a "bad" object.
Server and call the "sp_refreshview" command against it. It works
great until it finds a view that is damaged, or otherwise cannot be
refreshed. Then the whole routine stops working.
Can someone please help me re-write this code so that any views that
fail the "sp_refreshview" command get skipped. I'm sure it's just a
matter of putting some basic error trapping into the loop, but I've had
a few goes at it and failed.
Many thanks.
DECLARE @.DatabaseObject varchar(255)
DECLARE ObjectCursor CURSOR
FOR SELECT table_name FROM information_schema.tables WHERE table_type =
'view'
OPEN ObjectCursor
FETCH NEXT FROM ObjectCursor INTO @.DatabaseObject
WHILE @.@.FETCH_STATUS = 0
BEGIN
EXEC sp_refreshview @.DatabaseObject
Print @.DatabaseObject + ' was successfully refreshed.'
FETCH NEXT FROM ObjectCursor INTO @.DatabaseObject
END
CLOSE ObjectCursor
DEALLOCATE ObjectCursor
GO(rod.weir@.gmail.com) writes:
> Hello, I have the following code to iterate through each view in a SQL
> Server and call the "sp_refreshview" command against it. It works
> great until it finds a view that is damaged, or otherwise cannot be
> refreshed. Then the whole routine stops working.
> Can someone please help me re-write this code so that any views that
> fail the "sp_refreshview" command get skipped. I'm sure it's just a
> matter of putting some basic error trapping into the loop, but I've had
> a few goes at it and failed.
If you are on SQL 2005, lookup TRY-CATCH in Books Online.
If you are on SQL 2000, you could possibly do the linked-server trick:
http://www.sommarskog.se/error-hand...#linked-servers.
I'm not into refreshing views myself, but I can't think of a way to
detect this condition before-hand.
--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pr...oads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodin...ions/books.mspx|||Thanks Erland,
I need to refresh all views because there are some views that have
embedded views within them, using a Select * statement. When the
underlying view changes (new column etc), the parent view does not pick
up the new column in the embedded view that it references.
Using SQL Server 2000. Surely there must be a simple way to trap the
error and skip over it right?
Perhaps just after the following line...
EXEC sp_refreshview @.DatabaseObject
...you examine @.@.Error and ignore or continue in the loop? Sorry, I'm
primarily a VB developer, so this TSQL has got me a little puzzled.
I'll give your website a read. Thanks again.|||> ...you examine @.@.Error and ignore or continue in the loop?
Some errors will abort the batch so you are SOL after the error. If the
linked server doesn't work for you, you might try preceeding the
sp_refreshview with a select statement with SET FMTONLY ON. That will allow
you detect the error and skip the sp_refreshview for problem views.
DECLARE @.DatabaseObject nvarchar(261)
DECLARE ObjectCursor CURSOR FAST_FORWARD READ_ONLY
FOR SELECT
QUOTENAME(TABLE_SCHEMA) +
'.' +
QUOTENAME(TABLE_NAME)
FROM INFORMATION_SCHEMA.TABLES
WHERE table_type = 'VIEW'
OPEN ObjectCursor
WHILE 1 = 1
BEGIN
FETCH NEXT FROM ObjectCursor INTO @.DatabaseObject
IF @.@.FETCH_STATUS = -1 BREAK
PRINT 'Refreshing view ' + @.DatabaseObject
EXEC ('SET FMTONLY ON SELECT * FROM ' + @.DatabaseObject)
IF @.@.ERROR = 0
BEGIN
EXEC sp_refreshview @.DatabaseObject
PRINT 'View ' + @.DatabaseObject + ' refreshed'
END
ELSE
BEGIN
PRINT 'Error refreshing view ' + @.DatabaseObject
END
END
CLOSE ObjectCursor
DEALLOCATE ObjectCursor
GO
--
Hope this helps.
Dan Guzman
SQL Server MVP
<rod.weir@.gmail.com> wrote in message
news:1143705825.644611.51750@.u72g2000cwu.googlegro ups.com...
> Thanks Erland,
> I need to refresh all views because there are some views that have
> embedded views within them, using a Select * statement. When the
> underlying view changes (new column etc), the parent view does not pick
> up the new column in the embedded view that it references.
> Using SQL Server 2000. Surely there must be a simple way to trap the
> error and skip over it right?
> Perhaps just after the following line...
> EXEC sp_refreshview @.DatabaseObject
> ...you examine @.@.Error and ignore or continue in the loop? Sorry, I'm
> primarily a VB developer, so this TSQL has got me a little puzzled.
> I'll give your website a read. Thanks again.|||[My newsserver had an outage, and my original post got lost. Now that it's
back, I'm reposting]
(rod.weir@.gmail.com) writes:
> I need to refresh all views because there are some views that have
> embedded views within them, using a Select * statement.
Did anyone tell you that this is bad practice? :-)
> Using SQL Server 2000. Surely there must be a simple way to trap the
> error and skip over it right?
> Perhaps just after the following line...
> EXEC sp_refreshview @.DatabaseObject
> ...you examine @.@.Error and ignore or continue in the loop? Sorry, I'm
> primarily a VB developer, so this TSQL has got me a little puzzled.
The problem is that there are quite few errors that abort the batch, and
those you cannot trap easily in SQL 2000. I seem to recall that refreshview
errors belongs to this group. The linked-server trick is a serious kludge,
but for this case it could be worth the pain.
Then again, if you are a VB developer, just code the loop in a VB program
or in VB script. That's probably easier than setting up linked servers for
this task.
--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.seBooks Online for SQL
Server 2005
athttp://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
Books Online for SQL Server 2000
athttp://www.microsoft.com/sql/prodinfo/previousversions/books.mspx|||Hi Dan,
Many thanks for your response. This code does exactly what I'm after.
It skipped over the bad queries and kept refreshing the good ones. I
modified the following line to speed it up a little bit.
EXEC ('SET FMTONLY ON SELECT * FROM ' + @.DatabaseObject + 'Where 1=0')
Notice the Where 1 = 0 clause? Much quicker now.
Thanks Dan and Erland. Problem solved.
p.s. Erland. I am going to start another thread on the evils of
embedded queries. I have heard a lot of people say that this is a bad
practice, however I've never heard any really compelling evidence to
say why.
Friday, March 9, 2012
IIS Virtual Server for SQLServer ... not authorised to view
the posts I cannot find a resolution.
I have a W2K Pro Machine installed with IIS and SQLServer 2K (let's call
this Dev1)
I have a XP Pro Machine installed with IIS and SQLServer 2K (let's call this
Dev2)
Dev1 is used for day to day development. I have several SQL scripts to set
up a database, whereby I create a databse, 2 (two) SQL user accounts, some
Views, several stored procedures, and populate with some initial data. -No
problems so far.
I use the "Configure SQL XML Support in IIS" menu option and I do just that,
i.e. I set up a VDir with a sub directory for my templates (xml files) which
contain stuff for calling the stored procedures formatting the returned data
etc. I configure the VDir security method to use one of the SQL user accounts
that I have created in my SQL script. Using my IE browser, I navigate to the
templates dir and retrieve the data as expected.-No problems so far.
Now, I want to take this stuff and show to a client, so I want to install it
on my laptop (Dev2). I follow the exact same routine as for Dev1, however
when I come to view the data in my browser, I get
HTTP 401.1 Unauthorized: Logon Failed
I cannot for the life of me figure out the difference. As far as I can tell,
everything is the same except for Dev2 has XP Pro and Dev1 has 2K Pro.
Can somebody please help me out with this ... and tell me what other info
you need to know.
Thanks in advance.
Hmmm...You have ensured that Dev2 allows Sql Logins and not just windows,
correct? And that the account is properly set up with permission on the
right database, tables, etc?
Thanks,
Irwin
Irwin Dolobowsky
Program Manager, SqlXml
http://blogs.msdn.com/irwando
This posting is provided "AS IS" with no warranties, and confers no rights.
"billr" <billr@.discussions.microsoft.com> wrote in message
news:B784272C-D070-4C8A-89F4-4CB64072D710@.microsoft.com...
> I'm sorry if this q has already been answered, however after looking
> through
> the posts I cannot find a resolution.
> I have a W2K Pro Machine installed with IIS and SQLServer 2K (let's call
> this Dev1)
> I have a XP Pro Machine installed with IIS and SQLServer 2K (let's call
> this
> Dev2)
> Dev1 is used for day to day development. I have several SQL scripts to set
> up a database, whereby I create a databse, 2 (two) SQL user accounts, some
> Views, several stored procedures, and populate with some initial data. -No
> problems so far.
> I use the "Configure SQL XML Support in IIS" menu option and I do just
> that,
> i.e. I set up a VDir with a sub directory for my templates (xml files)
> which
> contain stuff for calling the stored procedures formatting the returned
> data
> etc. I configure the VDir security method to use one of the SQL user
> accounts
> that I have created in my SQL script. Using my IE browser, I navigate to
> the
> templates dir and retrieve the data as expected.-No problems so far.
> Now, I want to take this stuff and show to a client, so I want to install
> it
> on my laptop (Dev2). I follow the exact same routine as for Dev1, however
> when I come to view the data in my browser, I get
> HTTP 401.1 Unauthorized: Logon Failed
> I cannot for the life of me figure out the difference. As far as I can
> tell,
> everything is the same except for Dev2 has XP Pro and Dev1 has 2K Pro.
> Can somebody please help me out with this ... and tell me what other info
> you need to know.
> Thanks in advance.
>
|||Yes, I have,
I use exactly the same sql script to create the user accounts and the
database,
SQLaccount1 owns all stored procedures, views and tables
SQLaccoutn2 is granted executable permissions on the relevant stored procs
When I create the vdir I select to use SQL Server login details, and I enter
the details for SQLaccount2. Then I can select the database from the list in
the IIS configuration tool so I know it is not a problem with SQL
authentication.
If I inspect the virtual dir using the IIS snapin, on both machines the
details are exactly the same ... I select the DirectorySecurity tab and
select the Anonymous access and authentication button, and in the dialog that
pops up I can see that Anonymous access is enabled, the username text box is
empty and the option to Allow IIS to control passwword is selected.
"Irwin Dolobowsky [MS]" wrote:
> Hmmm...You have ensured that Dev2 allows Sql Logins and not just windows,
> correct? And that the account is properly set up with permission on the
> right database, tables, etc?
> --
> Thanks,
> Irwin
> Irwin Dolobowsky
> Program Manager, SqlXml
> http://blogs.msdn.com/irwando
> This posting is provided "AS IS" with no warranties, and confers no rights.
>
> "billr" <billr@.discussions.microsoft.com> wrote in message
> news:B784272C-D070-4C8A-89F4-4CB64072D710@.microsoft.com...
>
>
Wednesday, March 7, 2012
IIS Basic authentication problem - 401 Unauthorized error
I have users attempting to view reports (created in Reporting Services 2000)
over the web and they're receiving a "401 - Unauthorized" error due to
invalid credentials. Here is the VB.NET code that's being used to
authenticate the user:
Dim strURL as String = "http://mydomain.mywebsite.com/ReportServer?MyFolder/MyReport?arg1=1&arg2=2&rs:Command=Render&rs:Format=PDF"
Dim ReportWebRequest As HttpWebRequest = CType(WebRequest.Create(strReportURL), HttpWebRequest)
ReportWebRequest.Timeout = 1000000
ReportWebRequest.MaximumAutomaticRedirections = 50
ReportWebRequest.Headers.Add("Authorization", "Basic " +
Convert.ToBase64String(Encoding.ASCII.GetBytes("userid:password")))
ReportWebRequest.PreAuthenticate = True
Dim ReportWebResponse As HttpWebResponse = CType(ReportWebRequest.GetResponse(), HttpWebResponse)
We would prefer not to turn on anonymous access. We are running IIS vers.6
on a Win 2003 Server. Any ideas?
Thanks in advance,
BruceBruce,
Try replacing the following lines of code...
ReportWebRequest.Headers.Add("Authorization", "Basic " +
Convert.ToBase64String(Encoding.ASCII.GetBytes("userid:password")))
ReportWebRequest.PreAuthenticate = True
...with these lines:
Dim cCache = New CredentialCache
cCache.Add(New Uri(strReportURL), "Basic", New NetworkCredential("userid",
"password", "domain"))
ReportWebRequest.Credentials = cCache
Hope this helps,
Steve
"Bruce A" wrote:
> Hello all,
> I have users attempting to view reports (created in Reporting Services 2000)
> over the web and they're receiving a "401 - Unauthorized" error due to
> invalid credentials. Here is the VB.NET code that's being used to
> authenticate the user:
> Dim strURL as String => "http://mydomain.mywebsite.com/ReportServer?MyFolder/MyReport?arg1=1&arg2=2&rs:Command=Render&rs:Format=PDF"
> Dim ReportWebRequest As HttpWebRequest => CType(WebRequest.Create(strReportURL), HttpWebRequest)
> ReportWebRequest.Timeout = 1000000
> ReportWebRequest.MaximumAutomaticRedirections = 50
> ReportWebRequest.Headers.Add("Authorization", "Basic " +
> Convert.ToBase64String(Encoding.ASCII.GetBytes("userid:password")))
> ReportWebRequest.PreAuthenticate = True
> Dim ReportWebResponse As HttpWebResponse => CType(ReportWebRequest.GetResponse(), HttpWebResponse)
> We would prefer not to turn on anonymous access. We are running IIS vers.6
> on a Win 2003 Server. Any ideas?
> Thanks in advance,
> Bruce
IIS 405 Resource Not Allowed
receive a 405 Resource Not Allowed Error. I have re-installed Report Server
and updated to Service pack 2 for Reporting services, with no change in the
outcome.
The Initial load of each of these reports works fine, however when I change
the condition dropdowns or "View Report" I recieve this error.
The problem first started when the Default Directory under IIS was
accidentially deleted and then re-created.
Any assistance would be appreciatedHello,
Go to IIS, right click on your web server, click on configuration button, go
to .aspx -->Edit
and be shure that on the verbs section you have the POST
hope this can help you|||rectification about my previous post:
under IIS go to the virtual folder "ReportServer" , click on the
"configuration" button .
Under the "App Mappings" tab look if you have the extension *, if it's not
the case you have to click "Add" and browse on the "Executable" field to find
aspnet_isapi.dll (c:\winnt\Microsoft.Net\framework\v1.1.4322).
On "Extension" field write * and on the verb section select "All verbs"
And that's it|||This is valid only for IIS 5.
Under IIS 6 you must insert
"c:\windows\microsoft.net\framework\v1.1.4322\aspnet_isapi.dll" filter under
"WillCard application Maps".
Bye.
"Wjm" wrote:
> rectification about my previous post:
> under IIS go to the virtual folder "ReportServer" , click on the
> "configuration" button .
> Under the "App Mappings" tab look if you have the extension *, if it's not
> the case you have to click "Add" and browse on the "Executable" field to find
> aspnet_isapi.dll (c:\winnt\Microsoft.Net\framework\v1.1.4322).
> On "Extension" field write * and on the verb section select "All verbs"
> And that's it
Friday, February 24, 2012
IIF Statement to Case but getting error
in a view. This one poplulates one column in the view:
IF(DATEDIFF(dd, MAX(INVOICE_DA), GETDATE())<=30 AND
COUNT([CUSTOMER__])>=5,YES,NO)
to:
CASE WHEN DATEDIFF(dd, MAX(INVOICE_DA), GETDATE())<=30 AND
COUNT([CUSTOMER__])>=5 THEN 'YES' ELSE 'NO'
I'm getting an error that says the query designer does not support the CASE
sql construct. Any thoughts on how I can rewrite the IIF statement so that i
t
can work in a sql view? THANKS!!Mike,
Where are you creating the view?. Use Query analyzer.
AMB
"Mike C" wrote:
> I tried converting the statement below, which is just one of many statemen
ts
> in a view. This one poplulates one column in the view:
> IF(DATEDIFF(dd, MAX(INVOICE_DA), GETDATE())<=30 AND
> COUNT([CUSTOMER__])>=5,YES,NO)
> to:
> CASE WHEN DATEDIFF(dd, MAX(INVOICE_DA), GETDATE())<=30 AND
> COUNT([CUSTOMER__])>=5 THEN 'YES' ELSE 'NO'
> I'm getting an error that says the query designer does not support the CAS
E
> sql construct. Any thoughts on how I can rewrite the IIF statement so that
it
> can work in a sql view? THANKS!!|||Mike C a écrit :
> I tried converting the statement below, which is just one of many statemen
ts
> in a view. This one poplulates one column in the view:
> IF(DATEDIFF(dd, MAX(INVOICE_DA), GETDATE())<=30 AND
> COUNT([CUSTOMER__])>=5,YES,NO)
> to:
> CASE WHEN DATEDIFF(dd, MAX(INVOICE_DA), GETDATE())<=30 AND
> COUNT([CUSTOMER__])>=5 THEN 'YES' ELSE 'NO'
END missing in CAS structure :
CASE
WHEN DATEDIFF(dd, MAX(INVOICE_DA), GETDATE()) <=30
AND COUNT([CUSTOMER__]) >= 5 THEN 'YES'
ELSE 'NO'
END as YesNoCol
> I'm getting an error that says the query designer does not support the CAS
E
> sql construct. Any thoughts on how I can rewrite the IIF statement so that
it
> can work in a sql view? THANKS!!
A +
Frédéric BROUARD, MVP SQL Server, expert bases de données et langage SQL
Le site sur le langage SQL et les SGBDR : http://sqlpro.developpez.com
Audit, conseil, expertise, formation, modélisation, tuning, optimisation
********************* http://www.datasapiens.com ***********************|||Alejandro,
Thank you. That worked. The problem I'm left with is how to run this report
automatically. I've been using DTS to export a view to an Excel sheet but it
looks like that won't work in this case. I guess I could try to put this in
an sp (which I haven't done much of and should probably start mastering) and
either DTS the sp result or I could just throw the results in a web-based
datagrid and export the datagrid to Excel on demand. Do you have any
recommendations on how to make the query results available to users? Thanks
again for the earlier suggestion.
MC
"Alejandro Mesa" wrote:
> Mike,
> Where are you creating the view?. Use Query analyzer.
>
> AMB
> "Mike C" wrote:
>|||I actually had END in the view but I forgot to type it into my question.
"SQLpro [MVP]" wrote:
> Mike C a écrit :
> END missing in CAS structure :
>
> CASE
> WHEN DATEDIFF(dd, MAX(INVOICE_DA), GETDATE()) <=30
> AND COUNT([CUSTOMER__]) >= 5 THEN 'YES'
> ELSE 'NO'
> END as YesNoCol
>
> A +
> --
> Frédéric BROUARD, MVP SQL Server, expert bases de données et langage SQ
L
> Le site sur le langage SQL et les SGBDR : http://sqlpro.developpez.com
> Audit, conseil, expertise, formation, modélisation, tuning, optimisation
> ********************* http://www.datasapiens.com ***********************
>
Sunday, February 19, 2012
IIf in SQL
I'm trying to use the function IIf in a view in SQL SERVER 2005, but I get a message "IIf is not recognized as a built-in function".
How can I make it work, or at least see a list of all the built-in functions?
Your DB --> Programmability --> Functions for all built-in functions
|||You need to use CASE in SQL Server (which is not the same as IIF in Access). You can search (SQL CASE) to find how to use it.
IIF function or case
My "Case"
USE SysproCompanyB
GO
SELECT dbo.ZZCuCostValue.Supplier, dbo.ZZCuCostValue.StockCode, dbo.ZZCuCostValue.[Year], dbo.ZZCuCostValue.[Month],'RandCost' =
CASE
WHEN BuyMulDiv IS NULL THEN '0'
WHEN BuyMulDiv = 'M' THEN round(dbo.ZZCuCostValue.UnitCost * dbo.ZZCuCostValue.ExchangeRate,4)
WHEN BuyMulDiv = 'D' THEN round(dbo.ZZCuCostValue.UnitCost / dbo.ZZCuCostValue.ExchangeRate,4)
ELSE 0
END
FROM dbo.ApSupplier INNER JOIN
dbo.TblCurrency ON dbo.ApSupplier.Currency = dbo.TblCurrency.Currency INNER JOIN
dbo.ZZCuCostValue ON dbo.ApSupplier.Supplier = dbo.ZZCuCostValue.Supplier
GORun the create view script in Query Analyzer, and you should not get the Enterprise Mangler error message. CASE is perfectly fine in a view, but EM has problems with it.|||Thanks I will try that|||Hi MCrowley. This may sound realy simple how do I run the script in Query Analyzer I can not seem to find any thing that looks fimilar..|||Are you in Enterprise Manager? If so, click on the Tools Menu Item then click on SQL Query Analyzer. Then, select your database from the dropdown atthe top middle of the screen, cut and paste your code, then click on the green arrow next to the blue checkmark to execute the script.|||HI Tomh53 thanks for that but I was wanting to know how to run the create view script that MCrowley told me about.
Jakes|||Here is a sample. Replace the select statement with your query:
create view vwTest
as
select *
from pubs..authors
IIF Datediff in SQL SERVER
I am trying to build a view in SQL server. I have a function in Access
which looks like this:
Breach:
IIf(DateDiff("n",[PP_ARRIVAL_DATE],[PP_DISCHARGE_DATE])>240,"Breach","Non
Breach")
>From reading it is clear that the IIF statement is not available in
SQLServer what do i need to use to produce the same results in
SQLServer?
ThanksSELECT CASE WHEN DATEDIFF(MINUTE, PP_ARRIVAL_DATE, PP_DISCHARGE_DATE) > 240
THEN 'Breach' ELSE 'Non Breach' END
http://www.aspfaq.com/2214
"yariso" <john.campbell600@.ntlworld.com> wrote in message
news:1124112204.794604.128840@.z14g2000cwz.googlegroups.com...
> Hi,
> I am trying to build a view in SQL server. I have a function in Access
> which looks like this:
> Breach:
> IIf(DateDiff("n",[PP_ARRIVAL_DATE],[PP_DISCHARGE_DATE])>240,"Breach","Non
> Breach")
>
> SQLServer what do i need to use to produce the same results in
> SQLServer?
> Thanks
>|||Great stuff thanks