Can I write an if statement in T-SQL for MSSQL2K or do I have to do it in the WHERE clause?
Would like to say:
IF field1 = e
insert into db2.accounts from db1.accounts where in db2.employee
IF field2 = c
insert into db2.accounts from db1.accounts where in db2.company
Re: IF statement in SQL? ... > Can I write an if statement in T-SQL for MSSQL2K or do I have to do it in ... In what table does "field1" exist? ... Most likely you should be using a WHERE clause,...SQL Server MVP... (microsoft.public.sqlserver.mseq)
Re: Very simple update query running super slow! ...RugMan SET RugMan.test = "GOOD" ... I have NO idea what ImageFile has to do with anything. ... Your WHERE clause... implies that it's equal to the value of Field1,... (microsoft.public.access.queries)
Re: Importing text data into Access with record type selection ... if you import it with a query that gets its data direct from the ... you just use a WHERE clause to select the records you want, ... INSERT INTO MyAccessTable (Field1, Field2, Field3) ... (microsoft.public.access.externaldata)
Re: LIKE in embedded if statement? ... Switch the query to SQL View, and adjust the WHERE clause like this: ... Replace "Field1" with the name of your field. ... If you are interested in building your own search form using code to avoid these convoluted clauses, ... Search form - Handle many optional criteria... (microsoft.public.access.queries)
Re: Trigger - for statement ... If you need a loop,... There is no FOR loo in T-SQL.... you mean maybe FOR clause in some other statements (SELECT ... ... (microsoft.public.sqlserver.programming)