Showing posts with label creating. Show all posts
Showing posts with label creating. Show all posts

Friday, March 30, 2012

Help!!! launching report builder from url is adding .rdl to name when saving.

Hi,

When I launch a report using the following url, and then make changes to the report and save it, Reportbuilder is creating another report with the same name but also including the .rdl within the name itself.. therfore I now have two reports now displayed within the report manager

http://localhost/reportserver/reportbuilder/reportbuilder.application?/Report1

Can someone please help...

Hi,

this issue was resolved by applying SP2

thanks.

|||

or:

the same rdl has been uploaded directly using Report Manager and Published in Visual Studio at the same time...

Help!!! launching report builder from url is adding .rdl to name when saving.

Hi,

When I launch a report using the following url, and then make changes to the report and save it, Reportbuilder is creating another report with the same name but also including the .rdl within the name itself.. therfore I now have two reports now displayed within the report manager

http://localhost/reportserver/reportbuilder/reportbuilder.application?/Report1

Can someone please help...

Hi,

this issue was resolved by applying SP2

thanks.

|||

or:

the same rdl has been uploaded directly using Report Manager and Published in Visual Studio at the same time...

HELP!!! Creating Nested Data in Repeated Region Problem

Hi All, Would appreciate some assistance with the attached, I'm using some fairly complicated recordsets (ASP VBScript) for a property search website, I have a page where a user selects search by County this in turn takes them to a page which lists all the towns in the county and number of live properties in each, I'm using 4 recordsets for this - 3 of which list the towns (townsA2I, townsJ2R & townsS2Z) the 4th is a Property Count, examples of the recordsets are below (using townsAtoI and LiveProperties -

TownsA2I

<%
Dim TownA2I
Dim TownA2I_numRows

Set TownA2I = Server.CreateObject("ADODB.Recordset")
TownA2I.ActiveConnection = MM_recruta2_STRING
TownA2I.Source = "SELECT towncountyID, Town, County FROM dbo.easytolettowncounty WHERE Town LIKE 'A%' AND County = '" + Replace(TownA2I__MMColParam, "'", "''") + "' OR Town LIKE 'B%' AND County = '" + Replace(TownA2I__MMColParam1, "'", "''") + "' OR Town LIKE 'C%' AND County = '" + Replace(TownA2I__MMColParam2, "'", "''") + "' OR Town LIKE 'D%' AND County = '" + Replace(TownA2I__MMColParam3, "'", "''") + "' OR Town LIKE 'E%' AND County = '" + Replace(TownA2I__MMColParam4, "'", "''") + "' OR Town LIKE 'F%' AND County = '" + Replace(TownA2I__MMColParam5, "'", "''") + "' OR Town LIKE 'G%' AND County = '" + Replace(TownA2I__MMColParam6, "'", "''") + "' OR Town LIKE 'H%' AND County = '" + Replace(TownA2I__MMColParam7, "'", "''") + "' OR Town LIKE 'I%' AND County = '" + Replace(TownA2I__MMColParam8, "'", "''") + "' ORDER BY Town ASC"
TownA2I.CursorType = 0
TownA2I.CursorLocation = 2
TownA2I.LockType = 1
TownA2I.Open()

TownA2I_numRows = 0
%>

LiveProperties

<%
Dim LiveProperties
Dim LiveProperties_numRows

Sub sLivePropertyCount(vLocation)
vCount=0

Set LiveProperties = Server.CreateObject("ADODB.Recordset")
LiveProperties.ActiveConnection = MM_recruta2_STRING
LiveProperties.Source = "SELECT COUNT(PropertyID) As NumberofProperties, propertylive, propertylocation FROM dbo.easytoletproperty WHERE propertylive = 'y' AND propertylocation = " & vLocation & " GROUP BY propertylocation, propertylive"
LiveProperties.CursorType = 0
LiveProperties.CursorLocation = 2
LiveProperties.LockType = 1
LiveProperties.Open()

vCount=(LiveProperties("NumberofProperties"))
Response.write(vCount)

LiveProperties.Close()
Set LiveProperties = Nothing
end sub

LiveProperties_numRows = 0
%>

I've tried following the tutorial here http://www.webthang.co.uk/tuts/tuts_dmx/rob9/rob9.asp but when i review the page i get the following error -

"Microsoft OLE DB Provider for SQL Server error '80040e14'

Invalid column name 'Barnet'.

/PropertiesbyTown1.asp, line 338 "

Where line 338"

Where line 338 is the "LiveProperties.Open()" of the above recordset, when i try to view bindings on this recordset Dreamweaver gives me the following errors -

"Column 'dbo.easytoletproperty.propertylive' is invalid in the select list because it is not contained in an aggregate function and there is no GROUP BY clause.

Column 'dbo.easytoletproperty.propertylocation' is invalid in the select list because it is not contained in an aggregate function and there is no GROUP BY clause."

I would appreciate any assistance -

Try adding propertylocation to the GROUP BY clause as indicated by the error message.

Friday, March 23, 2012

Help! Report Model Project doesn't like my primary key

I'm creating a report model in VS2005 I've created my data source fine and I have selected all the tables I want in the report model data view.

The problem is that for one of the tables it is refusing to acknowledge the promary key. If I try to create the report model it compains that the table doesn't have a primary key.

So I went into SQL Management Studio and checked the table, Lo and behold the primary key is there!!! I tried droping the primary key and recreating it but it still says there is no primary ley on the table.

Any ideas?!?Just did some fiddling and managed to find the problem.

There is a Unique Clustered Index on the table which the problem comes from, with the index it doesn't see the primary key, without it the key suddenly appears

HELP! Problem in my code

I am very new to SQL and so far have overcome all my problems with reference books and the internet.

However, I am creating a report which doesn't like something in my code (I'm pretty sure it's connected with the second derived table I've added, as without it the report runs okay, although not with the results I expect to see) and I cannot figure out why.

When I try to preview the report I get this error:

Invalid Object Name 'UNIDATA_PLANNINGL_1'.

So far my code is like this:

SELECT DISTINCT
UNIDATA_PLANNING.R0 AS [Job Record], SUBSTRING(UNIDATA_PLANNINGL.R0, 1, 3) AS [Op No], UNIDATA_PLANNINGL.R1 AS [Op Description],
UNIDATA_PLANNINGL.R43 AS [T/O], UNIDATA_WIP.R0 AS [Job No], UNIDATA_PLANNING.ASSY AS Route, SUBSTRING(UNIDATA_PLANNINGL_1.R0, 1,
3) AS [Assy Op], UNIDATA_PLANNINGL_1.R1 AS [Op Description], UNIDATA_PLANNINGL_1.R43 AS [T/O], derivedtbl_1.OPTRIG1,
UNIDATA_PLANNINGL.R0 AS INVISIBLE2, UNIDATA_PLANNINGL_1.R0 AS INVISIBLE
FROM UNIDATA_PLANNINGL INNER JOIN
UNIDATA_WIPL ON UNIDATA_PLANNINGL.R0 = UNIDATA_WIPL.JOBPLKEY INNER JOIN
UNIDATA_WIP ON UNIDATA_WIPL.R2 = UNIDATA_WIP.R0 INNER JOIN
UNIDATA_PLANNING ON UNIDATA_PLANNINGL.Assy = UNIDATA_PLANNING.R0 INNER JOIN
UNIDATA_PLANNINGL AS UNIDATA_PLANNINGL_1 ON UNIDATA_PLANNING.ASSY = UNIDATA_PLANNINGL_1.Assy AND
SUBSTRING(UNIDATA_PLANNINGL.R0, 1, 3) = SUBSTRING(UNIDATA_PLANNINGL_1.R0, 1, 3) AND
UNIDATA_PLANNINGL.R43 <> UNIDATA_PLANNINGL_1.R43 INNER JOIN
(SELECT R0, SUBSTRING(R0, 1, 3) AS OP1, SUBSTRING(R0, 1, 3) + R43 AS OPTRIG1
FROM UNIDATA_PLANNINGL AS UNIDATA_PLANNINGL_2) AS derivedtbl_1 ON UNIDATA_PLANNINGL.R0 = derivedtbl_1.R0 INNER JOIN
(SELECT UNIDATA_PLANNINGL_1.R0, SUBSTRING(UNIDATA_PLANNINGL_1.R0, 1, 3) AS OP2, SUBSTRING(UNIDATA_PLANNINGL_1.R0, 1, 3)
+ UNIDATA_PLANNINGL_1.R43 AS OPTRIG2
FROM UNIDATA_PLANNINGL_1 AS UNIDATA_PLANNINGL_1_1) AS derivedtbl_2 ON UNIDATA_PLANNINGL_1.R0 = derivedtbl_2.R0
WHERE (UNIDATA_PLANNINGL.R0 LIKE N'%JOB\%') AND (NOT (UNIDATA_PLANNING.ASSY LIKE N'%2-%'))
ORDER BY [Job Record]

Could someone more experienced please explain what I have done wrong and if there is a way to fix it?

Thanks,

CPH

Derived table 2

(SELECT UNIDATA_PLANNINGL_1.R0, SUBSTRING(UNIDATA_PLANNINGL_1.R0, 1, 3) AS OP2, SUBSTRING(UNIDATA_PLANNINGL_1.R0, 1, 3)
+ UNIDATA_PLANNINGL_1.R43 AS OPTRIG2
FROM UNIDATA_PLANNINGL_1 AS UNIDATA_PLANNINGL_1_1) AS derivedtbl_2

You alias the table as UNIDATA_PLANNINGL_1_1 then reference it in the select list as UNIDATA_PLANNINGL_1

In future if you get these warnings, pull out any sub queries and test them independantly. You might also want to use something more meaningfull to alias the table names with but thats your choice

|||

Sam,

Thanks for your quick response. However, the alias UNIDATA_PLANNINGL_1_1 is something VS2005 does. If I amend it to UNIDATA_PLANNING_1 which is the table I have included VS2005 immediately changes it back to UNIDATA_PLANNINGL_1_1.

You're right about the table names, though, but unfortunately that's out of my hands.

Thanks again,

Chris

|||

also in that 2nd derived table - you select from UNIDATA_PLANNINGL_1. Is this a table? you use that name as an alias further up which AFAIK will have no scope inside the sub query.

The query should be:

(SELECT UNIDATA_PLANNINGL_1.R0, SUBSTRING(UNIDATA_PLANNINGL_1.R0, 1, 3) AS OP2, SUBSTRING(UNIDATA_PLANNINGL_1.R0, 1, 3)
+ UNIDATA_PLANNINGL_1.R43 AS OPTRIG2
FROM UNIDATA_PLANNINGL AS UNIDATA_PLANNINGL_1) AS derivedtbl_2

|||

Sam,

Thanks again for your reply and your help. As I have the table UNIDATA_PLANNINGL twice in the query VS2005 has aliased the second occurence of the table as UNIDATA_PLANNINGL_1. I have used multiple occurrences of same tables before without any problem, but this is the first time I've tried adding derived tables.

I have tried your suggestion which has cleared the error.

Your help is much appreciated, thanks again,

Chris

Wednesday, March 21, 2012

Help! launching report builder from url is adding .rdl to name when saving.

Hi,
When I launch a report using the following url, and then make changes to the
report and save it, Reportbuilder is creating another report with the same
name but also including the .rdl within the name itself.. therfore I now
have two reports now displayed within the report managerCan you check the file type for rdl in Windows Explorer and see if it is
misconfigured? Also, do your report names contain any non-alphanumeric
characters?
--
Bryan Phillips
MCSD, MCDBA, MCSE
Blog: http://bphillips76.spaces.live.com
"Rob Dob" <robdob20012002@.yahoo.com> wrote in message
news:OUA8VAbXHHA.4560@.TK2MSFTNGP03.phx.gbl:
> Hi,
> When I launch a report using the following url, and then make changes to the
> report and save it, Reportbuilder is creating another report with the same
> name but also including the .rdl within the name itself.. therfore I now
> have two reports now displayed within the report manager|||> Can you check the file type for rdl in Windows Explorer and see if it is
> misconfigured? Also, do your report names contain any non-alphanumeric
> characters?
>
Thank you, SP2 seemed to resolve this issue

HELP! Issue creating subscription

We have been creating the initial subscriptions the same way for years
(sp_addmergepullsubscription_agent). Our FTP server is the same as well.
Yesterday I ran into a strange situation on one client (3 subscribers to one
database at 3 different locations, 2 with the same ISP). Each have SQL
Server 2005 Developer's Editon.
As soon as the process to connect to our FTP and download the snapshot we
get the following error:
************************************************** *******
Error messages:
The schema script '' could not be propagated to the subscriber. (Source:
MSSQL_REPL, Error number: MSSQL_REPL-2147201001)
Get help: http://help/MSSQL_REPL-2147201001
The process could not retrieve file
'OURSERVER_CLIENT_DBNAME_CLIENT_DBNAME\20071105123 250\snapshot.cab' from the
FTP site '11.222.33.44'. (Source:
MSSQL_REPL, Error number: MSSQL_REPL20033) Get help:
http://help/MSSQL_REPL20033
200 Type set to I.
500 Invalid PORT Command.
500 'LPRT 6,16,0,0,0,0,0,0,0,0,80,173,6,0,0,0,0,0,2,4,208': command not
understood
(Source: MSSQL_REPL, Error number: MSSQL_REPL12003)
************************************************** ******
I used the exact same procedure on their publication as if I was one for
their locations and it worked fine. We do this at least twice every week for
new clients or when the subscription has to be recreated and have never had
this issue.
We turned off the firewalls and set the router to DMZ. Same problem. I
turned on verbose logging and did not get any additional information.
To work-around I downloaded the snapshot manually, changed the snapshot
location to the subscriber's local drive and it created the subscriptions.
When it finished I changed the snapshot path back to FTP and re-ran the
snapshot agent to see if it would continue to sync. Thankfully it does at
least for now.
The same issued happened again today on our other server. Both are SQL
Server 2005 SP2.
Anybody know what is causing this?
Thank you in advance!
when I ping 111.222.33.44 the ping request times out. I think this is your
problem;)
When I examine your logs it looks like the ftp command was not correctly
formatted:
500 Invalid PORT Command.
500 'LPRT 6,16,0,0,0,0,0,0,0,0,80,173,6,0,0,0,0,0,2,4,208': command not
understood
Can you check your ftp logs to see what ftp command SQL Server was issuing?
The ftp logs might also give you some clues as to what actually occured and
what the problem is.
RelevantNoise.com - dedicated to mining blogs for business intelligence.
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com
"RichardD" <RichardD@.discussions.microsoft.com> wrote in message
news:5B0C5E4D-9529-4EFC-97B5-5748558B4399@.microsoft.com...
> We have been creating the initial subscriptions the same way for years
> (sp_addmergepullsubscription_agent). Our FTP server is the same as well.
> Yesterday I ran into a strange situation on one client (3 subscribers to
> one
> database at 3 different locations, 2 with the same ISP). Each have SQL
> Server 2005 Developer's Editon.
> As soon as the process to connect to our FTP and download the snapshot we
> get the following error:
> ************************************************** *******
> Error messages:
> The schema script '' could not be propagated to the subscriber. (Source:
> MSSQL_REPL, Error number: MSSQL_REPL-2147201001)
> Get help: http://help/MSSQL_REPL-2147201001
> The process could not retrieve file
> 'OURSERVER_CLIENT_DBNAME_CLIENT_DBNAME\20071105123 250\snapshot.cab' from
> the
> FTP site '11.222.33.44'. (Source:
> MSSQL_REPL, Error number: MSSQL_REPL20033) Get help:
> http://help/MSSQL_REPL20033
> 200 Type set to I.
> 500 Invalid PORT Command.
> 500 'LPRT 6,16,0,0,0,0,0,0,0,0,80,173,6,0,0,0,0,0,2,4,208': command not
> understood
> (Source: MSSQL_REPL, Error number: MSSQL_REPL12003)
> ************************************************** ******
> I used the exact same procedure on their publication as if I was one for
> their locations and it worked fine. We do this at least twice every week
> for
> new clients or when the subscription has to be recreated and have never
> had
> this issue.
> We turned off the firewalls and set the router to DMZ. Same problem. I
> turned on verbose logging and did not get any additional information.
> To work-around I downloaded the snapshot manually, changed the snapshot
> location to the subscriber's local drive and it created the subscriptions.
> When it finished I changed the snapshot path back to FTP and re-ran the
> snapshot agent to see if it would continue to sync. Thankfully it does at
> least for now.
> The same issued happened again today on our other server. Both are SQL
> Server 2005 SP2.
> Anybody know what is causing this?
> Thank you in advance!
>
|||The actual IP is working. ;)
So far this has only happened to 2 clients. Others that have been done
before AND after have not had this issue. All clients use the same FTP
Server but each of the these 2 snapshots that failed are on a different
server. The others that worked after these failed are on the same server as
one of the failing clients.
In the event view we did see this message but have not yet tried using the
uncompressed snapshot.
Event Type: Error
Event Source: MSSQLSERVER
Event Category: (2)
Event ID: 14151
Date: 11/7/2007
Time: 7:13:13 AM
User: HOSTING\sql-int05
Computer: OURSQLSERVER
Description:
Replication-Replication Snapshot Subsystem: agent
OURSQLSERVER-ClientName_DBName-ClientName_DBName-5 failed. The replication
agent had encountered an exception.
Source: Replication
Exception Type: Microsoft.SqlServer.Replication.FciException
Exception Message: The replication agent had encountered a file compression
(cabinet) library error while calling 'FCIF
For more information, see Help and Support Center at
http://go.microsoft.com/fwlink/events.asp.
Data:
0000: 47 37 00 00 12 00 00 00 G7.....
0008: 0e 00 00 00 49 00 4e 00 ...I.N.
0010: 54 00 45 00 52 00 41 00 T.E.R.A.
0018: 43 00 54 00 49 00 56 00 C.T.I.V.
0020: 45 00 30 00 35 00 00 00 E.0.5...
0028: 0d 00 00 00 64 00 69 00 ...d.i.
0030: 73 00 74 00 72 00 69 00 s.t.r.i.
0038: 62 00 75 00 74 00 69 00 b.u.t.i.
0040: 6f 00 6e 00 00 00 o.n...
I will look for the FTP logs and see if there is anything in those as well.
Thanks!
"Hilary Cotter" wrote:

> when I ping 111.222.33.44 the ping request times out. I think this is your
> problem;)
> When I examine your logs it looks like the ftp command was not correctly
> formatted:
> 500 Invalid PORT Command.
> 500 'LPRT 6,16,0,0,0,0,0,0,0,0,80,173,6,0,0,0,0,0,2,4,208': command not
> understood
> Can you check your ftp logs to see what ftp command SQL Server was issuing?
> The ftp logs might also give you some clues as to what actually occured and
> what the problem is.
>
> --
> RelevantNoise.com - dedicated to mining blogs for business intelligence.
> Looking for a SQL Server replication book?
> http://www.nwsu.com/0974973602.html
> Looking for a FAQ on Indexing Services/SQL FTS
> http://www.indexserverfaq.com
> "RichardD" <RichardD@.discussions.microsoft.com> wrote in message
> news:5B0C5E4D-9529-4EFC-97B5-5748558B4399@.microsoft.com...
>
>

Monday, March 12, 2012

Help! Creating Custom Data Flow Task

I'm trying to create a custom data flow destination, and it has a custom property that needs to get value from variable(similar to the FileNameVariable property of Raw File Destination), how can I do that?

Create a propery of type string. Store the name of a variable in that property. Use the property value to locate the variable in the variables collection at run-time, lock and read the variable's value.

What are you asking? How to create a property? How to store a string in a property, the string being a variable name? How to read a string value from a property and get the matching varible and it's value at runtime?

You should also validate the value of the property during Validate of course, and check tht it is a valid variable name.

|||

DarrenSQLIS wrote:

Create a propery of type string. Store the name of a variable in that property. Use the property value to locate the variable in the variables collection at run-time, lock and read the variable's value.

What are you asking? How to create a property? How to store a string in a property, the string being a variable name? How to read a string value from a property and get the matching varible and it's value at runtime?

You should also validate the value of the property during Validate of course, and check tht it is a valid variable name.

So provide a custom IDTSCustomProperty90 in ProvideComponentProperties() and let users type in the variable name is enough(of course, I should also follow what you said)?

I wanted to make it behave the same way as the FileNameVariable property of Raw File Destination, that is: users don't type in the variable name, instead, they select from all available variable names.
|||

DarrenSQLIS wrote:

Create a propery of type string. Store the name of a variable in that property. Use the property value to locate the variable in the variables collection at run-time, lock and read the variable's value.

What are you asking? How to create a property? How to store a string in a property, the string being a variable name? How to read a string value from a property and get the matching varible and it's value at runtime?

You should also validate the value of the property during Validate of course, and check tht it is a valid variable name.

How can I get the matching variable and it's value at runtime? And generally in which method should I do that? Thanks.
|||

Here's a sample from a component I developed to raise custom events from a package's control flow; the same basic technique should work for you in data flow as well.

First, create a property that stores the variable name. This will be set by the package developer at design time.

Code Snippet

private string variableName;

///

/// This property gets or sets the name of the variable in which the

/// event text is stored.

///

[Browsable(true)]

[Category("Custom")]

[Description("Gets or sets the name of the variable in which the event text is stored.")]

public string VariableName

{

get

{

return variableName;

}

set

{

if (value.IndexOf("::") == -1)

{

variableName = "User::" + value;

}

else

{

variableName = value;

}

}

}

(The set accessor for the property is simply explicitly adding the User namespace to the specified variable name unless a namespace is already specified. I've yet to add a drop-down so the package developer can pick from a list of available variables.)

Then, you can use the component's VariableDispenser object (which is passed in a parameter to many of the methods you overload when developing your component) to lock and work with the package variable identified by the property. Here's a sample from the Validate method in my component:

Code Snippet

Variables vars = null;

DTSExecResult result;

variableDispenser.LockOneForRead(variableName, ref vars);

if (vars[variableName].DataType != TypeCode.String)

{

// The variable is accessable, but is not the correct data type

componentEvents.FireError(0, SubComponent(variableDispenser),

string.Format("Variable '{0}' is not a String variable", variableName), "", 0);

result = DTSExecResult.Failure;

}

else

{

result = DTSExecResult.Success;

}

vars.Unlock();

return result;

The key thing here is that you're using the variableDispenser to lock the specific variable identified by the component's property, working with it, and then unlocking it when you're done.

(The SubComponent method which is referenced in the code sample above is just a little helper routine that returns a string in a standard format to identify where an error or event is coming from. I need this type of string in many places, so I have a function that can be reused, but it's not really relevant to your question...)

Hope this helps!

Friday, February 24, 2012

Help With Where Clause

I am creating a food database application where I allow the user to search
for food names. For this example, lets supposed that my database has the
following food names on the table.
Salt with water
Chips and salsa
Fried Chicken
Guacamole
If the user types 'sa' on the search textbox I would like to retrieve the
following records:
Salt with water
Chips and salsa
This is because Salt starts with 'sa' and salsa also starts with 'sa'. If
the user typed 'sa ch' (this is the string 'sa' then a space and then the
string 'ch'). I would like to retrieve the records
Salt with water
Chips and salsa
Fried Chicken
I get the same records as before because I included the string 'sa' and I
get the record 'Fried Chicken' because Chicken starts with 'ch'. The problem
is that the user can have as many words as he or she pleases. It even gets
more complicated because I would like to use a store procedure on Microsoft
SQL server.
Could someone help me creating this store procedure, PLEASE! Thank you.Rene
See if this helps
CREATE TABLE #Test
(
col VARCHAR(50)
)
INSERT INTO #Test VALUES ('Salt with water')
INSERT INTO #Test VALUES ('Chips and salsa')
INSERT INTO #Test VALUES ('Fried Chicken')
INSERT INTO #Test VALUES ('Guacamole')
SELECT * FROM #Test WHERE col LIKE '%sa%'
"Rene" <nospam@.nospam.com> wrote in message
news:uI8eG$kaFHA.3120@.TK2MSFTNGP12.phx.gbl...
> I am creating a food database application where I allow the user to search
> for food names. For this example, lets supposed that my database has the
> following food names on the table.
> Salt with water
> Chips and salsa
> Fried Chicken
> Guacamole
> If the user types 'sa' on the search textbox I would like to retrieve the
> following records:
> Salt with water
> Chips and salsa
> This is because Salt starts with 'sa' and salsa also starts with 'sa'. If
> the user typed 'sa ch' (this is the string 'sa' then a space and then the
> string 'ch'). I would like to retrieve the records
> Salt with water
> Chips and salsa
> Fried Chicken
> I get the same records as before because I included the string 'sa' and I
> get the record 'Fried Chicken' because Chicken starts with 'ch'. The
problem
> is that the user can have as many words as he or she pleases. It even gets
> more complicated because I would like to use a store procedure on
Microsoft
> SQL server.
> Could someone help me creating this store procedure, PLEASE! Thank you.
>|||> SELECT * FROM #Test WHERE col LIKE '%sa%'
This won't work. Aquery like this will also return food name such as 'Carne
Aa' because 'Aa' has 'sa' inside its text, I am only interested on
food that has any of its words *start* with the string 'sa'.
"Uri Dimant" <urid@.iscar.co.il> wrote in message
news:%23OXdQmlaFHA.3364@.TK2MSFTNGP09.phx.gbl...
> Rene
> See if this helps
> CREATE TABLE #Test
> (
> col VARCHAR(50)
> )
> INSERT INTO #Test VALUES ('Salt with water')
> INSERT INTO #Test VALUES ('Chips and salsa')
> INSERT INTO #Test VALUES ('Fried Chicken')
> INSERT INTO #Test VALUES ('Guacamole')
> SELECT * FROM #Test WHERE col LIKE '%sa%'
>
> "Rene" <nospam@.nospam.com> wrote in message
> news:uI8eG$kaFHA.3120@.TK2MSFTNGP12.phx.gbl...
> problem
> Microsoft
>|||WHERE col LIKE '% sa%' or col like LIKE '%,sa%' or col like LIKE '%.sa%' or
left(col, 2) = 'sa'
You know where I'm going with this, right.
I have seen a script (stored procedure or function) that extracts words from
a string and converts it to a table, one word per column
This may help you with this problem. Maybe someone here could point you to
the script. I can't seem to be able to find it right now.
"Rene" <nospam@.nospam.com> wrote in message
news:ONj7qTqaFHA.2736@.TK2MSFTNGP12.phx.gbl...
> This won't work. Aquery like this will also return food name such as
> 'Carne Aa' because 'Aa' has 'sa' inside its text, I am only
> interested on food that has any of its words *start* with the string 'sa'.
> "Uri Dimant" <urid@.iscar.co.il> wrote in message
> news:%23OXdQmlaFHA.3364@.TK2MSFTNGP09.phx.gbl...
>