Frustrated In Ohio

May 14, 2008

Folks, I've been trying to extract the minimum and maximum date from the following query:

select top 27 calendar_day.date_value from calendar_day where calendar_day.date_value < current_date() and calendar_day.insession = 1 order by calendar_day.date_value desc

When I then turn this into a derived table and try to extract the minimum/maximum dates, I get the actual minimum/maximum dates of the whole table rather than the result set from the derived table, so obviously it's an aggregate problem. I'm at a loss to figure out how to pull these two dates out and would appreciate any help from more seasoned SQL folks than me.

Thanks,

David

P.S. I'm using SYBASE SQL

View 9 Replies


ADVERTISEMENT

Frustrated

May 21, 2004

I'm not to familiar with SQL so I'm frustrated. The deal is this: I have a table with product information in it. I'm creating an xml doc from this data via a datagrid. I have to add two extra fields into the table to match my DTD. I did that fine and what I need to do is set those fields equal to the value in another. I need to pull my id field value and store that in the BuyUrl field which is appended to the end of a url. How can I achieve this? Thanks for your help.

View 5 Replies View Related

I Am Soo Frustrated!

May 22, 2008

Please help!

I have just set up SQL server and Visual Studio Pro to set up a development machine for a uni course I am doing, I have begun writing databases and at first everything seems okay, I write a small app fire it off in debug and all works, then without warning Visual Studio is unable to connect to the database despite using the corrrect credentials, I knows its an SQL problem because I get a server error through IIS telling me that it cannot connect through <em>ComputerNameLoginName</em>

if i turn everything off and restart IIS I can get a connection but then despite it retrieveing the database when testing a query (within the add SQL connection form in VS2008, it shows the table info)
Then once again al is lost and it refuses to tafe valid connections until I restart (however I CAN login through SQL Management)

Any suggestions gratefully recieved!


Jimmy


Me transmitte sursum, caledoni

View 2 Replies View Related

Okay, I'm Frustrated....how Do I

Aug 21, 2006

Greetings, all!I've searched the MS SQL Server Books Online and this group.I've been doing Oracle on UNIX for 12+ years, and now I have some SQLServer databases.I've discovered the INFORMATION_SCHEMA tables (just like the good ol'dba_* views inOracle)I've figured out how to use SQL2005 Management Studio.What'd I'd like to know is - can SQL Server be used to write SQL likeOracle can; e.g:spool csyn.sqlset heading offset pagesize 6000select 'CREATE PUBLIC SYNONYM '||table_name||' FORSYSADM.'||TABLE_NAME||';'from dba_tables where owner='SYSADM';spool offIn SQL*Plus, the above will create a script to create public synonymsfor tables in a PeopleSoft database (tables in PeopleSoft multiply likeTribbles in a storage bin of quadrotriticale...).Yah, GUI's are fine....until you have thousands and thousands of tablesto deal with!Thanks ever so much

View 1 Replies View Related

Frustrated With SQL Mail

Oct 2, 1998

Can anyone get SQL Mail to work? Just so as I know that what I`m doing is not a complete waste of time.

Scenario
SQL Server 6.5 SP4, NT 4.0 SP3, Outlook 97/Exchange Client 4.0
I want to automatically email a workstation the status Scheduled Tasks from SQL Server. This mail will then be forwarded via SMS to a mobile phone.

I can send messages from SQL successfully. These I can see in the Outbox of Outlook, but the messages do not always leave the Outbox. Users have recieved SQL mail, but this generally requires restarting Outlook on the server (which tends to crash most of the time so various processes have to be terminated - all very messy). I can send `manual` mail to users using Outlook, no problem. I even can see these messages leave the Outbox, while SQL Mail stays.

Has anyone experienced similiar problems, or got any suggestions

Thanks in advance

Frustrated!?!
Jasper

View 2 Replies View Related

So Frustrated...why Does It Have To Be So Difficult

Nov 22, 2006

Why have you made connecting to a sql server express database so difficult?

I have it working locally, but going to production has been nothing but a nightmare.

I can't even connect locally on the production box.

I am on a dedicated server and my login is an Admin on the box. I have just installed SQL Express + the fancy management interface.

I have made a copy of my database that I was connecting to dynamically (which was failing remotely) and I have attached it to the server.  I have made myself a user of the database and granted my self evey permission available.

I have turned on impersonation in my web.config.  The database knows it's me trying to connect and STILL denies me when I'm actually ON the production server.  It is not even a remote connection problem.

How can I sit there an look at myself as a user of the database in the admin interface, yet I cannot connect via a web app.  With SQL server 2000 and MSDE it was soooo simple....

Here is a snippet from my web.config

<connectionStrings>
      <remove name="LocalSqlServer"/>
      <add name="LocalSqlServer" connectionString="Data Source=localhost;Integrated Security=True;Initial Catalog=TEST" providerName="System.Data.SqlClient"/>
     ...

</connectionStrings>

Here is the error:
Cannot open database requested in login 'TEST'. Login fails.
Login failed for user 'DEDICATEDquick'.

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.

Exception Details: System.Data.SqlClient.SqlException: Cannot open database requested in login 'TEST'. Login fails.
Login failed for user 'DEDICATEDquick'.

 

I have a screen shot of the admin interface to prove I am a user.

This should be a 5 minute task that has eaten up days.

So frustrated...

 

Bernie Quick

View 6 Replies View Related

Frustrated With Service Broker Example

Mar 15, 2006

I want to use a Service Broker Queue as a processing queue. I found several examples on the WEB and have tried to make them work but they do not. Below is the example I used and I ASSUME I should get a Hello World in the Message field at the end but its empty.

Any ideas as to why?
I have tried
select * from ReceiverQueue
and
select * from SenderQueue
before I do a RECIEVE and both QUEUE's are empty

Scooter
----------------------------------CODE--------------------------------------------
USE AdventureWorks
GO

CREATE MESSAGE TYPE HelloMessage VALIDATION = NONE
GO

CREATE CONTRACT HelloContract (HelloMessage SENT BY INITIATOR)
GO

CREATE QUEUE SenderQueue
CREATE QUEUE ReceiverQueue
GO

CREATE SERVICE Sender ON QUEUE SenderQueue
CREATE SERVICE Receiver ON QUEUE ReceiverQueue (HelloContract)
GO

DECLARE @conversationHandle UNIQUEIDENTIFIER
DECLARE @message NVARCHAR(100)
BEGIN
BEGIN TRANSACTION;
BEGIN DIALOG @conversationHandle
FROM SERVICE Sender
TO SERVICE 'Receiver'
ON CONTRACT HelloContract
-- Send a message on the conversation
SET @message = 'Hello, World';
SEND ON CONVERSATION @conversationHandle
MESSAGE TYPE HelloMessage (@message)
COMMIT TRANSACTION
END
GO

--select * from ReceiverQueue
--select * from SenderQueue
RECEIVE CONVERT(NVARCHAR(max), message_body) AS message FROM ReceiverQueue

-- Cleanup
DROP SERVICE Sender
DROP SERVICE Receiver
DROP QUEUE SenderQueue
DROP QUEUE ReceiverQueue
DROP CONTRACT HelloContract
DROP MESSAGE TYPE HelloMessage
GO

View 7 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved