Skip to content

Passing string of parameters to stored procedure

I have a stored procedure that needs to accept a parameter @pnumber as a string of values like 1001,1002,1003… My stored procedure looks like this: My data: The problem with this stored procedure is – when I input the parameter as (1001,1002) the query produced looks like this: My query should act…

SQL how to prevent masking by like statement

I’m dealing with a masking issue with the like statement such that: case when name like ‘PO_UTI_%’ then ‘UTI’ when name like ‘PO_UTI_ADR_%’ then ‘UTI ADDRESS’ when name like ‘PO_OP_%’ …

SQLite searching for user in table

// This returns a count of 1, so the table does exist, and I know the user exists becaue I have just added him in… Int32 tableCount = database.Query(map, “SELECT * FROM sqlite_master WHERE type = ‘…

Mysql STR_TO_TIME formatting

My query looks like this: select STR_TO_DATE( CONCAT(MONTH(date), ‘-‘, DAY(date) ), ‘%M-%d’ ) from `subscriptions` But the end result is always records with null columns. What is wrong with this …