Using the Master database is there a way to return a value if a table exists in a different database.
Any help would be great.
Currently I am trying to get it this way.
DECLARE @vCharDatabaseName varchar(255)
SET @vCharDatabaseName = 'MyDatabase'
/* @vCharDatabaseName is passed into the SP...
Issue: I have a MSDE SQL database that needs to return it to the original state after it is shown to customers.
I would like to create a job that will
Detach the database,
Copy the .mdf and .ldf file from a backup location located on the same machine
Attach the database.
Question:
If I use...
Hello Everyone
I have over 130 databases
that are exactly the same, (Different Data)
I need to drop a Column in a single table
table = Products
Column = Old_CAT_ID
Is there a way to create a stored PRoc to cycle all databases
and drop just one Column
Thanks
Hello Every one,
I have a table that has four records in it
ID, Item , ItemName
Values
1, type1, Name1
2, type2, Name2
3, type3, Name3
4, type4, Name4
Output Needed Is this
ID, ItemName
1,'name1,Name2,name3,Name4'
Thanks in advance
Any help would be greatly appreciated
I have been writing a DTS package using the Eval Version of SQL
The trial period has expired and I cannot install a full version on my Windows Pro System
The Question is:
Can I retrieve the DTS Package from a file to import into my Full Version of SQL?
I have phone numbers in a nvarchar(20) Column I need to remove all
Non numeric Characters and remove extra number leaving a 10 digit number
Is there to replace using like % a-z %
This is what I am using now
CONVERT(...
V_SQL = V_SQL & "RTrim(LTrim(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE((SELECT ParentName From CategoryParentLookUp WHERE Product.CategoryID =MainID),',','<\Co>'),CHR(34),'<\DQ>'),CHR(13),''),CHR(9),''),CHR(10),''))) AS MainCategory From PRODUCT
I get this Error.
Undefined function 'REPLACE'...
I have one table that holds Billing and Shipping information
There is a Bit set to true if the Billing is the same as the Shipping
Here is what I need to do
If Bit = true Show shipping info
If Bit = False Show billing info
Fields are
BillingFirstname ,BillingLastName, ShippingfirstName...
Hello All
I have an Identity Field and it starts at 1
I want to set this value to 10000
Without inserting Data
The Identity Field is 2000 Now
These values are already created and have data in them
Can this be done?
Thanks In Advance
Hello Everyone
Can anyone help me with this?
As you can see with the SP below I am updating
dbo.Product.CustomerPrice
With a value that I am pulling from
dbo.RawProducts.CustomerPrice
When I try to execute this SP
I am getting this error
(Subquery returned more than 1 value. This is not...
Hello All,
I am having a issues with trying to display a image that has been saved to my database.
Here is the code that I am trying to use.
Can any one help??
Dim ID
Dim sSQL
Dim oRS
Dim Field
Dim FileLength
ID = Request.QueryString("ID")
Response.ContentType =...
Hello everyone,
I am trying to get keep the maine referer I.E. http://www.somewhere.com so that I can track were my customer came from, I have tryed to use this code
but everytime that it runs it chages the referer
Can anyonly help?
Dim HttpRef
If HttpRef <> 1 then
Call GetReferer()
end...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.