all groups > sql server programming > february 2004 > threads for saturday february 28
Filter by Day: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
Invalid attempt to read when no data is present...NOT true
Posted by Trint Smith at 2/28/2004 10:48:52 PM
I keep getting this with this.
First, heres my sql string:
SELECT item_itemcurrentbidprice, item_itemcurrentorpurchasedbidder FROM
TBL_Items WHERE item_itemnumber = 'b4e81177-35dd-44d7-b996-8e285103f11a'
Here's the code: error happens at 'ToString' at the bottom.
Dim itemNumberSold As String ... more >>
Print data directly from a stored procedure?
Posted by Sandro at 2/28/2004 9:41:06 PM
Is it possible to print data using an SQL statement or stored procedure
Any suggestions would be welcom
Thank
Sandro... more >>
Specifying criteria as join condition vs WHERE clause
Posted by David F at 2/28/2004 8:48:19 PM
Does it matter whether a condition is specified as part of a JOIN or in the
WHERE clause?
In other words, this..
SELECT *
FROM orders o JOIN orderdetail od ON o.ordid=od.ordid
AND datediff (dd, o.orddate, od.orddate)=0
returns the same as this...
SELECT *
FROM orders o JOIN orde... more >>
char output params : blanks return as nulls ?
Posted by John A Grandy at 2/28/2004 4:36:39 PM
i am finding that for stored procedure output parameters of type char, blank
values are returned as nulls .... which is not what i expected ...
CREATE PROCEDURE dbo.usp_GetMaxLocationNumber
(
@Prefix char(3),
@MaxLocationNumber char(7) OUTPUT
)
AS
SET NOCOUNT ON
SELECT @MaxLocationNumbe... more >>
find out query history
Posted by hmc at 2/28/2004 4:29:05 PM
Hi,
How can I find out what's the exact queries executed on a given
database
Thanks... more >>
How can I return a TEXT data type Value ( >8000) from a stored proc?
Posted by Steven Xu at 2/28/2004 2:19:22 PM
Hi all,
Is it possiable return a text data type form a SP?
create proc test
@test_text text output
as
Select test_text from Table 1
Thanks for your time
Steve
... more >>
Create Procedure must be the first statement
Posted by Abhishek Srivastava at 2/28/2004 12:35:30 PM
Hello All,
Why should the Create Procedure be the first line of every batch? I
don't understand the reason behind this requirement.
Thanks for your help.
regards,
Abhishek.... more >>
SQL view
Posted by smk2 at 2/28/2004 12:26:04 PM
Newbie question: I have a client table (ClientID), clientPhone table (ClientID, PhoneID), and Phone table (PhoneID)
I made a view linking the clientPhone table to the phone table, but can't add any new records! PhoneID in the phone table is an identity column
What I need is a table with ClientID... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
What is wrong with this code please?
Posted by Trint Smith at 2/28/2004 11:38:52 AM
strSQL = "UPDATE [tribidz].[dbo].[TBL_Items] SET" & _
" item_itemsoldprice = " & PrepareStr(PutPriceAsSold) &
_
"FROM TBL_Items " & _
"WHERE item_itemnumber = '" & fstQuery & "'"
This is the error message:
Incorrect syntax near 'TBL_Items... more >>
Varchar Truncated
Posted by Carlos Lee at 2/28/2004 10:31:36 AM
I have a Stored Procedure where I'm using an Varchar(500) variable. But when
I store more than 255 characters and then I read it, It got truncated... I
want to know why if that kind of data suppose to store up to 8000 bytes.
Thanks in advance
Carlos Lee
... more >>
select xml value from stored xml column
Posted by italianomila2 NO[at]SPAM yahoo.com at 2/28/2004 10:19:35 AM
I have a column in a table that stores XML of an order...call the
column "order_xml."
The xml looks like this (simplified):
<?xml version="1.0"?>
<order>
<total>100</total>
</order>
I want to select just the <total> value in a select statement for each
order and then sum the results.
... more >>
'Shuffling' empty address columns
Posted by Adrian at 2/28/2004 10:13:21 AM
SQL Server 2000
I want to 'shuffle' address columns so that the first n columns always
contain the address elements.
For example:
Add1: 1
Add2: High Street
Add3:
Add4: London
Add5: W1 1AA
becomes
Add1: 1
Add2: High Street
Add3: London
Add4: W1 1AA
Add5:
or
Add1:
Add2: ... more >>
Column Alias in ORDER BY not work if in function call
Posted by ranman at 2/28/2004 10:11:04 AM
Why can't you put the column alias inside a function call in an ORDER BY clause
(Using the Northwind database
Example: The following query gives an error (Invalid column name 'title')
select ContactTitle as title from Customer
Order By LOWER(title
whereas this doesn't
select ContactTitl... more >>
Problem with select
Posted by Don Grover at 2/28/2004 8:24:36 AM
Firstly I am new at asking questions, so please excuse me if I supply too
little or too much information, and explain if I need to supply more detail,
Thanks.
Ok I have 3 tables tblConnotes, tblProducts1 and tblOrderDetails.
I am trying to include a tblConNotes.qtyRecieved as a SUM , the probl... more >>
Holidays in SQL Server
Posted by Nils Magnus Englund at 2/28/2004 3:56:35 AM
Hi!
I have a large table in SQL Server 2000 with a datetime-column 'dt'. I want
to select all rows from that table, excluding days which fall on holidays or
weekends. What is the best way to accomplish this? I considered creating a
new table called "holidays" and then selecting all rows (sort ... more >>
Storing and Retrieving URL's in SQL server database with ASP
Posted by Gunjakx at 2/28/2004 3:41:33 AM
Having small problem, i'm trying to retrieve hyperlinks
from my Database with the use of ASP, its for a small
project this i'm working on, i was woundering if anyone
had any ideas of how to set up a column within a table
that is used to store URL's. I also want to retrieve these
URL's and ... more >>
Named Transactions
Posted by Amin Sobati at 2/28/2004 12:41:18 AM
Hi,
I have problem with rolling back a named transaction:
begin tran a
insert Table1 values('test')
rollback tran a
I get this error:
Cannot roll back a. No transaction or savepoint of that name was found.
How can I rollback Transaction a?
Any help would be greatly appreciated.
Rega... more >>
|