Viewing 15 posts - 16 through 30 (of 67 total)
For the following procedure:
use Northwind
Create Proc checkCrossCall
as
Declare @sql as nvarchar(4000)
Set @sql=N'use pubs select * from publishers'
exec sp_executeSQL @sql
This is the easiest solution:
You must grant the user execute permission in Northwind...
October 13, 2004 at 3:08 pm
This error sounds like a VB error not a SQL error.
Could you post the code you are calling the proc with?
October 13, 2004 at 2:56 pm
For the Most Part,
I would Agree Keep Pictures in the File System not in the SQL.
If however you, for instance, had an application like this forum, I think it would...
October 13, 2004 at 1:23 pm
BTW,
Here is a Query that will work against a nested set Hierarchy that will return a column that you can use for indenting.
SELECT T1.pk_location AS pk_Item,
(COUNT(T2.pk_location)-1) AS indentation,
T1.location AS Item
FROM h_location...
October 13, 2004 at 12:14 pm
Hi,
Here is a proc I use to list and enumerate entities from a specific report:
SELECT
identity(INT,1,1) AS [count],
pk_entity,
fk_entityType,
FullName,
DateOfBirth,
Address,
CityStateZip,
gender,
Race,
HairColor,
Eyecolor,
Height,
Weight,
DriversLicenseNumber,
DriversLicenseState,
fullstring,
badgeNumber,
ContactType,
PhotoFile,
fk_Report,
DateDiff(year,DateOfBirth,getdate()) AS age
into #temp
FROM ReportEntityInfoList
WHERE fk_Report=@pk_Report
ORDER BY ContactType
SELECT * FROM #temp
END
It...
October 13, 2004 at 11:49 am
Here is a Vb.net flavor Connection:
Dim SqlConnection1 as new System.Data.SqlClient.SqlConnectionSqlConnection1.ConnectionString =YourConnectionStringDim SqlCommand1 as new System.Data.SqlClient.SqlCommandSqlCommand1.CommandText = YourProcedureNameSqlCommand1.CommandType = System.Data.CommandType.StoredProcedureSqlCommand1.Connection = Me.SqlConnection1SqlCommand1.Parameters.Add(New System.Data.SqlClient.SqlParameter("@YourParameter", System.Data.SqlDbType.Int, 4))SqlCommand1.Parameters.Item(0).Value = YourValue dim dr as System.Data.SqlClient.SqlDataReaderSqlConnection1.Open()dr...
October 13, 2004 at 11:45 am
Welcome to the forum Joe,
I have tried, all be it poorly, to explain your nested set hierarchy in a few posts.
I use it a lot; it works very well...
October 13, 2004 at 11:37 am
I would agree with olavho with these exceptions.
I feel safer putting the wildcards in my procedure not in the Parameters.
I also delcare the Parameters so I can use...
October 6, 2004 at 10:35 am
HI, it will work with colum name as well, thing is you have the order of the variables backwards.
the first string is what your looking for, the second is what...
October 4, 2004 at 6:33 am
Hi, first you are missing a paran after data add
Both Of These Work:
Select * from Report where datediff(dd,Recorddate,'02/08/2004 4:15:04 PM')<100
Select * from Report where datediff(dd,Recorddate,'02/aug/2004 4:15:04 PM')<100
HTH
tal...
August 5, 2004 at 6:50 am
I would like to emphasize that robbac had the correct solution.
Using a cursor is generally bad mojo--especially if you can just query to get a specific record do that.
a...
August 5, 2004 at 6:37 am
Beware of web services,
Out of the box reading all of the Propoganda they are really cool. But, currently, they are not designed for anonymous public use like...oh say the internet. ...
August 5, 2004 at 6:30 am
Hi, I think that you need to be a bit more specific about what exactely your tables hold.
it appears that you have "simplified" it and now it is confusing. ...
August 4, 2004 at 8:10 am
In short, Yes it is possible. Your post however does not give enough information for someone to tell you how.
You can store the Text of a text file in a...
August 4, 2004 at 7:53 am
Yeah I hate posts that end with ...."Nevermind I Got it"
t
July 29, 2004 at 2:36 pm
Viewing 15 posts - 16 through 30 (of 67 total)